ID:               51086
 Updated by:       [email protected]
-Summary:          will not build/work with libdb4.8
 Reported By:      seanius at debian dot org
 Status:           Open
 Bug Type:         DBM/DBA related
-Operating System: Debian (and others)
+Operating System: *
-PHP Version:      5.3.1
+PHP Version:      5.3, 6 (2010-02-19)
 New Comment:

At least it builds now. :)


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

[2010-02-19 08:43:12] seanius at debian dot org

oops, looks like there was a little race there.  yes i can see the
behavior in the snapshot too:

rangda[/home/sean/Download/php5.3-201002160730] ./run-tests.php -p
./sapi/cli/php --show-diff ext/dba/tests/bug36436.phpt

=====================================================================
PHP         : ./sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 5.3.3-dev
ZEND_VERSION: 2.3.0
PHP_OS      : Linux - Linux rangda 2.6.32-trunk-amd64 #1 SMP Sun Jan 10
22:40:40 UTC 2010 x86_64
INI actual  : /home/sean/Download/php5.3-201002160730
More .INIs  :  
CWD         : /home/sean/Download/php5.3-201002160730
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
Running selected tests.
TEST 1/1 [ext/dba/tests/bug36436.phpt]
========DIFF========
001+ Notice: dba_popen(): fop_read_meta:
/home/sean/Download/php5.3-201002160730/ext/dba/tests/test0.dbm:
unexpected file type or format in
/home/sean/Download/php5.3-201002160730/ext/dba/tests/bug36436.php on
line 6
========DONE========
FAIL Bug #36436 (DBA problem with Berkeley DB4)
[ext/dba/tests/bug36436.phpt] 
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    0 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #36436 (DBA problem with Berkeley DB4)
[ext/dba/tests/bug36436.phpt]
=====================================================================

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

[2010-02-19 08:36:51] seanius at debian dot org

-Status: Feedback
+Status: Open

and i've now asked in the bdb forums what they think:

http://forums.oracle.com/forums/thread.jspa?threadID=1031805&stqc=true

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

[2010-02-19 08:32:31] [email protected]

-Status: Open
+Status: Feedback

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

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

[2010-02-18 23:46:46] seanius at debian dot org

a little more info:  afaict the file is being created with zero size
via some stream functions in dba.c.  when db->open() is called with
DB_CREATE|DB_TRUNCATE libdb4.8 tries to read some metadata from the
existing file and fails horribly.  i tried playing around with the flags
(passing only DB_TRUNCATE does not work, passing only DB_CREATE seems to
work but still produces the error message).

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

[2010-02-18 23:41:52] seanius at debian dot org

Description:
------------
while the configure changes needed to get php to build against libdb4.8
are pretty trivial, there's unfortunately a significant behavior change
in how libdb's db->open() reacts when called with DB_CREATE|DB_TRUNCATE
on an existing zero-sized file.  this also breaks other apps, such as
sendmail or nvi, which use similar "locking hacks" (i'm guessing that's
what's going on here) on db files.

it's possible that this might be fixed in a later release of libdb4.8
in which case it might be good to refuse building against earlier
versions of 4.8 when the fix does come out.  in the meantime i'm
wondering about the options for someone who can't back out to 4.7 :/

for reference:

similar bug in sendmail:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565242

similar bug in nvi (gentoo dev "I'm not sure if this is a bug or a
feature"): http://bugs.gentoo.org/286352

Reproduce code:
---------------
run ext/dba/tests/bug36436.phpt, for example, or probably any other db4
related code after building against 4.8.



Expected result:
----------------
PASS

Actual result:
--------------
FAIL, with error messages like:

PHP Notice:  dba_popen(): fop_read_meta:
/home/sean/debian/php/ext/dba/tests/test0.dbm: unexpected file type or
format in /home/sean/debian/php/ext/dba/tests/bug36436.php on line 6



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


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

Reply via email to