<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yoichi Kawasaki&#039;s Web &#187; ubuntu</title>
	<atom:link href="http://yk55.com/blog/tags/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://yk55.com/blog</link>
	<description>the place to organize and record my ideas ...</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:16:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- google_ad_section_end --><!-- google_ad_section_start(weight=ignore) -->	<item>
		<title>Segmentation fault(11) &#8211; Apache2 and libphp5.so on Ubuntu</title>
		<link>http://yk55.com/blog/2010/11/30/php5apache2_segmentation_fault_under_ubuntu/</link>
		<comments>http://yk55.com/blog/2010/11/30/php5apache2_segmentation_fault_under_ubuntu/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 15:32:11 +0000</pubDate>
		<dc:creator>yoichi</dc:creator>
				<category><![CDATA[Environment Setup]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://yk55.com/blog/?p=434</guid>
		<description><![CDATA[Ubuntu10.04.1LTSでApache2、PHP5.3がうまく動いてくれない。 同一バージョンのApache、PHPを依存ライブラリをほぼ同じにしてdebian Lennyで試してみると問題なく動作する。 どうにもこうにもならないので後々のためにとりあえず記録だけ残しておく。 1. PROBLEM: Apache2 Segmentation fault(11) [Sun Nov 28 17:42:48 2010] [notice] Apache/2.2.2 (Unix) PHP/5.3.3 configured -- resuming normal operations [Sun Nov 28 17:42:48 2010] [notice] child pid 13032 exit signal Segmentation fault (11) [Sun Nov 28 17:42:49 2010] [notice] child pid 13033 exit signal Segmentation fault (11) [Sun Nov 28 17:42:52 [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu10.04.1LTSでApache2、PHP5.3がうまく動いてくれない。 同一バージョンのApache、PHPを依存ライブラリをほぼ同じにしてdebian Lennyで試してみると問題なく動作する。 どうにもこうにもならないので後々のためにとりあえず記録だけ残しておく。 </p>
<p><h2><strong>1. PROBLEM: Apache2 Segmentation fault(11)</strong></h2>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[Sun Nov 28 17:42:48 2010] [notice] Apache/2.2.2 (Unix) PHP/5.3.3 configured -- resuming normal operations<br />
[Sun Nov 28 17:42:48 2010] [notice] child pid 13032 exit signal Segmentation fault (11)<br />
[Sun Nov 28 17:42:49 2010] [notice] child pid 13033 exit signal Segmentation fault (11)<br />
[Sun Nov 28 17:42:52 2010] [notice] child pid 13034 exit signal Segmentation fault (11)<br />
[Sun Nov 28 17:42:56 2010] [notice] child pid 13035 exit signal Segmentation fault (11)</div></div>
<p><h2><strong>2. Environments</strong></h2>
<p><h4><strong>Installations: apache-2.2.2</strong></h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tar zxf httpd-2.2.2.tar.gz<br />
cd httpd-2.2.2<br />
<br />
CC=&quot;gcc&quot; OPTIM=&quot;-O2&quot; \<br />
&nbsp;./configure \<br />
&nbsp;--prefix=/home/apache-2.2.2 \<br />
&nbsp;--with-layout=Apache \<br />
&nbsp;--enable-rewrite \<br />
&nbsp;--disable-userdir \<br />
&nbsp;--enable-auth_dbm \<br />
&nbsp;--enable-usertrack \<br />
&nbsp;--enable-=so \<br />
&nbsp;--enable-proxy \<br />
&nbsp;--enable-proxy-http \<br />
&nbsp;--enable-proxy-connect \<br />
&nbsp;--enable-speling \<br />
&nbsp;--enable-headers \<br />
&nbsp;--enable-expires \<br />
&nbsp;--enable-setenvif \<br />
&nbsp;--enable-cache \<br />
&nbsp;--enable-disk-cache \<br />
&nbsp;--enable-mem-cache \<br />
&nbsp;--enable-info \<br />
&nbsp;--enable-rule=SHARED_CORE \<br />
&nbsp;--verbose<br />
<br />
make <br />
sudo make install<br />
sudo ln -s /home/apache-2.2.2 /home/apache</div></div>
<p><h4><strong>Installations: PHP-5.3.3</strong></h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tar zxvf php-5.3.3.tar.gz<br />
cd php-5.3.3<br />
./configure \<br />
&nbsp; &nbsp; --with-apxs2=/home/apache/bin/apxs \<br />
&nbsp; &nbsp; --with-mysql=/home/mysql \<br />
&nbsp; &nbsp; --with-curl=/usr/lib \<br />
&nbsp; &nbsp; --with-zlib \<br />
&nbsp; &nbsp; --enable-mbstring \<br />
&nbsp; &nbsp; --enable-mbregex \<br />
<br />
make<br />
sudo make install</div></div>
<p><h4><strong>Linux distribution Info</strong></h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ lsb_release -a <br />
No LSB modules are available.<br />
Distributor ID: Ubuntu<br />
Description: &nbsp; &nbsp;Ubuntu 10.04.1 LTS<br />
Release: &nbsp; &nbsp; &nbsp; &nbsp;10.04<br />
Codename: &nbsp; &nbsp; &nbsp; lucid</div></div>
<p><h4><strong>Apache Info</strong></h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ /home/apache/bin/apachectl -V<br />
<br />
Server version: Apache/2.2.2<br />
Server built: &nbsp; Apr &nbsp;4 2010 10:26:51<br />
Server's Module Magic Number: 20051115:2<br />
Server loaded: &nbsp;APR 1.2.7, APR-Util 1.2.7<br />
Compiled using: APR 1.2.7, APR-Util 1.2.7<br />
Architecture: &nbsp; 32-bit<br />
Server MPM: &nbsp; &nbsp; Prefork<br />
&nbsp; threaded: &nbsp; &nbsp; no<br />
&nbsp; &nbsp; forked: &nbsp; &nbsp; yes (variable process count)<br />
Server compiled with....<br />
&nbsp;-D APACHE_MPM_DIR=&quot;server/mpm/prefork&quot; &nbsp; &nbsp; &lt;--- サーバは MPM/Prefork<br />
&nbsp;-D APR_HAS_SENDFILE<br />
&nbsp;-D APR_HAS_MMAP<br />
&nbsp;-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)<br />
&nbsp;-D APR_USE_SYSVSEM_SERIALIZE<br />
&nbsp;-D APR_USE_PTHREAD_SERIALIZE<br />
&nbsp;-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT<br />
&nbsp;-D APR_HAS_OTHER_CHILD<br />
&nbsp;-D AP_HAVE_RELIABLE_PIPED_LOGS<br />
&nbsp;-D DYNAMIC_MODULE_LIMIT=128<br />
&nbsp;-D HTTPD_ROOT=&quot;/home/apache-2.2.2&quot;<br />
&nbsp;-D SUEXEC_BIN=&quot;/home/apache-2.2.2/bin/suexec&quot;<br />
&nbsp;-D DEFAULT_PIDLOG=&quot;logs/httpd.pid&quot;<br />
&nbsp;-D DEFAULT_SCOREBOARD=&quot;logs/apache_runtime_status&quot;<br />
&nbsp;-D DEFAULT_LOCKFILE=&quot;logs/accept.lock&quot;<br />
&nbsp;-D DEFAULT_ERRORLOG=&quot;logs/error_log&quot;<br />
&nbsp;-D AP_TYPES_CONFIG_FILE=&quot;conf/mime.types&quot;<br />
&nbsp;-D SERVER_CONFIG_FILE=&quot;conf/httpd.conf&quot;</div></div>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ /home/apache/bin/apachectl -M<br />
<br />
Loaded Modules:<br />
&nbsp;core_module (static)<br />
&nbsp;authn_file_module (static)<br />
&nbsp;authn_default_module (static)<br />
&nbsp;authz_host_module (static)<br />
&nbsp;authz_groupfile_module (static)<br />
&nbsp;authz_user_module (static)<br />
&nbsp;authz_default_module (static)<br />
&nbsp;auth_basic_module (static)<br />
&nbsp;cache_module (static)<br />
&nbsp;disk_cache_module (static)<br />
&nbsp;mem_cache_module (static)<br />
&nbsp;include_module (static)<br />
&nbsp;filter_module (static)<br />
&nbsp;log_config_module (static)<br />
&nbsp;env_module (static)<br />
&nbsp;expires_module (static)<br />
&nbsp;headers_module (static)<br />
&nbsp;usertrack_module (static)<br />
&nbsp;setenvif_module (static)<br />
&nbsp;proxy_module (static)<br />
&nbsp;proxy_connect_module (static)<br />
&nbsp;proxy_ftp_module (static)<br />
&nbsp;proxy_http_module (static)<br />
&nbsp;proxy_ajp_module (static)<br />
&nbsp;proxy_balancer_module (static)<br />
&nbsp;mpm_prefork_module (static)<br />
&nbsp;http_module (static)<br />
&nbsp;mime_module (static)<br />
&nbsp;status_module (static)<br />
&nbsp;autoindex_module (static)<br />
&nbsp;asis_module (static)<br />
&nbsp;info_module (static)<br />
&nbsp;cgi_module (static)<br />
&nbsp;negotiation_module (static)<br />
&nbsp;dir_module (static)<br />
&nbsp;actions_module (static)<br />
&nbsp;speling_module (static)<br />
&nbsp;alias_module (static)<br />
&nbsp;rewrite_module (static)<br />
&nbsp;so_module (static)<br />
&nbsp;php5_module (shared)<br />
Syntax OK</div></div>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ldd /home/apache/bin/httpd &nbsp; &nbsp;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; linux-gate.so.1 =&gt; &nbsp;(0x00ed3000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libm.so.6 =&gt; /lib/tls/i686/cmov/libm.so.6 (0x006c4000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libaprutil-1.so.0 =&gt; /home/apache-2.2.2/lib/libaprutil-1.so.0 (0x00586000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libexpat.so.1 =&gt; /lib/libexpat.so.1 (0x0087a000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libapr-1.so.0 =&gt; /home/apache-2.2.2/lib/libapr-1.so.0 (0x00f91000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; librt.so.1 =&gt; /lib/tls/i686/cmov/librt.so.1 (0x0093b000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libcrypt.so.1 =&gt; /lib/tls/i686/cmov/libcrypt.so.1 (0x005ce000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libpthread.so.0 =&gt; /lib/tls/i686/cmov/libpthread.so.0 (0x00115000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libdl.so.2 =&gt; /lib/tls/i686/cmov/libdl.so.2 (0x00964000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libc.so.6 =&gt; /lib/tls/i686/cmov/libc.so.6 (0x00413000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; /lib/ld-linux.so.2 (0x00d4f000)</div></div>
<p><h4><strong>PHP Info</strong></h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ php -i <br />
<br />
phpinfo()<br />
PHP Version =&gt; 5.3.3<br />
<br />
System =&gt; Linux ubuntu-xps 2.6.32-26-generic #47-Ubuntu SMP Wed Nov 17 15:59:05 UTC 2010 i686<br />
Build Date =&gt; Nov 28 2010 19:21:06<br />
Configure Command =&gt; &nbsp;'./configure' &nbsp;'--with-apxs2=/home/apache/bin/apxs' '--with-mysql=/home/mysql' '--with-curl=/usr/lib' '--with-zlib' '--enable-mbstring' '--enable-mbregex'<br />
Server API =&gt; Command Line Interface<br />
Virtual Directory Support =&gt; disabled<br />
Configuration File (php.ini) Path =&gt; /usr/local/lib<br />
Loaded Configuration File =&gt; (none)<br />
Scan this dir for additional .ini files =&gt; (none)<br />
Additional .ini files parsed =&gt; (none)<br />
PHP API =&gt; 20090626<br />
PHP Extension =&gt; 20090626<br />
Zend Extension =&gt; 220090626<br />
Zend Extension Build =&gt; API220090626,NTS<br />
PHP Extension Build =&gt; API20090626,NTS<br />
Debug Build =&gt; no<br />
Thread Safety =&gt; disabled<br />
Zend Memory Manager =&gt; enabled<br />
Zend Multibyte Support =&gt; disabled<br />
IPv6 Support =&gt; enabled<br />
Registered PHP Streams =&gt; compress.zlib, php, file, glob, data, http, ftp, phar &nbsp;<br />
Registered Stream Socket Transports =&gt; tcp, udp, unix, udg<br />
Registered Stream Filters =&gt; zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk<br />
<br />
<br />
This program makes use of the Zend Scripting Language Engine:<br />
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies</div></div>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ php -m<br />
<br />
[PHP Modules]<br />
Core<br />
ctype<br />
curl<br />
date<br />
dom<br />
ereg<br />
fileinfo<br />
filter<br />
hash<br />
iconv<br />
json<br />
libxml<br />
mbstring<br />
mysql<br />
pcre<br />
PDO<br />
pdo_sqlite<br />
Phar<br />
posix<br />
Reflection<br />
session<br />
SimpleXML<br />
SPL<br />
SQLite<br />
sqlite3<br />
standard<br />
tokenizer<br />
xml<br />
xmlreader<br />
xmlwriter<br />
zlib<br />
<br />
[Zend Modules]</div></div>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ldd /home/apache/modules/libphp5.so <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; linux-gate.so.1 =&gt; &nbsp;(0x00569000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libcrypt.so.1 =&gt; /lib/tls/i686/cmov/libcrypt.so.1 (0x00110000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; librt.so.1 =&gt; /lib/tls/i686/cmov/librt.so.1 (0x001f6000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libmysqlclient.so.16 =&gt; /home/mysql-5.1.30/lib/mysql/libmysqlclient.so.16 (0x00356000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libz.so.1 =&gt; /lib/libz.so.1 (0x00142000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libm.so.6 =&gt; /lib/tls/i686/cmov/libm.so.6 (0x00157000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libdl.so.2 =&gt; /lib/tls/i686/cmov/libdl.so.2 (0x0017d000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libnsl.so.1 =&gt; /lib/tls/i686/cmov/libnsl.so.1 (0x00181000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libcurl.so.4 =&gt; /usr/lib/libcurl.so.4 (0x00198000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libxml2.so.2 =&gt; /usr/lib/libxml2.so.2 (0x001ff000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libc.so.6 =&gt; /lib/tls/i686/cmov/libc.so.6 (0x00e02000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libpthread.so.0 =&gt; /lib/tls/i686/cmov/libpthread.so.0 (0x001dd000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; /lib/ld-linux.so.2 (0x00339000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libidn.so.11 =&gt; /usr/lib/libidn.so.11 (0x004ad000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; liblber-2.4.so.2 =&gt; /usr/lib/liblber-2.4.so.2 (0x0032a000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libldap_r-2.4.so.2 =&gt; /usr/lib/libldap_r-2.4.so.2 (0x004df000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libgssapi_krb5.so.2 =&gt; /usr/lib/libgssapi_krb5.so.2 (0x00526000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libssl.so.0.9.8 =&gt; /lib/i686/cmov/libssl.so.0.9.8 (0x00f5c000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libcrypto.so.0.9.8 =&gt; /lib/i686/cmov/libcrypto.so.0.9.8 (0x00fa4000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libresolv.so.2 =&gt; /lib/tls/i686/cmov/libresolv.so.2 (0x00555000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libsasl2.so.2 =&gt; /usr/lib/libsasl2.so.2 (0x1ca3d000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libgnutls.so.26 =&gt; /usr/lib/libgnutls.so.26 (0x1eb4b000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libkrb5.so.3 =&gt; /usr/lib/libkrb5.so.3 (0x14a7f000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libk5crypto.so.3 =&gt; /usr/lib/libk5crypto.so.3 (0x19f18000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libcom_err.so.2 =&gt; /lib/libcom_err.so.2 (0x13a74000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libkrb5support.so.0 =&gt; /usr/lib/libkrb5support.so.0 (0x0c97e000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libkeyutils.so.1 =&gt; /lib/libkeyutils.so.1 (0x0d073000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libtasn1.so.3 =&gt; /usr/lib/libtasn1.so.3 (0x0b5c2000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libgcrypt.so.11 =&gt; /lib/libgcrypt.so.11 (0x09524000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; libgpg-error.so.0 =&gt; /lib/libgpg-error.so.0 (0x07565000)</div></div>
<p><h2><strong>3. Debugging Info</strong></h2>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo gdb ./httpd<br />
<br />
GNU gdb (GDB) 7.1-ubuntu<br />
Copyright (C) 2010 Free Software Foundation, Inc.<br />
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;<br />
This is free software: you are free to change and redistribute it.<br />
There is NO WARRANTY, to the extent permitted by law. &nbsp;Type &quot;show copying&quot;<br />
and &quot;show warranty&quot; for details.<br />
This GDB was configured as &quot;i486-linux-gnu&quot;.<br />
For bug reporting instructions, please see:<br />
&lt;http://www.gnu.org/software/gdb/bugs/&gt;...<br />
Reading symbols from /home/apache-2.2.2/bin/httpd...done.<br />
<br />
(gdb) b ap_process_request<br />
Breakpoint 1 at 0x80b2409: file http_request.c, line 252.<br />
(gdb) run -X -d /home/apache<br />
Starting program: /home/apache-2.2.2/bin/httpd -X -d /home/apache<br />
[Thread debugging using libthread_db enabled]<br />
<br />
Breakpoint 1, ap_process_request (r=0x831e390) at http_request.c:252<br />
252 &nbsp; &nbsp; &nbsp; &nbsp; if (ap_extended_status)<br />
(gdb) n<br />
235 &nbsp; &nbsp; {<br />
(gdb) n<br />
252 &nbsp; &nbsp; &nbsp; &nbsp; if (ap_extended_status)<br />
(gdb) n<br />
254 &nbsp; &nbsp; &nbsp; &nbsp; access_status = ap_run_quick_handler(r, 0); &nbsp;/* Not a look-up request */<br />
(gdb) n<br />
255 &nbsp; &nbsp; &nbsp; &nbsp; if (access_status == DECLINED) {<br />
(gdb) n<br />
256 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; access_status = ap_process_request_internal(r);<br />
(gdb) n<br />
257 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (access_status == OK) {<br />
(gdb) n<br />
258 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; access_status = ap_invoke_handler(r);<br />
(gdb) n<br />
<br />
Program received signal SIGSEGV, Segmentation fault.<br />
0x0079b611 in php_handler (r=0x831e390)<br />
&nbsp; &nbsp; at /home/kawasaki/src/php/php-5.3.3/sapi/apache2handler/sapi_apache2.c:550<br />
550 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf = ap_get_module_config(r-&gt;per_dir_config, &amp;php5_module);<br />
(gdb) n<br />
<br />
(gdb) bt<br />
#0 &nbsp;0x0079b611 in php_handler (r=0x831e390)<br />
&nbsp; &nbsp; at /home/kawasaki/src/php/php-5.3.3/sapi/apache2handler/sapi_apache2.c:550<br />
#1 &nbsp;0x0807aa47 in ap_run_handler (r=0x831e390) at config.c:157<br />
#2 &nbsp;0x0807db31 in ap_invoke_handler (r=0x831e390) at config.c:371<br />
#3 &nbsp;0x080b2578 in ap_process_request (r=0x831e390) at http_request.c:258<br />
#4 &nbsp;0x080af81e in ap_process_http_connection (c=0x8314348) at http_core.c:172<br />
#5 &nbsp;0x080817c7 in ap_run_process_connection (c=0x8314348) at connection.c:43<br />
#6 &nbsp;0x080cf1d4 in child_main (child_num_arg=&lt;value optimised out&gt;) at prefork.c:640<br />
#7 &nbsp;0x080cf434 in make_child (s=0x8109f78, slot=0) at prefork.c:680<br />
#8 &nbsp;0x080d01fa in ap_mpm_run (_pconf=0x81010a8, plog=0x814b1d0, s=0x8109f78)<br />
&nbsp; &nbsp; at prefork.c:956<br />
#9 &nbsp;0x0806872f in main (argc=135262496, argv=0x0) at main.c:717</div></div>
<p>参考: <a href="http://httpd.apache.org/dev/debugging.html#gdb">Apache Debugging Guide: Using gdb</a></p>
<p>落ちている箇所、php_handler (php-5.3.3/sapi/apache2handler/sapi_apache2.c:550)のソースコード</p>
<div class="codecolorer-container c mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000dd;">538</span> <span style="color: #993333;">static</span> <span style="color: #993333;">int</span> php_handler<span style="color: #009900;">&#40;</span>request_rec <span style="color: #339933;">*</span>r<span style="color: #009900;">&#41;</span><br />
<span style="color: #0000dd;">539</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #0000dd;">540</span> &nbsp; &nbsp; php_struct <span style="color: #339933;">*</span> <span style="color: #993333;">volatile</span> ctx<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">541</span> &nbsp; &nbsp; <span style="color: #993333;">void</span> <span style="color: #339933;">*</span>conf<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">542</span> &nbsp; &nbsp; apr_bucket_brigade <span style="color: #339933;">*</span> <span style="color: #993333;">volatile</span> brigade<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">543</span> &nbsp; &nbsp; apr_bucket <span style="color: #339933;">*</span>bucket<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">544</span> &nbsp; &nbsp; apr_status_t rv<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">545</span> &nbsp; &nbsp; request_rec <span style="color: #339933;">*</span> <span style="color: #993333;">volatile</span> parent_req <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">546</span> &nbsp; &nbsp; TSRMLS_FETCH<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">547</span><br />
<span style="color: #0000dd;">548</span> <span style="color: #339933;">#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);</span><br />
<span style="color: #0000dd;">549</span><br />
<span style="color: #0000dd;">550</span> &nbsp; &nbsp; conf <span style="color: #339933;">=</span> ap_get_module_config<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">-&gt;</span>per_dir_config<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>php5_module<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">551</span><br />
<span style="color: #0000dd;">552</span> &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* apply_config() needs r in some cases, so allocate server_context early */</span><br />
<span style="color: #0000dd;">553</span> &nbsp; &nbsp; ctx <span style="color: #339933;">=</span> SG<span style="color: #009900;">&#40;</span>server_context<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">554</span> &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>ctx <span style="color: #339933;">==</span> NULL <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>ctx <span style="color: #339933;">&amp;&amp;</span> ctx<span style="color: #339933;">-&gt;</span>request_processed <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>strcmp<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">-&gt;</span>protocol<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;INCLUDED&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #0000dd;">555</span> normal<span style="color: #339933;">:</span><br />
<span style="color: #0000dd;">556</span> &nbsp; &nbsp; &nbsp; &nbsp; ctx <span style="color: #339933;">=</span> SG<span style="color: #009900;">&#40;</span>server_context<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> apr_pcalloc<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">-&gt;</span>pool<span style="color: #339933;">,</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">*</span>ctx<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">557</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* register a cleanup so we clear out the SG(server_context)<br />
558 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* after each request. Note: We pass in the pointer to the<br />
559 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* server_context in case this is handled by a different thread.<br />
560 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span><br />
<span style="color: #0000dd;">561</span> &nbsp; &nbsp; &nbsp; &nbsp; apr_pool_cleanup_register<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">-&gt;</span>pool<span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span> <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;</span>SG<span style="color: #009900;">&#40;</span>server_context<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> php_server_context_cleanup<span style="color: #339933;">,</span> apr_pool_cleanup_null<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">562</span> &nbsp; &nbsp; &nbsp; &nbsp; ctx<span style="color: #339933;">-&gt;</span>r <span style="color: #339933;">=</span> r<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">563</span> &nbsp; &nbsp; &nbsp; &nbsp; ctx <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span> <span style="color: #808080; font-style: italic;">/* May look weird to null it here, but it is to catch the right case in the first_try later on */</span><br />
<span style="color: #0000dd;">564</span> &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #0000dd;">565</span> &nbsp; &nbsp; &nbsp; &nbsp; parent_req <span style="color: #339933;">=</span> ctx<span style="color: #339933;">-&gt;</span>r<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">566</span> &nbsp; &nbsp; &nbsp; &nbsp; ctx<span style="color: #339933;">-&gt;</span>r <span style="color: #339933;">=</span> r<span style="color: #339933;">;</span><br />
<span style="color: #0000dd;">567</span> &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #0000dd;">568</span> &nbsp; &nbsp; apply_config<span style="color: #009900;">&#40;</span>conf<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>php5 モジュールの設定情報読み込み時にSegmentation fault(11)でApacheがCrashしている。 理由がわからない。とりあえず調査はここで止め、Apacheの設定ファイルからはphp5 モジュールのロード設定をはずしている。 早まった考えかもしれないがPHPを使うのやめてしまおうかと思っている今日この頃。PHPなんて。。</p>
<p>おわり</p>
<p><h2><strong>追記 2010.12.05</strong></h2>
<p>Apache-2.2.2、PHP-5.3.3共にアンインストールして再インストールしたところ問題なく動いてしまった。evidenceを集め、問題を特定する、それしかないと思い込み（だらだらと）調査していたのでとりあえず再インストールしてみる選択肢は頭になかった。結論として、（素人ぽくてアレなんだけど）困ったときは再インストールしろ &#8211; ということだ。 </p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://yk55.com/blog/2010/11/30/php5apache2_segmentation_fault_under_ubuntu/&amp;layout=button_count&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=arial" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://yk55.com/blog/2010/11/30/php5apache2_segmentation_fault_under_ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgraded to Ubuntu 10.04 LTS</title>
		<link>http://yk55.com/blog/2010/06/03/upgraded_to_ubuntu1004lts/</link>
		<comments>http://yk55.com/blog/2010/06/03/upgraded_to_ubuntu1004lts/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 11:24:20 +0000</pubDate>
		<dc:creator>yoichi</dc:creator>
				<category><![CDATA[Random Topics]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://yk55.com/blog/?p=349</guid>
		<description><![CDATA[3月にXPS M1210にUbuntu 9.10を入れたばかりではあるが4月末にUbuntu 10.04 LTSがリリースされて各所でその完成度の高さが謳われていたのでタイミングを見計らってアップグレードしてみた。9.10からは10.04LTSに直接アップグレードが可能。 今回はアップデートマネジャーの指示に従いポチポチボタンを押しただけ。 so easy, so goodだよ。 Ubuntu 10.04 LTSリリースノート Ubuntu 10.04 LTSへアップグレードを行うには]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/yk55/4652598485/" title="Ubuntu 10.04 LTS by yoichi*, on Flickr"><img src="http://farm5.static.flickr.com/4026/4652598485_fe9d7b7689_b.jpg" width="700" height="438" alt="Ubuntu 10.04 LTS" /></a></p>
<p><a href="http://yk55.com/blog/2010/03/27/ubuntu910_on_my_dell_xpsm1210/">3月</a>にXPS M1210にUbuntu 9.10を入れたばかりではあるが4月末にUbuntu 10.04 LTSがリリースされて各所でその完成度の高さが謳われていたのでタイミングを見計らってアップグレードしてみた。9.10からは10.04LTSに直接アップグレードが可能。 今回はアップデートマネジャーの指示に従いポチポチボタンを押しただけ。 so easy, so goodだよ。</p>
<p><a href="https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ja">Ubuntu 10.04 LTSリリースノート</a><br />
<a href="https://wiki.ubuntulinux.jp/UbuntuTips/Install/UpgradeLucid">Ubuntu 10.04 LTSへアップグレードを行うには</a></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://yk55.com/blog/2010/06/03/upgraded_to_ubuntu1004lts/&amp;layout=button_count&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=arial" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://yk55.com/blog/2010/06/03/upgraded_to_ubuntu1004lts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 on my Dell XPS M1210</title>
		<link>http://yk55.com/blog/2010/03/27/ubuntu910_on_my_dell_xpsm1210/</link>
		<comments>http://yk55.com/blog/2010/03/27/ubuntu910_on_my_dell_xpsm1210/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 14:22:48 +0000</pubDate>
		<dc:creator>yoichi</dc:creator>
				<category><![CDATA[Random Topics]]></category>
		<category><![CDATA[colinux]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://yk55.com/blog/?p=286</guid>
		<description><![CDATA[Vista on Dell XPS M1210（CeleronM,1GMEM）というサイテーに遅いOSの上でvmwareやcolinuxを通じてLinuxを動かしているとそのあまりの遅さに端末を捨ててしまいたくなる衝動にかられていた。なのでたまにTV見ながら膝上に乗せて遊んであげていたけどその遅さ故に使うことが憚られその存在は忘れがちに。 そこで試しに入れてみたUbuntu 9.10。 デュアルブートではなく男らしくフルUbuntu。 Hibernateも問題なく動作しているしサクサク動いて快適。 よみがえったよXPS M1210。]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/yk55/4467092436/" title="Ubuntu 9.10 on my Dell XPS M1210 by yoichi*, on Flickr"><img src="http://farm5.static.flickr.com/4001/4467092436_3788a795e7_o.png" width="700" height="438" alt="Ubuntu 9.10 on my Dell XPS M1210" /></a></p>
<p>
Vista on Dell XPS M1210（CeleronM,1GMEM）というサイテーに遅いOSの上で<a href="http://www.vmware.com/">vmware</a>や<a href="http://www.colinux.org/">colinux</a>を通じてLinuxを動かしているとそのあまりの遅さに端末を捨ててしまいたくなる衝動にかられていた。なのでたまにTV見ながら膝上に乗せて遊んであげていたけどその遅さ故に使うことが憚られその存在は忘れがちに。 そこで試しに入れてみた<a href="http://www.ubuntu.com/">Ubuntu</a> 9.10。 デュアルブートではなく男らしくフルUbuntu。 Hibernateも問題なく動作しているしサクサク動いて快適。 よみがえったよXPS M1210。</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://yk55.com/blog/2010/03/27/ubuntu910_on_my_dell_xpsm1210/&amp;layout=button_count&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=arial" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://yk55.com/blog/2010/03/27/ubuntu910_on_my_dell_xpsm1210/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	<!-- google_ad_section_end --><!-- google_ad_section_start(weight=ignore) --></channel>
</rss>

