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_poplib Bus error with gcc-4.4 on OS X
Type: crash Stage:
Components: Extension Modules Versions: Python 3.1
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, mark.dickinson, pitrou
Priority: release blocker Keywords:

Created on 2009-05-16 08:58 by mark.dickinson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
poplib_backtrace.txt mark.dickinson, 2009-05-16 08:58 backtrace for test_poplib failure
Messages (4)
msg87866 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-05-16 08:58
After building the py3k branch (r72674) with GCC 4.4 on OS X 10.5.7/x86
using:

CC=gcc-mp-4.4 ./configure --with-pydebug && make

test_poplib.py is crashing with a Bus error:

Macintosh-4:py3k dickinsm$ ./python.exe Lib/test/test_poplib.py
test_dele (__main__.TestPOP3Class) ... ok
test_exceptions (__main__.TestPOP3Class) ... ok
test_getwelcome (__main__.TestPOP3Class) ... ok
test_list (__main__.TestPOP3Class) ... ok
test_noop (__main__.TestPOP3Class) ... ok
test_pass_ (__main__.TestPOP3Class) ... ok
test_retr (__main__.TestPOP3Class) ... ok
test_rpop (__main__.TestPOP3Class) ... ok
test_stat (__main__.TestPOP3Class) ... ok
test_top (__main__.TestPOP3Class) ... ok
test_uidl (__main__.TestPOP3Class) ... ok
test_user (__main__.TestPOP3Class) ... ok
testTimeoutDefault (__main__.TestTimeouts) ... ok
testTimeoutNone (__main__.TestTimeouts) ... ok
testTimeoutValue (__main__.TestTimeouts) ... ok
test__all__ (__main__.TestPOP3_SSLClass) ... Bus error (core dumped)

gdb backtrace attached.

Setting priority to release blocker until we figure out that this isn't 
Python's fault.
msg87884 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-05-16 11:48
More information:  gcc-mp-4.4 is GCC 4.4 from macports.  For
some reason the macports version of gcc is having problems, but
not the regular Apple version.

When I compile with gcc-4.2 from Apple, test_poplib.py passes.
When I compile with gcc-4.2 from macports, test_poplib.py fails as above.

Here's a small script, cut down from test_poplib.py, that generates the 
Bus error.  I'm still trying to work out whether the bug is in gcc, 
Python, or libssl.


import socket, ssl
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ssl_sock = ssl.wrap_socket(s)
ssl_sock.connect(('www.verisign.com', 443))
file = ssl_sock.makefile('rb')
file.close()
ssl_sock.close()
msg87897 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-05-16 14:41
Even stranger is that the crash happens in debug mode, i.e. without
optimizations.
msg87906 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-05-16 17:33
> I'm still trying to work out whether the bug is in gcc, 
> Python, or libssl.

It was, of course, none of the above.  It was a PEBCAK error.
I had two versions of openssl:  one from macports and one from
OS X, and I was using the include files from one version and
linking against the other.

Sorry for the noise.
History
Date User Action Args
2022-04-11 14:56:48adminsetnosy: + benjamin.peterson
github: 50285
2009-05-16 17:33:29mark.dickinsonsetstatus: open -> closed
resolution: not a bug
messages: + msg87906
2009-05-16 14:41:43pitrousetmessages: + msg87897
2009-05-16 14:41:14pitrousetnosy: + pitrou
2009-05-16 11:48:27mark.dickinsonsetmessages: + msg87884
2009-05-16 08:58:51mark.dickinsoncreate