Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I restart Apache 2.2.22 prefork (as installed from Debian Testing) if the Passenger 3.0.19 module is enabled then sometimes (about 50% of the time; I can restart dozens of times with the module disabled, though) it segfaults:

[Fri Feb 01 15:15:53 2013] [notice] SIGHUP received.  Attempting to restart
[Fri Feb 01 15:15:53 2013] [notice] seg fault or similar nasty error detected in the parent process

Attaching strace to the parent Apache process (i.e. running sudo strace -aef -p $(cat /var/run/apache2.pid) 2>&1 | tee strace.out and restarting it, I get:

select(0, NULL, NULL, NULL, {0, 238909}) = 0 (Timeout)
waitpid(-1, 0xbff64bc8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
waitpid(-1, 0xbff64bc8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0}) = ? ERESTARTNOHAND (To be restarted)
--- SIGHUP (Hangup) @ 0 (0) ---
sigreturn() = ? (mask now [])
rt_sigaction(SIGHUP, {SIG_IGN, [], SA_INTERRUPT}, {0xb7718c80, [HUP USR1], 0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [], SA_INTERRUPT}, {0xb7718c80, [HUP USR1], 0}, 8) = 0
getpgrp() = 32673
kill(-32673, SIGHUP) = 0
--- SIGHUP (Hangup) @ 0 (0) ---
gettimeofday({1359731753, 208533}, NULL) = 0
select(0, NULL, NULL, NULL, {0, 16384}) = 0 (Timeout)
gettimeofday({1359731753, 236019}, NULL) = 0
waitpid(437, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(438, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(439, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(440, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(441, 0xbff64b38, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {0, 65536}) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
select(0, NULL, NULL, NULL, {0, 105}) = 0 (Timeout)
gettimeofday({1359731753, 303186}, NULL) = 0
waitpid(437, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(438, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(439, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(440, 0xbff64b38, WNOHANG|WSTOPPED) = 0
waitpid(441, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 441
select(0, NULL, NULL, NULL, {0, 262144}) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
select(0, NULL, NULL, NULL, {0, 238145}) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
select(0, NULL, NULL, NULL, {0, 235519}) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
select(0, NULL, NULL, NULL, {0, 233040}) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
select(0, NULL, NULL, NULL, {0, 231767}) = 0 (Timeout)
gettimeofday({1359731753, 568539}, NULL) = 0
waitpid(437, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 437
waitpid(438, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 438
waitpid(439, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 439
waitpid(440, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 440
gettimeofday({1359731753, 569299}, NULL) = 0
write(2, "[Fri Feb 01 15:15:53 2013] [noti"..., 76) = 76
semctl(2293768, 0, IPC_64|IPC_RMID, 0xbff64d28) = 0
munmap(0xb44b6000, 512008) = 0
munmap(0xb53fb000, 366400) = 0
munmap(0xb52de000, 1166692) = 0
munmap(0xb5018000, 2906000) = 0
munmap(0xb4fcb000, 315072) = 0
munmap(0xb4f65000, 415136) = 0
munmap(0xb61ae000, 81728) = 0
munmap(0xb4e68000, 1035320) = 0
munmap(0xb4e56000, 73416) = 0
munmap(0xb4df8000, 384724) = 0
munmap(0xb61de000, 38656) = 0
munmap(0xb4df0000, 31120) = 0
munmap(0xb4dd7000, 102224) = 0
munmap(0xb4dc7000, 65448) = 0
munmap(0xb4db9000, 56552) = 0
munmap(0xb6230000, 49716) = 0
munmap(0xb5455000, 788176) = 0
munmap(0xb61e8000, 114932) = 0
munmap(0xb64de000, 37200) = 0
munmap(0xb6205000, 174580) = 0
munmap(0xb64e8000, 33044) = 0
gettimeofday({1359731753, 577430}, NULL) = 0
munmap(0xb623d000, 127840) = 0
munmap(0xb6970000, 49380) = 0
munmap(0xb5516000, 3301420) = 0
munmap(0xb6573000, 90248) = 0
munmap(0xb652c000, 286840) = 0
munmap(0xb651b000, 66460) = 0
munmap(0xb62ef000, 1276920) = 0
munmap(0xb64f1000, 168520) = 0
munmap(0xb62b6000, 232148) = 0
munmap(0xb6280000, 219492) = 0
munmap(0xb6427000, 635728) = 0
munmap(0xb625d000, 139724) = 0
munmap(0xb726b000, 11384) = 0
munmap(0xb6937000, 22144) = 0
munmap(0xb697d000, 69912) = 0
munmap(0xb67bc000, 432348) = 0
munmap(0xb693d000, 205020) = 0
munmap(0xb6792000, 168516) = 0
munmap(0xb6731000, 333220) = 0
munmap(0xb6783000, 57504) = 0
munmap(0xb6717000, 105524) = 0
munmap(0xb6676000, 111176) = 0
munmap(0xb65ae000, 815272) = 0
munmap(0xb6692000, 544748) = 0
munmap(0xb726e000, 15580) = 0
munmap(0xb659c000, 70404) = 0
munmap(0xb658a000, 70320) = 0
munmap(0xb698f000, 111368) = 0
munmap(0xb6826000, 1052672) = 0
close(24) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
chdir("/etc/apache2") = 0
rt_sigaction(SIGSEGV, {SIG_DFL, [], SA_INTERRUPT}, {SIG_DFL, [], SA_RESETHAND}, 8) = 0
gettimeofday({1359731753, 600839}, NULL) = 0
write(2, "[Fri Feb 01 15:15:53 2013] [noti"..., 100) = 100
kill(32673, SIGSEGV) = 0
sigreturn() = ? (mask now [])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 32673 detached

I've tried recompiling the module (in case the issue was related to an update to Apache or its dependencies), but no joy.

Edit: I found the Passenger users guide for Apache which suggests Passenger has been compiled against the wrong version of Apache but there was nothing to suggest (looking at dpkg --list, for example) I had more than one set of Apache headers floating around.

Just to be sure, I uninstalled then purged apache2-prefork-dev, libapr1-dev and libaprutil1-dev and re-ran the install script but I still have the same problem.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.