Systemd/src/libsystemd
Franck Bui 4470860388 sd-event: "when exiting no signal event are pending" is a wrong assertion (#5271)
The code make the following assertion: when freeing a event loop object
(usually it's done after exiting from the main event loop), no signal events
are still queued and are pending.

This assertion can be found in event_unmask_signal_data() with
"assert(!d->current);" assertion.

It appears that this assertion can be wrong at least in a specific case
described below.

Consider the following example which is inspired from udev: a process defines 3
source events: 2 are created by sd_event_add_signal() and 1 is created by
sd_event_add_post().

 1. the process receives the 2 signals consecutively so that signal 'A' source
     event is queued and pending. Consequently the post source event is also
     queued and pending. This is done by sd_event_wait().

 2. The callback for signal 'A' is called by sd_event_dispatch().

 3. The next call to sd_event_wait() will queue signal 'B' source event.

 4. The callback for the post source event is called and calls sd_event_exit().

 5. the event loop is exited.

 6. freeing the event loop object will lead to the assertion failure in
     event_unmask_signal_data().

This patch simply removes this assertion as it doesn't seem to be a
bug if the signal data still reference a signal source at this point.
2017-02-08 20:56:22 +01:00
..
sd-bus manager: refuse reloading/reexecing when /run is overly full 2017-02-06 16:58:06 +01:00
sd-daemon Add sd_is_socket_sockaddr (#4885) 2016-12-14 11:51:26 +01:00
sd-device tree-wide: adjust fall through comments so that gcc is happy 2017-01-31 14:04:55 -05:00
sd-event sd-event: "when exiting no signal event are pending" is a wrong assertion (#5271) 2017-02-08 20:56:22 +01:00
sd-hwdb sd-hwdb: drop caching of search string 2016-11-30 15:51:08 -05:00
sd-id128 core: store the invocation ID in the per-service keyring 2016-12-13 20:59:36 +01:00
sd-login tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
sd-netlink networkd: handle MTU field in IPv6 RA (#4719) 2016-11-23 22:32:19 +01:00
sd-network tree-wide: make invocations of extract_first_word more uniform (#4627) 2016-11-11 18:58:41 +01:00
sd-path tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
sd-resolve sd-resolve: use close_many() (#3643) 2016-07-02 08:17:26 -07:00
sd-utf8 tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
.gitignore libsystemd: remove list of symbols to export only in the future 2015-06-17 16:21:13 +02:00
libsystemd.pc.in Adjust pkgconfig files to point at rootlibdir (#4584) 2016-11-08 09:36:41 +01:00
libsystemd.sym Add sd_is_socket_sockaddr (#4885) 2016-12-14 11:51:26 +01:00
Makefile libsystemd-bus: rename to libsystemd 2014-01-13 18:54:19 +01:00