segmentation fault in optirun subprocess causes crash of python
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-defaults (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Invoking `cudaminer` as argument to `optirun` as subprocess (using the `subprocess` module) can cause a segmentation fault. This segmentation fault crashes python as well. `dmesg` shows
[18395.771643] bbswitch: enabling discrete graphics
[18396.154074] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
[18396.154079] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 340.65 Tue Dec 2 09:50:34 PST 2014
[18397.074544] vgaarb: this pci device is not a vga device
[18397.074996] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18397.077359] ACPI Warning: \_SB_.PCI0.
[18397.077430] ACPI Warning: \_SB_.PCI0.
[18397.077475] ACPI Warning: \_SB_.PCI0.
[18397.077525] ACPI Warning: \_SB_.PCI0.
[18397.077567] ACPI Warning: \_SB_.PCI0.
[18397.077607] ACPI Warning: \_SB_.PCI0.
[18397.077664] ACPI Warning: \_SB_.PCI0.
[18397.077704] ACPI Warning: \_SB_.PCI0.
[18397.901647] ACPI Warning: \_SB_.PCI0.
[18398.278551] vgaarb: this pci device is not a vga device
[18398.774341] nvidia_uvm: Loaded the UVM driver, major device number 249
[18414.525505] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18414.527670] ACPI Warning: \_SB_.PCI0.
[18414.527739] ACPI Warning: \_SB_.PCI0.
[18414.527783] ACPI Warning: \_SB_.PCI0.
[18414.527833] ACPI Warning: \_SB_.PCI0.
[18414.527873] ACPI Warning: \_SB_.PCI0.
[18414.527913] ACPI Warning: \_SB_.PCI0.
[18414.527968] ACPI Warning: \_SB_.PCI0.
[18414.528009] ACPI Warning: \_SB_.PCI0.
[18414.528673] ACPI Warning: \_SB_.PCI0.
[18435.688625] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18435.690862] ACPI Warning: \_SB_.PCI0.
[18435.690935] ACPI Warning: \_SB_.PCI0.
[18435.691008] ACPI Warning: \_SB_.PCI0.
[18435.691079] ACPI Warning: \_SB_.PCI0.
[18435.691123] ACPI Warning: \_SB_.PCI0.
[18435.691164] ACPI Warning: \_SB_.PCI0.
[18435.691220] ACPI Warning: \_SB_.PCI0.
[18435.691261] ACPI Warning: \_SB_.PCI0.
[18435.692002] ACPI Warning: \_SB_.PCI0.
[18456.993550] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18456.995716] ACPI Warning: \_SB_.PCI0.
[18456.995787] ACPI Warning: \_SB_.PCI0.
[18456.995832] ACPI Warning: \_SB_.PCI0.
[18456.995882] ACPI Warning: \_SB_.PCI0.
[18456.995924] ACPI Warning: \_SB_.PCI0.
[18456.995965] ACPI Warning: \_SB_.PCI0.
[18456.996020] ACPI Warning: \_SB_.PCI0.
[18456.996061] ACPI Warning: \_SB_.PCI0.
[18456.996728] ACPI Warning: \_SB_.PCI0.
[18477.874471] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18477.876885] ACPI Warning: \_SB_.PCI0.
[18477.876958] ACPI Warning: \_SB_.PCI0.
[18477.877004] ACPI Warning: \_SB_.PCI0.
[18477.877055] ACPI Warning: \_SB_.PCI0.
[18477.877096] ACPI Warning: \_SB_.PCI0.
[18477.877137] ACPI Warning: \_SB_.PCI0.
[18477.877193] ACPI Warning: \_SB_.PCI0.
[18477.877234] ACPI Warning: \_SB_.PCI0.
[18477.877906] ACPI Warning: \_SB_.PCI0.
[18498.879720] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18498.881970] ACPI Warning: \_SB_.PCI0.
[18498.882043] ACPI Warning: \_SB_.PCI0.
[18498.882089] ACPI Warning: \_SB_.PCI0.
[18498.882140] ACPI Warning: \_SB_.PCI0.
[18498.882182] ACPI Warning: \_SB_.PCI0.
[18498.882224] ACPI Warning: \_SB_.PCI0.
[18498.882281] ACPI Warning: \_SB_.PCI0.
[18498.882339] ACPI Warning: \_SB_.PCI0.
[18498.883053] ACPI Warning: \_SB_.PCI0.
[18519.811461] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18519.814156] ACPI Warning: \_SB_.PCI0.
[18519.814230] ACPI Warning: \_SB_.PCI0.
[18519.814277] ACPI Warning: \_SB_.PCI0.
[18519.814327] ACPI Warning: \_SB_.PCI0.
[18519.814369] ACPI Warning: \_SB_.PCI0.
[18519.814410] ACPI Warning: \_SB_.PCI0.
[18519.814466] ACPI Warning: \_SB_.PCI0.
[18519.814507] ACPI Warning: \_SB_.PCI0.
[18519.815195] ACPI Warning: \_SB_.PCI0.
[18540.056186] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18540.058560] ACPI Warning: \_SB_.PCI0.
[18540.058677] ACPI Warning: \_SB_.PCI0.
[18540.058733] ACPI Warning: \_SB_.PCI0.
[18540.058800] ACPI Warning: \_SB_.PCI0.
[18540.058844] ACPI Warning: \_SB_.PCI0.
[18540.058886] ACPI Warning: \_SB_.PCI0.
[18540.058941] ACPI Warning: \_SB_.PCI0.
[18540.058982] ACPI Warning: \_SB_.PCI0.
[18540.059682] ACPI Warning: \_SB_.PCI0.
[18561.057735] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[18561.060506] ACPI Warning: \_SB_.PCI0.
[18561.060616] ACPI Warning: \_SB_.PCI0.
[18561.060688] ACPI Warning: \_SB_.PCI0.
[18561.060775] ACPI Warning: \_SB_.PCI0.
[18561.060847] ACPI Warning: \_SB_.PCI0.
[18561.060917] ACPI Warning: \_SB_.PCI0.
[18561.061012] ACPI Warning: \_SB_.PCI0.
[18561.061080] ACPI Warning: \_SB_.PCI0.
[18561.062096] ACPI Warning: \_SB_.PCI0.
[18581.999614] python[25167]: segfault at 0 ip 00007f3f5ae2096c sp 00007f3f49972ff0 error 4 in libglib-
The issue is not recognized by `apport` (although it should AFAIK). A `gdb` backtrace after `SIGSEGV` has been caught:
Catchpoint 1 (signal SIGSEGV), 0x00007fffdf95921b in wxGrid:
8428 ../src/
(gdb) backtrace
#0 0x00007fffdf95921b in wxGrid:
at ../src/
#1 0x00007fffdf95979c in AutoSizeColumn (setAsMin=true, col=2, this=0x16c4100) at ../include/
#2 wxGrid:
#3 0x00007fffdf959919 in wxGrid::AutoSize (this=0x16c4100) at ../src/
#4 0x00007fffd5b991af in ?? () from /usr/lib/
#5 0x00000000004ce3e3 in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#6 PyEval_EvalFrameEx () at ../Python/
#7 0x00000000004c93d1 in PyEval_EvalCodeEx () at ../Python/
#8 0x00000000004cc4e4 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#9 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/
#10 PyEval_EvalFrameEx () at ../Python/
#11 0x00000000004c93d1 in PyEval_EvalCodeEx () at ../Python/
#12 0x00000000004cc4e4 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#13 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/
#14 PyEval_EvalFrameEx () at ../Python/
#15 0x00000000004c93d1 in PyEval_EvalCodeEx () at ../Python/
#16 0x00000000004caf49 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#17 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/
#18 PyEval_EvalFrameEx () at ../Python/
#19 0x00000000004e6970 in PyEval_EvalCodeEx (closure=<optimized out>, defcount=<optimized out>, defs=<optimized out>, kwcount=<optimized out>, kws=<optimized out>,
#20 function_
#21 0x00000000004cd00f in PyObject_Call (kw=<optimized out>, arg=<optimized out>, func=<optimized out>) at ../Objects/
#22 ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#23 PyEval_EvalFrameEx () at ../Python/
#24 0x00000000004cb212 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#25 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/
#26 PyEval_EvalFrameEx () at ../Python/
#27 0x00000000004cb212 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/
#28 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/
#29 PyEval_EvalFrameEx () at ../Python/
#30 0x00000000004e6970 in PyEval_EvalCodeEx (closure=<optimized out>, defcount=<optimized out>, defs=<optimized out>, kwcount=<optimized out>, kws=<optimized out>,
#31 function_
#32 0x0000000000505128 in PyObject_Call (kw=<optimized out>, arg=<optimized out>, func=<optimized out>) at ../Objects/
#33 instancemethod_
#34 0x00000000004d25fb in PyObject_Call (kw=<optimized out>, arg=(), func=<instancem
#35 PyEval_
#36 0x00000000005bbc82 in t_bootstrap () at ../Modules/
#37 0x00007ffff7bc40a5 in start_thread (arg=0x7fffed49
#38 0x00007ffff78f177d in clone () at ../sysdeps/
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: python 2.7.8-1
Uname: Linux 3.12.35-
NonfreeKernelMo
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Jan 3 00:56:24 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-12-28 (5 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
SourcePackage: python-defaults
UpgradeStatus: Upgraded to utopic on 2014-12-28 (5 days ago)
summary: |
- segmentation fault in optirun causes crash of python + segmentation fault in optirun subprocess causes crash of python |
description: | updated |
This seems to occur due to errornous referencing of wxPython components in non-GUI threads. I never thought that this crashes the interpreter as well, but that seems to comply with the specs, sorry.