| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-03-22 00:16 UTC] johannes@php.net
  [2009-03-24 08:21 UTC] electro at vgr dot pl
  [2009-03-31 07:45 UTC] jani@php.net
  [2009-04-08 01:00 UTC] php-bugs at lists dot php dot net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 14:00:01 2025 UTC | 
Description: ------------ apache 2.2.11 with php compiled as module crashes upon reading from unix socket while communicating with mysql (5.1.32, pdo driver). It happens only in some specific circumstances but I haven't been able to trace it so far. What is important is that php crashes always in the same point in my application which I confirmed by stracing apache. Configure Command './configure' '--prefix=/usr/local/php5' '--with-libdir=lib64' '--with-apxs2=/usr/sbin/apxs' '--with-curl' '--with-iconv' '--with-libxml-dir' '--with-mysql' '--with-openssl' '--with-pdo-mysql' '--with-pear' '--with-pcre-regex' '--with-zlib' '--disable-all' '--disable-cgi' '--disable-ipv6' '--enable-dom' '--enable-embedded-mysqli' '--enable-libxml' '--enable-memory-limit Reproduce code: --------------- haven't been able to trace the bug to some specific code yet, but watching strace output I can see that php crashes always in the same moment. I will try to extract specific code that makes php crash. Actual result: -------------- socket(PF_FILE, SOCK_STREAM, 0) = 34 fcntl(34, F_SETFL, O_RDONLY) = 0 fcntl(34, F_GETFL) = 0x2 (flags O_RDWR) fcntl(34, F_GETFL) = 0x2 (flags O_RDWR) fcntl(34, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(34, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"...}, 110) = 0 fcntl(34, F_SETFL, O_RDWR) = 0 setsockopt(34, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 16) = 0 setsockopt(34, SOL_SOCKET, SO_SNDTIMEO, "\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 16) = 0 setsockopt(34, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported) setsockopt(34, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 poll([{fd=34, events=POLLIN}], 1, 30000) = 1 ([{fd=34, revents=POLLIN}]) read(34, "4\0\0\0\n5.1.32\0\231)\0\0t7U&ZsT-\0\377\367\300\2\0\0\0\0"..., 16384) = 56 stat("/usr/share/mysql/charsets/Index.xml", {st_mode=S_IFREG|0644, st_size=18261, ...}) = 0 open("/usr/share/mysql/charsets/Index.xml", O_RDONLY) = 35 read(35, "<?xml version='1.0' encoding=\"utf"..., 18261) = 18261 close(35) = 0 write(34, "A\0\0\1\215\242\3\0\0\0\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69) = 69 read(34, "\1\0\0\2\376"..., 16384) = 5 write(34, "\t\0\0\3OUGUSPI]\0"..., 13) = 13 read(34, "\7\0\0\4\0\0\0\2\0\0\0"..., 16384) = 11 poll([{fd=34, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout) write(34, "\17\0\0\0\3SET NAMES utf8"..., 19) = 19 read(34, "\7\0\0\1\0\0\0\2\0\0\0"..., 16384) = 11 poll([{fd=34, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout) write(34, "\224\0\0\0\3SELECT `id`,`name`,`comment`"..., 152) = 152 read(34, "\1\0\0\1\0071\0\0\2\3def\5Lazer\tRightType\tRig"..., 16384) = 480 --- SIGSEGV (Segmentation fault) @ 0 (0) ---