ID:               47743
 Updated by:       j...@php.net
 Reported By:      electro at vgr dot pl
-Status:           Open
+Status:           Feedback
-Bug Type:         Reproducible crash
+Bug Type:         MySQL related
 Operating System: Mandriva 2009 x64 cooker
 PHP Version:      5.3CVS-2009-03-21 (snap)
 New Comment:

So what exactly are you using to connect to mysql now, mysql PDO 
driver or what? We need a reproduce script. And can you reproduce 
this crash with PHP 5.2.9 ?


Previous Comments:
------------------------------------------------------------------------

[2009-03-24 08:21:24] electro at vgr dot pl

I compiled the newest php snapshot without --enable-memory-limit and
--enable-embedded-mysqli. Segmentation fault still occured. Then I
recompiled with --enable-debug. Curiously, segmentation fault did NOT
happen this time. So I can't submit a backtrace. would a core file
without --enable-debug be of any help?
I also tested my php code on similar Mandriva cooker system, but 32-bit
instead of 64. Segmentation fault does not occur.

------------------------------------------------------------------------

[2009-03-22 00:16:37] johan...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

A backtrace would be nice and please add the code. Additionally: Do you
really need --enable-embedded-mysqli which links in a MySQL Server into
PHP?

------------------------------------------------------------------------

[2009-03-21 18:30:01] electro at vgr dot pl

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\...@\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) ---



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47743&edit=1

Reply via email to