Apache 2.2 使用 Phusion Passenger 3.0.19 重启时发生段错误

Apache 2.2 使用 Phusion Passenger 3.0.19 重启时发生段错误

当我重新启动 Apache 2.2.22 prefork(从 Debian Testing 安装)时,如果启用了 Passenger 3.0.19 模块,则有时(大约 50% 的时间;尽管我可以在禁用该模块的情况下重新启动数十次)它会出现段错误:

[2013 年 2 月 1 日星期五 15:15:53] [通知] 已收到 SIGHUP。正在尝试重新启动
[2013 年 2 月 1 日星期五 15:15:53] [通知] 在父进程中检测到段错误或类似的严重错误

将 strace 附加到父 Apache 进程(即运行sudo strace -aef -p $(cat /var/run/apache2.pid) 2>&1 | tee strace.out并重新启动它,我得到:

选择(0,NULL,NULL,NULL,{0,238909})= 0(超时)
waitpid(-1,0xbff64bc8,WNOHANG|WSTOPPED) = 0
选择(0,NULL,NULL,NULL,{1,0})= 0(超时)
waitpid(-1,0xbff64bc8,WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0}) = ? ERESTARTNOHAND(要重新启动)
--- SIGHUP(挂断)@ 0(0)---
sigreturn() = ? (掩码现在为 [])
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
获取 pgrp() = 32673
杀死(-32673,SIGHUP)= 0
--- SIGHUP(挂断)@ 0(0)---
获取日期时间 ({1359731753, 208533}, NULL) = 0
选择(0,NULL,NULL,NULL,{0,16384})= 0(超时)
获取日期时间 ({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(要重新启动)
--- SIGCHLD(子进程退出)@0(0)---
选择(0,NULL,NULL,NULL,{0,105})= 0(超时)
获取日期时间 ({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(要重新启动)
--- SIGCHLD(子进程退出)@0(0)---
select(0, NULL, NULL, NULL, {0, 238145}) = ? ERESTARTNOHAND(要重新启动)
--- SIGCHLD(子进程退出)@0(0)---
select(0, NULL, NULL, NULL, {0, 235519}) = ? ERESTARTNOHAND(要重新启动)
--- SIGCHLD(子进程退出)@0(0)---
select(0, NULL, NULL, NULL, {0, 233040}) = ? ERESTARTNOHAND(要重新启动)
--- SIGCHLD(子进程退出)@0(0)---
选择(0,NULL,NULL,NULL,{0,231767})= 0(超时)
获取日期时间 ({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
获取日期时间 ({1359731753, 569299}, NULL) = 0
写入(2,“[2013 年 2 月 1 日星期五 15:15:53] [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
获取日期时间 ({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
关闭(24)= 0
--- SIGSEGV(分段错误)@ 0(0)---
chdir(“/etc/apache2”) = 0
rt_sigaction(SIGSEGV,{SIG_DFL,[],SA_INTERRUPT},{SIG_DFL,[],SA_RESETHAND},8) = 0
获取日期时间 ({1359731753, 600839}, NULL) = 0
写入(2,“[2013 年 2 月 1 日星期五 15:15:53] [noti”...,100)= 100
杀死(32673,SIGSEGV)= 0
sigreturn() = ? (掩码现在为 [])
--- SIGSEGV(分段错误)@ 0(0)---
进程 32673 已分离

我尝试重新编译该模块(以防问题与 Apache 或其依赖项的更新有关),但没有成功。

编辑:我发现Apache 乘客用户指南这表明 Passenger 是针对错误版本的 Apache 进行编译的,但没有任何迹象表明(例如dpkg --list,查看)我有一组以上的 Apache 标头在浮动。

为了确保万无一失,我卸载并清除了 apache2-prefork-dev、libapr1-dev 和 libaprutil1-dev,然后重新运行了安装脚本,但仍然存在同样的问题。

相关内容