And*_*ann 8 server debugging apache2 gdb 14.10
我的 14.10 Ubuntu 服务器有问题。执行某些操作后,我的 apache2 重新启动并出现分段错误错误。为了调试这个问题,我想创建一个核心转储。我做了以下工作:
CoreDumpDirectory /tmp/apache-coredumps到配置文件中ulimit -c unlimitedapt-get install apache2-dbg php5-dbgapache并导致错误。日志声称目录中可能有核心转储,但它是空的。我也尝试在 apache2 的可执行文件上直接使用 gdb,但是 apache 除非通过apachectl或启动,否则不会启动service apache2 start。
如何获得核心转储来调试我的问题或如何gdb直接附加到 apache?
ulimit -c unlimited只影响你当前的 shell。
您可以通过查看输出来确认这一点cat /proc/$(pidof -s apache2)。
我添加ulimit -c unlimited到/etc/default/apache2现在cat /proc/$(pidof -s apache2)/limits包括
Max core file size unlimited unlimited bytes
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8785 次 |
| 最近记录: |