summaryrefslogtreecommitdiffhomepage
path: root/packaging
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-05-29 19:39:52 +0900
committerAdam Malczewski <[email protected]>2026-05-29 19:39:52 +0900
commite02b65aa65093f183a0aacb82e88ef7e434c0b74 (patch)
tree0ba4f4db5d79e1c7cb1833edc0ccc2c296f88e8e /packaging
parent5aeb96e46e914686d8fbc75302354150732800d7 (diff)
downloaddispatch-e02b65aa65093f183a0aacb82e88ef7e434c0b74.tar.gz
dispatch-e02b65aa65093f183a0aacb82e88ef7e434c0b74.zip
fix(packaging): add notification-fd to dispatch-s6 loggers
The dispatch-{api,frontend}-log run scripts invoke `s6-log -d3` (send a readiness notification on fd 3), but the service dirs lacked a notification-fd file, so s6-supervise never opened fd 3. s6-log aborted with "invalid notification fd: Bad file descriptor" (exit 100) and crash-looped, so nothing drained the producer's stdout pipe. The API then filled its 64KB stdout pipe and blocked in write() before reaching listen(), so port 18390 never opened and the frontend could not reach the backend (the frontend survived only because it logs almost nothing). Add notification-fd=3 to both logger service dirs and install them via PKGBUILD, matching every other logger on the system. This also makes s6-rc bring the logger up ready-first, preventing the pipe-fill race.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/PKGBUILD8
-rw-r--r--packaging/s6/dispatch-api-log/notification-fd1
-rw-r--r--packaging/s6/dispatch-frontend-log/notification-fd1
3 files changed, 10 insertions, 0 deletions
diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD
index 6aa66cc..a9a5b5c 100644
--- a/packaging/PKGBUILD
+++ b/packaging/PKGBUILD
@@ -180,6 +180,11 @@ package_dispatch-s6() {
"${pkgdir}/etc/s6/sv/dispatch-api-log/consumer-for"
install -Dm644 "${_packagingdir}/s6/dispatch-api-log/pipeline-name" \
"${pkgdir}/etc/s6/sv/dispatch-api-log/pipeline-name"
+ # notification-fd must match the `-d3` flag in run; without it s6-log
+ # aborts with "invalid notification fd" and the API blocks on a full
+ # stdout pipe before it can listen().
+ install -Dm644 "${_packagingdir}/s6/dispatch-api-log/notification-fd" \
+ "${pkgdir}/etc/s6/sv/dispatch-api-log/notification-fd"
# --- dispatch-frontend-srv ---
install -Dm755 "${_packagingdir}/s6/dispatch-frontend-srv/run" \
@@ -198,4 +203,7 @@ package_dispatch-s6() {
"${pkgdir}/etc/s6/sv/dispatch-frontend-log/consumer-for"
install -Dm644 "${_packagingdir}/s6/dispatch-frontend-log/pipeline-name" \
"${pkgdir}/etc/s6/sv/dispatch-frontend-log/pipeline-name"
+ # notification-fd must match the `-d3` flag in run (see dispatch-api-log).
+ install -Dm644 "${_packagingdir}/s6/dispatch-frontend-log/notification-fd" \
+ "${pkgdir}/etc/s6/sv/dispatch-frontend-log/notification-fd"
}
diff --git a/packaging/s6/dispatch-api-log/notification-fd b/packaging/s6/dispatch-api-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/packaging/s6/dispatch-api-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/packaging/s6/dispatch-frontend-log/notification-fd b/packaging/s6/dispatch-frontend-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/packaging/s6/dispatch-frontend-log/notification-fd
@@ -0,0 +1 @@
+3