#35216 [NEW]: segfault using db3
| From: | 0602 at eq dot cz | Date: | Mon, 14 Nov 2005 15:24:08 +0000 |
| Subject: | #35216 [NEW]: segfault using db3 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-88151@lists.php.net to get a copy of this message | ||
From: 0602 at eq dot cz
Operating system: Linux
PHP version: 4.4.1
PHP Bug Type: Reproducible crash
Bug description: segfault using db3
Description:
------------
Segfault using db3 with php version 4.4.1 (and snapshot
php4-STABLE-200511141355) as module for apache (no problems with cli).
Reproduce code:
---------------
<?
$db = 'data/hereshow.db';
$id = dba_open($db, 'n', 'db3');
if(!$id) {
exit('Could not open database '.$db);
}
$key = time();
if(!dba_insert($key, 'Time in seconds', $id)) {
dba_close($id);
exit('Could not update database'.$db);
}
else {
echo 'Successfully updated database with key =
'.$key.'<br/>';
}
if(($value = dba_fetch($key,$id))) {
echo 'Found key '.$key.' with value
'.$value.'<br/>';
}
else {
echo 'Could not find key '.$key.'<br/>';
}
dba_close($id);
?>
Expected result:
----------------
Correct hereshow.db db file in data directory.
Actual result:
--------------
The file hereshow.db is created and is empty (size 0). The process
segfaults. The backtrace is the same for 4.4.1 and 200511141355:
(gdb) bt
#0 0x00317a7b in __dbenv_get_errfile () from /lib/libdb-4.2.so
#1 0x00308bf9 in __dbh_am_chk () from /lib/libdb-4.2.so
#2 0x006848b8 in dba_open_db3 () from /usr/local/lib/php/libphp4.so
#3 0x00681f7f in php_dba_find () from /usr/local/lib/php/libphp4.so
#4 0x00682aec in zif_dba_open () from /usr/local/lib/php/libphp4.so
#5 0x00806d87 in execute () from /usr/local/lib/php/libphp4.so
#6 0x007f388f in zend_execute_scripts () from
/usr/local/lib/php/libphp4.so
#7 0x007be18f in php_execute_script () from
/usr/local/lib/php/libphp4.so
#8 0x0080ccc6 in execute () from /usr/local/lib/php/libphp4.so
#9 0x08068026 in ap_run_handler (r=0x819e170) at config.c:152
#10 0x080685c8 in ap_invoke_handler (r=0x819e170) at config.c:364
#11 0x0806554f in ap_process_request (r=0x819e170) at http_request.c:249
#12 0x08060ec9 in ap_process_http_connection (c=0x8198078) at
http_core.c:251
#13 0x08071186 in ap_run_process_connection (c=0x8198078) at
connection.c:43
#14 0x080669d8 in child_main (child_num_arg=6833920) at prefork.c:610
#15 0x08066b8e in make_child (s=0x80a0ed0, slot=0) at prefork.c:650
#16 0x08066bff in startup_children (number_to_start=1) at prefork.c:722
#17 0x08067379 in ap_mpm_run (_pconf=0x809f0f0, plog=0x80cb1a0, s=0x1) at
prefork.c:941
#18 0x0806cbc8 in main (argc=2, argv=0xbfffdbb4) at main.c:618
# ldd httpd
[...]
libdb-4.2.so => /lib/libdb-4.2.so (0x00289000)
[...]
# ldd libphp4.so
[...]
libdb-3.3.so => /lib/libdb-3.3.so (0x00761000)
[...]
*NO* problems with the following httpd (different os version (older) -
httpd linked against different libdb; same version of apache and php on
both oses):
# ldd httpd
[...]
libdb-3.3.so => /lib/libdb-3.3.so (0x00275000)
[...]
PHP was configured with "--with-db3". This libdb versions are installed on
affected system: db3-3.3.11, db4-4.2.52.
--
Edit bug report at http://bugs.php.net/?id=35216&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35216&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35216&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35216&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35216&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35216&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35216&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35216&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35216&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35216&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35216&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35216&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35216&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35216&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35216&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35216&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35216&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35216&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35216&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35216&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35216&r=mysqlcfg