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.

Author ionelmc
Recipients ionelmc
Date 2013-08-15.13:10:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za>
In-reply-to
Content
Running the file couple of times will make the interpreter fail with: libgcc_s.so.1 must be installed for pthread_cancel to work

From what I've seen it is triggered from PyThread_delete_key (tries to load libgcc_s.so at that time).

How does it happen?

The main thread will close fd 4 (because fh object is getting dereferenced to 0) exactly at the same time libpthread will try to open and read libgcc_s.so with the same descriptor (4)

It's fairly obvious that the file handling in bug.py is a bug, but the interpreter should not crash like that !

This doesn't happen on python2.7. Also, python2.7 appears to be linked with libgcc_s.so.1 directly while the 3.x does not (I've tried 3.2 from ubuntu repos, and built 3.3 and 3.4 myself on ubuntu 12.04.2) - at least that's what ldd indicates.
History
Date User Action Args
2013-08-15 13:10:42ionelmcsetrecipients: + ionelmc
2013-08-15 13:10:42ionelmcsetmessageid: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za>
2013-08-15 13:10:42ionelmclinkissue18748 messages
2013-08-15 13:10:41ionelmccreate