commit 513e6fd75a9b7eaaada27d47b3022e4e2af030fd7758cf99b6ea8cd517344f3c from: Stefan Sperling date: Mon Jun 23 13:22:58 2025 UTC avoid event_loopexit() in gotsysd libexec event handlers when flushing It seems flushing our final message can fail if we forcefully exit the event loop here. This would leave gotsysd's sysconf process stuck in a state where it was waiting for a message which never arrived. commit - 07e7ca184c56b0ed4ad17cf4d6c4693595681b32cb5ad9e329d6f9edb603fe42 commit + 513e6fd75a9b7eaaada27d47b3022e4e2af030fd7758cf99b6ea8cd517344f3c blob - 4fdfd416852c0d6bb94fb00014036a60183986476e021b869a754d0ca3251c8d blob + 239d2547701ccbc842e370d3bbfa0e248fa86ce94b715f1f9c14ad4f948871bb --- gotsysd/libexec/gotsys-apply-conf/gotsys-apply-conf.c +++ gotsysd/libexec/gotsys-apply-conf/gotsys-apply-conf.c @@ -199,7 +199,6 @@ dispatch_gotd(int fd, short event, void *arg) goto fatal; } else if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } } @@ -267,7 +266,6 @@ dispatch_gotsysd(int fd, short event, void *arg) if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - 741b18ac6aef5f2f36cc87921e38806f4b82dd16f769c39fffa7ea95f9bdf5c3 blob + 1c160a9adef8146e6f31093f652809a3d01da702310153b63e464a657e39d9be --- gotsysd/libexec/gotsys-groupadd/gotsys-groupadd.c +++ gotsysd/libexec/gotsys-groupadd/gotsys-groupadd.c @@ -494,7 +494,6 @@ dispatch_event(int fd, short event, void *arg) } else if (imsgbuf_queuelen(ibuf) == 0 && groupadd_state == GROUPADD_STATE_DONE) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - 81cd28f34519f37e548542996c775b30e14e4d5c7577aa6c3d40e7cf43cb8906 blob + 94e344057cbc2d018a48a132a41bc502a6bffadaed948e7f09a117c159ad6684 --- gotsysd/libexec/gotsys-read-conf/gotsys-read-conf.c +++ gotsysd/libexec/gotsys-read-conf/gotsys-read-conf.c @@ -109,7 +109,6 @@ dispatch_event(int fd, short event, void *arg) goto fatal; } else if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - 3bb42bc9618d5a380599a85baa97fbb1bd468f2067fa8ac42b9012d83e5c753e blob + c8a56db2e72bbf51f9c15192c5adbf43f0fb7d8df50fac41e624680e8eec967c --- gotsysd/libexec/gotsys-repo-create/gotsys-repo-create.c +++ gotsysd/libexec/gotsys-repo-create/gotsys-repo-create.c @@ -310,7 +310,6 @@ dispatch_event(int fd, short event, void *arg) goto fatal; } else if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - e8aadf9e8147911cf526fafd1f1e19dd2923a5f785ef487ffe249147791f5316 blob + d31ca4d5f0dd9b57563be7e0bfe21ff0f371a7a021959eb9f1b14a30a693e77e --- gotsysd/libexec/gotsys-rmkeys/gotsys-rmkeys.c +++ gotsysd/libexec/gotsys-rmkeys/gotsys-rmkeys.c @@ -156,7 +156,6 @@ dispatch_event(int fd, short event, void *arg) } else if (imsgbuf_queuelen(ibuf) == 0 && rmkeys_state == RMKEYS_STATE_DONE) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - 9fefe103f6a098059620849f185849af01892857b79d739bb253e9aa7d7e1485 blob + 11e7736968028a71f97af84e2b85f34b67168e3502343a9e526f4e4ee9c1309c --- gotsysd/libexec/gotsys-sshdconfig/gotsys-sshdconfig.c +++ gotsysd/libexec/gotsys-sshdconfig/gotsys-sshdconfig.c @@ -150,7 +150,6 @@ dispatch_event(int fd, short event, void *arg) goto fatal; } else if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - af3e4ff70e21126acb259f48c607d9323b75beef02bfef8941207c33d870b48c blob + 6cbfbc3e9b03c1a1fd62f67baffc06d811b876a823c5cc10c1956b6ac2497472 --- gotsysd/libexec/gotsys-useradd/gotsys-useradd.c +++ gotsysd/libexec/gotsys-useradd/gotsys-useradd.c @@ -748,7 +748,6 @@ dispatch_event(int fd, short event, void *arg) } else if (imsgbuf_queuelen(ibuf) == 0 && useradd_state == USERADD_STATE_DONE) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - 8eabeaebcc2363d3edab848528c4716a4a8285e490dd572f922e4e77f514cedb blob + ac6102356a85fc408a9c3bf0b80c935c18d1f580f703380104079aca1430d638 --- gotsysd/libexec/gotsys-userhome/gotsys-userhome.c +++ gotsysd/libexec/gotsys-userhome/gotsys-userhome.c @@ -222,7 +222,6 @@ dispatch_event(int fd, short event, void *arg) } else if (imsgbuf_queuelen(ibuf) == 0 && userhome_state == USERHOME_STATE_DONE) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - cc2c05cd23f85ef53758c9781e9b1ca9b4eb87b65f5db743ba05f28b4b45af98 blob + eb640a04a93ea9790cf432b6db1dc3ad5f4f738adfced06f9ad5fe21022e3907 --- gotsysd/libexec/gotsys-userkeys/gotsys-userkeys.c +++ gotsysd/libexec/gotsys-userkeys/gotsys-userkeys.c @@ -155,7 +155,6 @@ dispatch_event(int fd, short event, void *arg) goto fatal; } else if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } } blob - 825650f927d09bb67a2fdffaed1d5025ea7c3b2a454dda233e7a05a4af8123a9 blob + e7232210572c4caad54020799385ee0ebe4716926a2b98a2e6a7dd98146ca68b --- gotsysd/libexec/gotsys-write-conf/gotsys-write-conf.c +++ gotsysd/libexec/gotsys-write-conf/gotsys-write-conf.c @@ -384,7 +384,6 @@ dispatch_event(int fd, short event, void *arg) goto fatal; } else if (imsgbuf_queuelen(ibuf) == 0 && flush_and_exit) { event_del(&iev->ev); - event_loopexit(NULL); return; } }