SIGABRT not aborting RackApp processes

76 views
Skip to first unread message

Jay Howard

unread,
Jun 17, 2015, 8:24:37 AM6/17/15
to phusion-...@googlegroups.com
I'm writing a processing monitoring script to detect and kill runaway RackApp processes, managed by Passenger.  We're using 4.0.59.

Based on the documentation:

If one of your application processes is frozen (stopped responding), then you can figure out where it is frozen by killing it with SIGABRT. This will cause the processs to print a backtrace, after which it aborts. The backtrace information is logged into the web server error log file.

I expected SIGABRT would do the trick.  However, when I send SIGABRT to one of my RackApp processes it does prompt the back trace, but doesn't actually terminate the process.

I can always send it SIGTERM or SIGKILL, but unless I put a delay between the SIGABRT and SIGTERM the process dies before writing its back trace to the log file.

Is it correct to expect SIGABRT to cause the process to die (after outputting a backtrace of all threads)?  Or is that not actually the expected behavior?

To avoid putting in the delay, is there a different signal I can send that will cause the process to die, but only after it has finished writing its back trace?

Hongli Lai

unread,
Jun 20, 2015, 4:28:28 AM6/20/15
to phusion-passenger
This is a bug. SIGABRT is supposed to abort the process after writing
the backtrace, but doesn't do that since the Passenger 5 refactorings.
I'll have this fixed.
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phusion-passen...@googlegroups.com.
> To post to this group, send email to phusion-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/phusion-passenger.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/phusion-passenger/6ff99167-3a70-424f-9611-9b62c216712c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Phusion B.V. | Web Application deployment, scaling, and monitoring solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 63501007 (The Netherlands)

Jay Howard

unread,
Jun 20, 2015, 8:35:46 AM6/20/15
to phusion-...@googlegroups.com
Thanks Hongli.

I went ahead and created an issue on GitHub.  Would you expect the fix to go out in a 4.0.x release, or only the 5 branch?


--
You received this message because you are subscribed to a topic in the Google Groups "Phusion Passenger Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phusion-passenger/JWmo4XQ-K0c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phusion-passen...@googlegroups.com.

To post to this group, send email to phusion-...@googlegroups.com.
Visit this group at http://groups.google.com/group/phusion-passenger.

Hongli Lai

unread,
Jun 20, 2015, 8:57:34 AM6/20/15
to phusion-passenger
Actually it's already been fixed (an hour before you posted the Github
issue): https://github.com/phusion/passenger/commit/06938807883ad1c2210bfd9b9c342acabcfeeced

The fix will only be released in the 5.x branch.
> https://groups.google.com/d/msgid/phusion-passenger/CAAcb1Yx1%3DG08H6iFYxEHzxoxk87JGaPhfDi82o9ncNytkL1RLA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages