-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FastCGI mapserv gets unexpected signal 11 when apache attempts to shutdown the process #5254
Comments
I tried to quickly reproduce this by setting |
Hi @tbonfort , thanks so much for your continued help. So I attempted to make a debug build
which is expected. Without the debug build, I am also struggling to get apache to dump cores. Maybe the signal 11 is some other issue? I'll keep after it and try to give you something to work off of. Thanks for your patience. |
A miracle occurred and it dropped a core :)
|
/Maybe/ the fact we were calling printf inside the signal handler caused an issue. Can you try out the referenced commit and report back ? |
My deleted comment spoke too soon, I reproduced the issue. Interestingly, it only happened on 4 exits out of ~410 total exits. Which is about the reproducability that I was seeing before. I feel like I am forgetting a bug in GDAL that I looked at a number of years back, I am getting old, uffties! This is GDAL 1.11.4, btw |
@akrherz Hi, we have the same issue here. Could you solve the problem with the mapserv.c version or is it a bug in GDAL? We have GDAL 1.11.3 at the moment. |
@hschiebold I have not found a solution to the problem yet. |
Has anybody tested if that commit fixed the issue? |
@jratike80 It did not fix the issue for me. |
Just to denote that I am still seeing this with mapserver 8.0.0 and to cross-reference #6385 |
To speculate what is happening, mod-fcgi is sending
I send a new fcgi request to apache and boom
Am I on the right track @rouault ? |
Not sure, this is a bit black magic for me too. But I'm wondering if we shouldn't just remove any explicit signal handling in mapserver. Can you try to just remove the following lines in mapserv.c:
I see that libfcgi installs signal handlers on SIGUSR1 in https://github.com/BlueBrain/FastCGI/blob/master/libfcgi/os_unix.c. So it might be well possible that our overriding of it causes more damages than benefits. |
Thanks @rouault , so what I tried
Now I try
I'll run this change in my "production" cough and see if there's any troubles. Thanks |
FWIW, the removal of the signal handlers appears to be working. I am unsure what to suggest though for a proper code change. Looking at the code, it seems like these handlers are only ensuring that stdout gets flushed / a current request being serviced gets finished before exiting? |
From the original commit: fbc84bc:
So the primary reason is to close db connections (note it is not implemented on Windows, so I'm not sure if it crashes db connections remain open)? |
Using a recent mapserv with FastCGI (v2.4.0) support, I find the following logged when Apache attempts to shutdown the process when it has reached its maximum request lifetime (ie
FcgidMaxRequestsPerProcess 10000
).Feb 23 10:07:39 xxx httpd[5156]: [fcgid:error] [pid 5156] mod_fcgid: process /xxx/mapserv.fcgi(24131) exit(lifetime expired), get unexpected signal 11
I assume this means an 'unclean' shutdown. I don't see any bad impacts from this, but it would be nice to resolve to keep the logs clean :) I am at a loss on how to properly debug this and provide you with some more to go on. I can easily reproduce this on my development system, so I'd be happy to do whatever you need to provide more detail!
PS, here's my question on the forums email list a few years back.
The text was updated successfully, but these errors were encountered: