Skip to content

Strange exit with exit code 0 #94

Description

@PikachuEXE

I am testing clockwork and found out it exited with exit code 0
However I have already setup logging to capture exit messages from clockwork (Shutting down/Gracefully shutting down

Log:

/home/app/webapp/app/controllers/api/lister_app/v1/listings/update_controller.rb:382:in '<class:ParsedParams>'
** [NewRelic][2026-07-20 07:50:33 +0000 7e5dcdb81fc2 (24)] INFO : Installing New Relic supported Parallel instrumentation using Prepend
[INFO] [2026-07-20 07:50:34 +0000] Starting clock for 1 events: [ app_daily_app_listing_data_feed_jobs_monitoring_summary_notification ]

Jul 20 08:17:01 7e5dcdb81fc2 CRON[366]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 09:17:01 7e5dcdb81fc2 CRON[927]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 10:17:01 7e5dcdb81fc2 CRON[1493]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 11:17:01 7e5dcdb81fc2 CRON[2088]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 12:17:01 7e5dcdb81fc2 CRON[2799]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 13:17:01 7e5dcdb81fc2 CRON[3326]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 14:17:01 7e5dcdb81fc2 CRON[3853]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 20 15:17:01 7e5dcdb81fc2 CRON[4377]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
*** bundle exited with status 0.
*** Shutting down runit daemon (PID 23)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
Jul 20 16:00:50 7e5dcdb81fc2 syslog-ng[14]: syslog-ng shutting down; version='4.3.1'
*** Killing all processes...
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
Jul 20 16:00:52 7e5dcdb81fc2 syslog-ng[13]: syslog-ng starting up; version='4.3.1'
*** Booting runit daemon...
*** Runit started as PID 22
*** Running bundle exec clockwork ./clock.rb...

If I run inside the container and send INT signal it would look like

** [NewRelic][2026-07-20 23:43:19 +0000 7e5dcdb81fc2 (5108)] INFO : Installing New Relic supported Parallel instrumentation using Prepend
[INFO] [2026-07-20 23:43:20 +0000] Starting clock for 1 events: [ app_daily_app_listing_data_feed_jobs_monitoring_summary_notification ]

^C[DEBUG] [2026-07-20 23:43:24 +0000] Got INT signal

[INFO] [2026-07-20 23:43:24 +0000] Shutting down

** [NewRelic][2026-07-20 23:43:24 +0000 7e5dcdb81fc2 (5108)] INFO : Starting agent shutdown

So it doesn't seems to be receiving external signals

Used with https://github.com/phusion/baseimage-docker (i.e. app is run inside docker container, I made it always restart
No OOM detected (exit code is 0 not 137, nor marked as OOMKilled on container

No idea how to debug this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions