Когда я перезапускаю prefork Apache 2.2.22 (как установлено из Debian Testing), если модуль Passenger 3.0.19 включен, то иногда (примерно в 50% случаев; хотя я могу перезапускать десятки раз с отключенным модулем), это вызывает ошибку:
[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
Прикрепив strace к родительскому процессу Apache (т.е. запустив sudo strace -aef -p $(cat /var/run/apache2.pid) 2>&1 | tee strace.out
и перезапустив его, я получаю:
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
Я попытался перекомпилировать модуль (в случае, если проблема была связана с обновлением Apache или его зависимостей), но без радости.
Редактировать: я нашел руководство пользователя Passenger для Apache, в котором говорится, что Passenger был скомпилирован с неверной версией Apache, но нечего было предположить (например, глядя на dpkg --list
). У меня было несколько плавающих заголовков Apache. ,
Просто чтобы быть уверенным, я удалил, затем удалил apache2-prefork-dev, libapr1-dev и libaprutil1-dev и повторно запустил скрипт установки, но у меня все еще остается та же проблема.