This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_anydbm segmentation fault
Type: Stage:
Components: Extension Modules Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: cspence, gregory.p.smith, nnorwitz
Priority: normal Keywords:

Created on 2006-08-21 18:02 by cspence, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_anydbm.out cspence, 2006-08-21 18:02 pdb output showing where segfault occurs
Messages (8)
msg29595 - (view) Author: Clay Spence (cspence) Date: 2006-08-21 18:02
After building 2.5rc1 and bfore installing, make test
failed for me at test_anydbm:

cholla 88% uname -a
Linux cholla.sarnoff.com 2.6.9-34.ELsmp #1 SMP Fri Feb
24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux

cholla 89% ./python
Python 2.5c1 (r25c1:51305, Aug 21 2006, 11:30:37)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>>

cholla 90% ./python ./Lib/test/test_anydbm.py
Segmentation fault

cholla 91%

I tracked this to Lib/bsddb/__init__.py, line 355, in
_openDBEnv(): e.set_lk_detect(db.DB_LOCK_DEFAULT) See
the attached pdb text output, if it's useful.
msg29596 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-21 23:28
Logged In: YES 
user_id=33168

I'm guessing this is an old version of berkeley db.  What
version of bdb are you using?
msg29597 - (view) Author: Clay Spence (cspence) Date: 2006-08-22 13:26
Logged In: YES 
user_id=685289

Excuse my ignorance, but I'm not sure how to determine the
version. Poking around gives me:

cholla 92% ./python
Python 2.5c1 (r25c1:51305, Aug 21 2006, 11:30:37)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import bsddb
>>> bsddb.__version__
'4.4.5'
>>> bsddb._bsddb.version()
(4, 2, 52)
>>>

Is it the second?
msg29598 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-22 13:45
Logged In: YES 
user_id=33168

Yes, correct.  4.2.52 is the version of the C BSD DB
library.  That's a fairly old version.  I believe the bug is
in there.  If you update to 4.3.x or 4.4.x, I suspect the
problem will go away.

I know very little about bsddb.  The code looks quite
simple.  Assigning Greg as he's probably the only one that
has a chance of knowing.
msg29599 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2006-09-03 23:14
Logged In: YES 
user_id=413

weird i would not expect this to happen regardless of
berkeleydb version.

can you also do a 'ldd' on the _bsddb.so binary that your
python build produced?  presumably libdb42.so or something
similar should be in the output.

also, when to compile python does it print out a message
saying what version of the include files and libs it thinks
its compiling and linking with?

it looks like you're using rhel4 or centos4; i'll try
compiling 2.5rc1 on that myself when i get a chance.
msg29600 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2006-09-03 23:41
Logged In: YES 
user_id=413

i was unable to reproduce this problem on either 32-bit or
64-bit CentOS 4.
msg29601 - (view) Author: Clay Spence (cspence) Date: 2006-09-05 15:07
Logged In: YES 
user_id=685289

This is my fault. I found some old db headers in the include
directory inside my home directory. I assume they were
causing problems, since deleting them seems to have fixed
the problem, at least now the test passes. I apologize for
wasting people's time.
msg29602 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2006-09-05 18:29
Logged In: YES 
user_id=413

ok good, thats pretty much what i figured was happening
(header files not matching the library version).

closing.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43868
2006-08-21 18:02:48cspencecreate