apache httpd in __write_nocancel () from /lib64/libpthread.so.0

如果配置apache时出现上述错误,你也找不到别的办法,这里提供给你一个简单办法。

解决方案:
把httpd.conf里的所有跟硬盘IO有关系的配置指令都关掉,如ErrorLog,CustomLog之类的配置。

如果去掉这些IO配置后没有出现上述问题,则说明上述配置导致问题,那解决方案就来了。

我的问题是用rotatelogs 滚动这两个日志的时候出现的问题,改用脚本来滚动,问题解决。

希望对你有帮助,反正我是用这个办法解决了这个问题了。

 in __write_nocancel () from /lib64/libpthread.so.0

Reading symbols from /home/user/apps/apache-2.2.21/bin/httpd...done.
(gdb) r -X
Starting program: /home/user/apps/apache-2.2.21/bin/httpd -X
[Thread debugging using libthread_db enabled]
Detaching after fork from child process 158380.
Detaching after fork from child process 158382.
Detaching after fork from child process 158423.
Detaching after fork from child process 158425.

Program received signal SIGPIPE, Broken pipe.
0x000000315e20e4d0 in __write_nocancel () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6.x86_64 libgcc-4.4.6-4.el6.x86_64 libgomp-4.4.6-4.el6.x86_64 libstdc++-4.4.6-4.el6.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64 zlib-1.2.3-27.el6.x86_64
(gdb) bt
#0 0x000000315e20e4d0 in __write_nocancel () from /lib64/libpthread.so.0
#1 0x00007fe5a996d467 in apr_file_write (thefile=0x1a521a0, buf=0x7fff7930a220, nbytes=0x7fff79308198) at file_io/unix/readwrite.c:188
#2 0x00007fe5a996bc3b in apr_file_write_full (thefile=0x1a521a0, buf=0x7fff7930a220, nbytes=92, bytes_written=0x0) at file_io/unix/fullrw.c:53
#3 0x000000000043bd8e in log_error_core (file=0x7fe5a8942538 "mod_auth_digest.c", line=229, level=5, status=0, s=0x1a5b848, c=<value optimized out>, r=0x0, pool=0x0, fmt=0x7fe5a89422d8 "Digest: generating secret for digest authentication ...",
args=0x7fff7930c280) at log.c:696
#4 0x000000000043c2e4 in ap_log_error (file=<value optimized out>, line=<value optimized out>, level=<value optimized out>, status=<value optimized out>, s=<value optimized out>, fmt=<value optimized out>) at log.c:715
#5 0x00007fe5a8941839 in initialize_secret (p=<value optimized out>, plog=<value optimized out>, ptemp=<value optimized out>, s=0x1a5b848) at mod_auth_digest.c:229
#6 initialize_module (p=<value optimized out>, plog=<value optimized out>, ptemp=<value optimized out>, s=0x1a5b848) at mod_auth_digest.c:352
#7 0x0000000000437869 in ap_run_post_config (pconf=0x1a54138, plog=0x1a862c8, ptemp=0x1a58158, s=0x1a5b848) at config.c:94
#8 0x00000000004242d6 in main (argc=2, argv=0x7fff7930c618) at main.c:728

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>