Bug 61697 - missing EPOLL_DEL causes logstorm when changing system time very early
Summary: missing EPOLL_DEL causes logstorm when changing system time very early
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-02 17:04 UTC by Enrico Scholz
Modified: 2013-03-06 16:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
quick patch to fix time change related logstorm (1.02 KB, text/plain)
2013-03-02 17:04 UTC, Enrico Scholz
Details

Description Enrico Scholz 2013-03-02 17:04:56 UTC
Created attachment 75789 [details]
quick patch to fix time change related logstorm

When system time is changed very early there can be created
thousands/millions of messages like

| Mar 02 17:20:47 gkar systemd[1]: systemd-tmpfiles-clean.timer: time change, recalculating next elapse.
| Mar 02 17:20:47 gkar systemd[1]: Time has been changed
| ...
| Mar 02 17:20:49 gkar systemd-journal[1058]: Missed 91079 kernel messages
| Mar 02 17:20:49 gkar systemd[1]: systemd-tmpfiles-clean.timer: time change, recalculating next elapse.


This happens because the 'm->time_change_watch.fd' is closed in the
hope that it gets removed from the epoll-fd too.  This removal does
not happen here because forked processes (udevd?) hold an instance of
the old timer fd which triggers epoll over and over again.

There should happen an explicit EPOLL_DEL before
close_nointr_nofail(m->time_change_watch.fd).


For me, it causes problems with the time_changed_watch.fd only.  But a
quick look it seems that other code was written under the same wrong
assumption and must be fixed too.
Comment 1 Lennart Poettering 2013-03-06 16:16:38 UTC
Thanks. Applied!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.