Issue 6937: multiprocessing lock on OS X Snow Leopard dumps core (original) (raw)
Created on 2009-09-18 05:10 by aaditya, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (10)
Author: aaditya sood (aaditya)
Date: 2009-09-18 05:10
On a Snow Leopard system, doing this core dumps:
import multiprocessing lck1=multiprocessing.Lock()
with lck1: print "foo"
The stack trace:
Process: Python [23100]
Path:
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: zsh [23055]
Date/Time: 2009-09-18 10:39:39.611 +0530 OS Version: Mac OS X 10.6.1 (10B504) Report Version: 6
Interval Since Last Report: 83665 sec Crashes Since Last Report: 60 Per-App Crashes Since Last Report: 55 Anonymous UUID: 38A426BB-52F7-4282-9FA8-A04AB8896489
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000043000000ee Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 org.python.python 0x0000000100096763 _PyArg_ParseTupleAndKeywords_SizeT + 113 1 _multiprocessing.so 0x00000001001fa8c8 sem_timedwait_save
- 456 2 org.python.python 0x00000001000891df PyEval_EvalFrameEx
- 15001 3 org.python.python 0x000000010008accf PyEval_EvalCodeEx
- 1803 4 org.python.python 0x000000010008ad62 PyEval_EvalCode + 54 5 org.python.python 0x00000001000a265a Py_CompileString + 78 6 org.python.python 0x00000001000a44dd PyRun_InteractiveOneFlags + 503 7 org.python.python 0x00000001000a4615 PyRun_InteractiveLoopFlags + 206 8 org.python.python 0x00000001000a4685 PyRun_AnyFileExFlags + 76 9 org.python.python 0x00000001000b0286 Py_Main + 2718 10 org.python.python.app 0x0000000100000e6c start + 52
Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000004300000043 rbx: 0x0000000100200150 rcx: 0x00000001001fc7f0 rdx: 0x00000001001fb632 rdi: 0x00000001001af050 rsi: 0x000000010003af24 rbp: 0x00007fff5fbfeff0 rsp: 0x00007fff5fbfef20 r8: 0x0000000100096748 r9: 0x00007fff5fbff030 r10: 0x0000000000000000 r11: 0x00000001001fa86f r12: 0x00000000ffffffff r13: 0x00000001004a4570 r14: 0x0000000100123100 r15: 0x00000001001af050 rip: 0x0000000100096763 rfl: 0x0000000000010206 cr2: 0x00000043000000ee
Binary Images: 0x100000000 - 0x100000ff7 org.python.python.app 2.6 (2.6) /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 0x100004000 - 0x100114ff7 org.python.python 2.6.1 (2.6.1) <01EBD0D4-F181-045F-C7A8-B7B3C5D4204F> /System/Library/Frameworks/Python.framework/Versions/2.6/Python 0x1001f0000 - 0x1001f2ff7 readline.so ??? (???) /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/readline.so 0x1001f8000 - 0x1001fbfff _multiprocessing.so ??? (???) <03672D74-6FAC-DE76-6DE6-604A8C0F2D50> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_multiprocessing.so 0x1004b0000 - 0x1004ccff7 libedit.2.dylib ??? (???) /usr/lib/libedit.2.dylib 0x1004db000 - 0x1004e0fff itertools.so ??? (???) <06555874-952C-C770-64BF-6BC7A2455E10> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/itertools.so 0x1004e8000 - 0x1004f4fff cPickle.so ??? (???) <98485D07-D504-74EB-B3A1-4EBB2474BFE6> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/cPickle.so 0x1004fa000 - 0x1004fbfff cStringIO.so ??? (???) <7600C3A8-3C81-2A81-0853-B09107768C8C> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/cStringIO.so 0x100540000 - 0x100541ff7 _functools.so ??? (???) <1CE29F88-7B8C-77CC-5E87-555BA210EA8F> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_functools.so 0x100545000 - 0x100546ff7 time.so ??? (???) <5F01F2A9-8557-5DF1-F006-44E02E0469CE> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/time.so 0x10054d000 - 0x100550fff _collections.so ??? (???) <1F62A5C3-6E6C-D0BC-7AA6-DA2820B5F157> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_collections.so 0x100556000 - 0x100559fff operator.so ??? (???) <68C1CC88-5F73-E029-5C19-685BBADACFA6> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/operator.so 0x10055f000 - 0x10055ffff _weakref.so ??? (???) <89F1302D-1CFA-7B9B-4425-70DA55215DAE> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_weakref.so 0x1005a3000 - 0x1005a7ff7 _struct.so ??? (???) <33156F5C-52ED-7167-533F-15D6CF031150> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_struct.so 0x1005ad000 - 0x1005affe7 binascii.so ??? (???) <5CFE3DC5-850B-B79D-8310-0BA97540841A> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/binascii.so 0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld 0x7fff80bc1000 - 0x7fff80bc5ff7 libmathCommon.A.dylib ??? (???) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib 0x7fff829f4000 - 0x7fff82bb2ff7 libSystem.B.dylib ??? (???) <66102D4E-6C8B-77D0-6766-2A1788B20C6F> /usr/lib/libSystem.B.dylib 0x7fff85ebc000 - 0x7fff85efbfef libncurses.5.4.dylib ??? (???) /usr/lib/libncurses.5.4.dylib 0x7fff85f81000 - 0x7fff85f92fef libz.1.dylib ??? (???) <3A7A4C48-A4C8-A78A-8B87-C0DDF6601AC8> /usr/lib/libz.1.dylib 0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <66102D4E-6C8B-77D0-6766-2A1788B20C6F> /usr/lib/libSystem.B.dylib
Model: MacBookPro2,2, BootROM MBP22.00A5.B07, 2 processors, Intel Core 2 Duo, 2.16 GHz, 2 GB, SMC 1.12f5 Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 128 MB Memory Module: global_name AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x87), Atheros 5416: 2.0.19.4 Bluetooth: Version 2.2.1f7, 2 service, 1 devices, 1 incoming serial ports Network Service: AirPort, AirPort, en1 Serial ATA Device: Hitachi HTS541612J9SA00, 111.79 GB Parallel ATA Device: HL-DT-ST DVDRW GWA4080MA USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8501, 0xfd400000 USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8240, 0x5d200000 USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x021a, 0x1d200000 USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8205, 0x7d100000
Author: aaditya sood (aaditya)
Date: 2009-09-18 05:12
Additional Info: Snow Leopard is shipping with Python 2.6.1 64 bit build.
Author: Ned Deily (ned.deily) *
Date: 2009-09-18 05:39
Reproducible here. Fails with Apple 2.6.1 in 64-bit mode but not in
32-bit mode. Also does not fail on 10.6 with recent 64-bit 4-way trunk
built on 10.5.
$ arch -i386 /usr/bin/python2.6 Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import multiprocessing lck1=multiprocessing.Lock() with lck1: ... print "foo" ... foo ^D $ arch -x86_64 /usr/bin/python2.6 Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. import multiprocessing lck1=multiprocessing.Lock() with lck1: ... print "foo" ... Segmentation fault
Author: Ronald Oussoren (ronaldoussoren) *
Date: 2009-09-18 06:03
Jesse: is this something you can look into?
This is a crash of multiprocessing on MacOSX 10.6 with a 64-bit build of python.
Author: Tim Golden (tim.golden) *
Date: 2009-09-18 07:48
Don't know what exact release OS X ships with, but it looks like you're being bitten by this:
http://bugs.python.org/issue5261
Author: Jesse Noller (jnoller) *
Date: 2009-09-18 13:04
AFAIK: Tim is correct. Unfortunately, this has already been fixed - as much as it kills me, there's not much I can do to fix this for Snow Leopard.
Author: Ronald Oussoren (ronaldoussoren) *
Date: 2009-09-18 13:48
Jesse: Apple can fix their own copy of python (which is 2.6.1), I was more worried about the upcoming 2.6.3 release.
I'll file a bug with Apple and poke their Python maintainer once 2.6.3 is released.
Author: Jesse Noller (jnoller) *
Date: 2009-09-18 13:59
Ronald, could you email me the incantation for a full-on 64 bit build, I'll double check this on 26-maint. I just forget the magic build flags all the time.
Author: aaditya sood (aaditya)
Date: 2009-09-20 07:00
Ronald, if you can also put the magic incantations on a wiki page somewhere it'd really help me out. I can then download 2.6.2 and build it for snow leopard.
I can put up a downloadable version for other people if needed.
I'm assuming this will bite a lot of people on snow leopard.
Author: Ronald Oussoren (ronaldoussoren) *
Date: 2009-09-20 13:27
To build universal build of Python use "--enable-universalsdk" or "-- enable-universalsdk=/" (the former defaults to the 10.4 SDK, which doesn't support a 64-bit build). You can then use the "--with- universal-archs" option to select the type of build you want.
Anyway, I can confirm that this does not affect either the trunk or the HEAD of release26-maint.
Closing this issue as out of date.
aaditya: you don't have to provide a seperate build for 10.6. Python 2.6.3 will be released soon and we will ship a Mac installer for that.
As an aside: never replace /System/Library/Framework/Python.framework by something else. Apple ships a patched version of Python and replacing the system version might break the system or 3th-party applications.
History
Date
User
Action
Args
2022-04-11 14:56:53
admin
set
github: 51186
2009-09-20 13:27:27
ronaldoussoren
set
status: open -> closed
resolution: out of date
messages: +
2009-09-20 07:00:30
aaditya
set
messages: +
2009-09-18 13:59:07
jnoller
set
messages: +
2009-09-18 13:49:15
ronaldoussoren
set
assignee: jnoller -> ronaldoussoren
2009-09-18 13:48:57
ronaldoussoren
set
messages: +
2009-09-18 13:04:04
jnoller
set
messages: +
2009-09-18 07:48:58
tim.golden
set
nosy: + tim.golden
messages: +
2009-09-18 06:03:42
ronaldoussoren
set
assignee: ronaldoussoren -> jnoller
messages: +
nosy: + jnoller
2009-09-18 05:39:55
ned.deily
set
nosy: + ronaldoussoren, ned.deily
messages: +
assignee: ronaldoussoren
components: + macOS
2009-09-18 05:12:38
aaditya
set
type: crash
messages: +
2009-09-18 05:10:42
aaditya
create