#45066 [Opn->Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Debian 4.0 / x86_64 PHP Version: 5.2.6 New Comment: Please try without Suhosin patch. Previous Comments: [2008-07-30 15:09:40] apex at xepa dot nl Correction the the above post, although it's running now I seem to be getting some segmentation faults, it does not happen all the time mind you. It could be related, this backtrace is without debugging symbols. If needed I can recompile to add a debug backtrace too. -- Command: gdb /usr/bin/php5 (gdb) run -v [New Thread -1224143984 (LWP 15600)] PHP 5.2.6-2 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 3 2008 07:52:34) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies (no debugging symbols found) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1224201328 (zombie)] 0xb78333af in _Unwind_FindEnclosingFunction () from /lib/libgcc_s.so.1 (gdb) bt #0 0xb78333af in _Unwind_FindEnclosingFunction () from /lib/libgcc_s.so.1 #1 0xb7833c43 in _Unwind_Backtrace () from /lib/libgcc_s.so.1 #2 0xb7833d6b in _Unwind_ForcedUnwind () from /lib/libgcc_s.so.1 #3 0xb785f7a6 in _Unwind_ForcedUnwind () from /lib/i686/cmov/libpthread.so.0 #4 0xb785d211 in __pthread_unwind () from /lib/i686/cmov/libpthread.so.0 #5 0xb78575f0 in pthread_exit () from /lib/i686/cmov/libpthread.so.0 #6 0xb7a97f14 in pthread_exit () from /lib/i686/cmov/libc.so.6 #7 0xb71e0e1e in ?? () --- strace of the same thing I mailed to andrey at php dot net -- [2008-07-30 14:55:27] apex at xepa dot nl Seems this bug is related to /usr/lib/libmysqlclient_r.so.15. Was using 5.0.32, which I upgraded to 5.0.51 and now mysql and mysqli can run together again. -- Michiel Brandenburg [2008-07-22 14:11:10] dirk at bean-it dot nl mysqlnd is yet to be released for production use... So for now, that seems not to be the way. I'll upgrade the mysql libs on a test machine after my vacation (after august 5th, that is). I'll post my findings here. Thanks for looking in to this! Cheers, Dirk [2008-07-21 18:16:20] [EMAIL PROTECTED] Which means that one will be better served with mysqlnd? [2008-07-17 23:09:21] [EMAIL PROTECTED] By the looks of the valgrind output, IMO, this is some bug in the mysql lib. Try google for __lll_mutex_lock_wait and you get plenty of hits pointing to discussion forums. Corrupted heap, -lpthread vs -pthread, etc. among the possible problems.. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/45066 -- Edit this bug report at http://bugs.php.net/?id=45066&edit=1
#45066 [Opn->Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Debian 4.0 / x86_64 PHP Version: 5.2.6 New Comment: One last question: Are you able to reproduce this problem on any other machine? Previous Comments: [2008-07-16 06:33:56] dirk at bean-it dot nl OK, here is the full valgrind output, minus the php output, to shorten things a little. Cheers, Dirk ==29926== Memcheck, a memory error detector. ==29926== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==29926== Using LibVEX rev 1658, a library for dynamic binary translation. ==29926== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==29926== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework. ==29926== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==29926== For more details, rerun with: -v ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AB3: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AC2: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AD1: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x4006E47: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x400B8A2: (within /lib/ld-2.3.6.so) ==29926==by 0x400733A: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
#45066 [Opn->Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Debian 4.0 / x86_64 PHP Version: 5.2.6 New Comment: Can you try with valgrind: # USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -i Previous Comments: [2008-07-15 15:08:08] dirk at bean-it dot nl Just out of curiosity, I've tried to compile the 5.2 and 5.3 snapshots using: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config They both hang like 5.2.6. Cheers, Dirk [2008-07-15 14:58:42] dirk at bean-it dot nl Hi, Thank you for your replies. First off all, some answers: OS: Debian 4.0 (etch) Kernel: Linux 2.6.18-6-amd64 #1 SMP 2008 x86_64 GNU/Linux (Stock Debian kernel) CPU: 2 x Intel(R) Xeon(R) CPU 5130 @ 2.00GHz Mysql version: mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) (Stock Debian Mysql 5.0) Apache version: apache2-mpm-prefork 2.2.3-4+etch4 Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 && make clean && make # sapi/cli/php -v Gives me a working php, no problem. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd && make clean && make # sapi/cli/php -v Gives me a working php, no problem. Used php-mysqlnd-5.0.1-beta. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd --with-mysql=/usr && make clean && make # sapi/cli/php -v Gives me a working php, no problem. Just to be very sure, I've tried to build php again, using a fresh source tree and this cmd line: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Which still gives me the non-responsive PHP. Kind regards, Dirk [2008-07-14 21:04:18] [EMAIL PROTECTED] Also it might be good to know if you can reproduce this without enabling any mysql stuff at all. Try this configure line: # rm config.cache # ./configure --disable-all --with-apxs2 && make clean && make # sapi/cli/php -v That should work? What Apache MPM have you enabled btw? Note: Please give us also the basic info Uwe asked above.. [2008-07-14 19:42:55] [EMAIL PROTECTED] No idea, but I'd like to know what "Linux x86" means. What's the OS, what's the CPU, what MySQL version. Does the problem exist with mysqlnd? [2008-07-07 08:49:43] dirk at bean-it dot nl Ok, i've tried to make a backtrace. Since the program just hangs and doesn't crash, I've did it this way: cd php-5.2.6/ gdb sapi/cli/php (gdb) run -i (gdb) bt Output Program received signal SIGINT, Interrupt. [Switching to Thread 47510530549152 (LWP 2089)] 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 (gdb) backtrace #0 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 #1 0x0016 in ?? () #2 0x4871d7d2 in ?? () #3 0x2b35e7b8598c in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #4 0x in ?? () Hope this gives a clou... If I should do something else, please let me know! The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/45066 -- Edit this bug report at http://bugs.php.net/?id=45066&edit=1
#45066 [Opn->Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Linux x86 PHP Version: 5.2.6 New Comment: Also it might be good to know if you can reproduce this without enabling any mysql stuff at all. Try this configure line: # rm config.cache # ./configure --disable-all --with-apxs2 && make clean && make # sapi/cli/php -v That should work? What Apache MPM have you enabled btw? Note: Please give us also the basic info Uwe asked above.. Previous Comments: [2008-07-14 19:42:55] [EMAIL PROTECTED] No idea, but I'd like to know what "Linux x86" means. What's the OS, what's the CPU, what MySQL version. Does the problem exist with mysqlnd? [2008-07-07 08:49:43] dirk at bean-it dot nl Ok, i've tried to make a backtrace. Since the program just hangs and doesn't crash, I've did it this way: cd php-5.2.6/ gdb sapi/cli/php (gdb) run -i (gdb) bt Output Program received signal SIGINT, Interrupt. [Switching to Thread 47510530549152 (LWP 2089)] 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 (gdb) backtrace #0 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 #1 0x0016 in ?? () #2 0x4871d7d2 in ?? () #3 0x2b35e7b8598c in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #4 0x in ?? () Hope this gives a clou... If I should do something else, please let me know! [2008-06-10 14:54:27] dirk at bean-it dot nl Just had the same problem on an 686... really puzzling, because the machine is virtually the same as a machine without the problem. Same distro, same mysql libs...? This is the last past of a strace output of sapi/cli/php -i. It hangs forever after this. munmap(0x2b233bd99000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b233bd99000 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 futex(0x2b233c5ef5e0, FUTEX_WAIT, 2, NULL [2008-05-22 15:05:55] dirk at bean-it dot nl Description: When I try to compile PHP 5.2.6 with the following options: --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config On a x86 machine, I get a not working php. Make test doesn't return anything, make install will work, but just typing php -v at the command line hangs forever. On a i386 machine, same OS (debian etch), same mysql libs, same all, no problem. This problem started in php-5.2.4, 5.2.3 is the last php that will result in a succesfull working php after compilation on x86. The problem does not exist when not using --with-apxs2 Reproduce code: --- ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Expected result: A working php... Actual result: -- A non-responsive php :-( -- Edit this bug report at http://bugs.php.net/?id=45066&edit=1
#45066 [Opn->Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Linux x86 PHP Version: 5.2.6 New Comment: 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. Previous Comments: [2008-06-10 14:54:27] dirk at bean-it dot nl Just had the same problem on an 686... really puzzling, because the machine is virtually the same as a machine without the problem. Same distro, same mysql libs...? This is the last past of a strace output of sapi/cli/php -i. It hangs forever after this. munmap(0x2b233bd99000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b233bd99000 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 futex(0x2b233c5ef5e0, FUTEX_WAIT, 2, NULL [2008-05-22 15:05:55] dirk at bean-it dot nl Description: When I try to compile PHP 5.2.6 with the following options: --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config On a x86 machine, I get a not working php. Make test doesn't return anything, make install will work, but just typing php -v at the command line hangs forever. On a i386 machine, same OS (debian etch), same mysql libs, same all, no problem. This problem started in php-5.2.4, 5.2.3 is the last php that will result in a succesfull working php after compilation on x86. The problem does not exist when not using --with-apxs2 Reproduce code: --- ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Expected result: A working php... Actual result: -- A non-responsive php :-( -- Edit this bug report at http://bugs.php.net/?id=45066&edit=1