[systemd-devel] [PATCH] sd-event: Fix systemd crash when using timer units.

Thomas Bächler thomas at archlinux.org
Fri Feb 21 02:20:24 PST 2014


There was a copy-paste error introduced in commit c2ba3ad6604ef2e189d7e0a36d6911116e84d3ab
which causes the following error when using timer units:

Assertion '(x->type == SOURCE_MONOTONIC && y->type == SOURCE_MONOTONIC) || (x->type == SOURCE_REALTIME && y->type == SOURCE_REALTIME)'
failed at src/libsystemd/sd-event/sd-event.c:264, function latest_time_prioq_compare(). Aborting.
---

I did cannot test this at the moment, but the problem looks very obvious to me.

 src/libsystemd/sd-event/sd-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 25dfd17..1f039bc 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -771,7 +771,7 @@ _public_ int sd_event_add_realtime(sd_event *e,
                                    sd_event_time_handler_t callback,
                                    void *userdata) {
 
-        return event_add_time_internal(e, ret, SOURCE_REALTIME, &e->realtime_fd, CLOCK_REALTIME, &e->realtime_earliest, &e->monotonic_latest, usec, accuracy, callback, userdata);
+        return event_add_time_internal(e, ret, SOURCE_REALTIME, &e->realtime_fd, CLOCK_REALTIME, &e->realtime_earliest, &e->realtime_latest, usec, accuracy, callback, userdata);
 }
 
 static int event_update_signal_fd(sd_event *e) {
-- 
1.9.0



More information about the systemd-devel mailing list