Bug 178763

Summary: Python shelve module use causes segfault in libdb-4.3.so
Product: [Fedora] Fedora Reporter: Arthur Pemberton <pembo13>
Component: db4Assignee: Jindrich Novy <jnovy>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: ivazqueznet, nobody+pnasrat, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://www.pembo13.com/bt.0.txt
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-05 15:00:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arthur Pemberton 2006-01-24 04:27:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Fedora/1.7.12-1.5.1

Description of problem:
I was writing up a script in python to parse and store a batch of links for a website. I used the shelve module to store the links so as not to polute the memory.

The script does quite a bit of interations in a nested, indeterminate loop. No variables appear to go out of bounds. At some point, the script terminates with a "Segmentation Fault" error.

Using gdb I have tracked the segfault to db4.

Version-Release number of selected component (if applicable):
db4-4.3.27-3

How reproducible:
Always

Steps to Reproduce:
1. Run script
2. Wait
3. Error occurs
  

Actual Results:  Segmentation Fault

Expected Results:  Continued interation of script till terminating statement

Additional info:

GDB output with python-debuginfo:
http://www.pembo13.com/bt.0.txt

DGB output with python-debuginfo and db-debuginfo:
http://www.pembo13.com/bt.1.txt

Comment 1 Arthur Pemberton 2006-01-24 04:42:14 UTC
Actual script (unfinished and untested for obvious reasons):
http://pembo13.com/linux/linkdepthfinder/linkdepthfinder.py

Module utilized for parsing html (SGMLlib wrapper):
http://pembo13.com/linux/linkdepthfinder/urllister.py

Comment 2 Jindrich Novy 2006-02-10 20:36:33 UTC
Sorry, I don't see a segfault but this how the script crashes:
(with db4-4.3.27-3)

Checking page for links: sn-package-notes.html
Url: http://www.fedoraproject.orgsn-package-notes.html
Traceback (most recent call last):
  File "./linkdepthfinder.py", line 140, in ?
    check()
  File "./linkdepthfinder.py", line 100, in check
    page_links = get_page_links(link)
  File "./linkdepthfinder.py", line 57, in get_page_links
    usock = urllib.urlopen(url)
  File "/usr/lib/python2.4/urllib.py", line 77, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.4/urllib.py", line 180, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.4/urllib.py", line 296, in open_http
    h.endheaders()
  File "/usr/lib/python2.4/httplib.py", line 794, in endheaders
    self._send_output()
  File "/usr/lib/python2.4/httplib.py", line 675, in _send_output
    self.send(msg)
  File "/usr/lib/python2.4/httplib.py", line 642, in send
    self.connect()
  File "/usr/lib/python2.4/httplib.py", line 610, in connect
    socket.SOCK_STREAM):
IOError: [Errno socket error] (-2, 'Name or service not known')

Maybe something has changed on the fedoraproject.org page so running the script
no more shows the segfault? I saw the same when I changed the URL to redhat.com.
Could you please point me to some more static site that show the segfault?

Comment 3 John Thacker 2006-05-05 15:00:57 UTC
Closing due to lack of response.