Segmentation fault on importing from PyQt5 in Py3.10

ullix ullix at urkam.de
Sun Apr 17 14:04:35 BST 2022


Thanks for the guidance.

Upgrading Py3.10 is not easy for me, as I am on Ubuntu 16.04 and support 
for Py3.10 seems to have been cut.

Sorry for the mailing list flaw; after deleting every text, I did not 
expect that there is more "than meets the eye" :-/

I tried gdb, but interpretation is beyond my paygrade. I am attaching 
the gdb output as text file.

ullix


On 16.04.22 19:44, Florian Bruhin wrote:
> Hi,
>
> On Fri, Apr 15, 2022 at 07:01:10PM +0200, ullix wrote:
>> Using Py3.10 in a venv all worked fine until a few hours ago when I ugraded
>> some modules using pip. I believe it was the PyQt* upgrades, which created
>> the problem.
>>
>> Simply opening Py3.10 and importing: PyQt5 ok, but PyQt5.QtWidgets results
>> in Seg Fault:
>>      $ python3
>>      Python 3.10.0a6 (default, Mar  2 2021, 02:01:08) [GCC 5.4.0 20160609] on
>> linux
>>      >>> import PyQt5
>>      >>> import PyQt5.QtWidgets
>>      Segmentation fault
> Running with gdb might show more:
>
>      gdb -ex r --args $(which python3) -c "import PyQt5.QtWidgets"
>
> Then once you get a (gdb) prompt, "bt" should get you a C++ traceback.
> You probably won't be able to get debugging symbols for a pip-installed
> PyQt though, but maybe the output is helpful nonetheless.
>
> Also let me note that you're running an old alpha of Python 3.10 from
> over a year ago. You might want to try upgrading your Python to 3.10.4
> first and see if things look better there.
>
> PS: If you want to start a new topic, please write a new mail to the ML,
> don't answer to a random existing one. Your mail is now displayed as an
> answer to "Suprising enum difference in PyQt 6 from PyQt 5", yet has
> nothing to do with that.
>
> Florian
>
-------------- next part --------------
$ gdb -ex r --args $(which python3) -c "import PyQt5.QtWidgets"
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/ullix/geigerlog/vgl310a/bin/python3...(no debugging symbols found)...done.
Starting program: /home/ullix/geigerlog/vgl310a/bin/python3 -c import\ PyQt5.QtWidgets
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x000000000049549f in ?? ()
(gdb) bt
#0  0x000000000049549f in ?? ()
#1  0x000000000049bf0a in ?? ()
#2  0x0000000000492a82 in PyType_Ready ()
#3  0x000000000049b60f in ?? ()
#4  0x0000000000491820 in ?? ()
#5  0x000000000043e937 in PyObject_Call ()
#6  0x00007ffff46d25c0 in createContainerType (cod=cod at entry=0x7fffef0bcd70 <sipTypeDef_QtCore_QAbstractAnimation+48>, td=td at entry=0x7fffef0bcd40 <sipTypeDef_QtCore_QAbstractAnimation>,
    bases=bases at entry=0x7ffff661dbb0, metatype=metatype at entry=0x7ffff46ea5c0 <sipWrapperType_Type>, mod_dict=mod_dict at entry=0x7ffff7e51780, type_dict=type_dict at entry=0x7ffff662c900,
    client=0x7fffef0f9000 <sipModuleAPI_QtCore>) at siplib.c:6210
#7  0x00007ffff46d2939 in createClassType (client=client at entry=0x7fffef0f9000 <sipModuleAPI_QtCore>, ctd=ctd at entry=0x7fffef0bcd40 <sipTypeDef_QtCore_QAbstractAnimation>, mod_dict=mod_dict at entry=0x7ffff7e51780)
    at siplib.c:6366
#8  0x00007ffff46d462c in createClassType (mod_dict=0x7ffff7e51780, ctd=0x7fffef0bcd40 <sipTypeDef_QtCore_QAbstractAnimation>, client=0x7fffef0f9000 <sipModuleAPI_QtCore>) at siplib.c:6267
#9  sip_api_init_module (mod_dict=<optimized out>, client=<optimized out>) at siplib.c:1895
#10 sip_api_init_module (client=0x7fffef0f9000 <sipModuleAPI_QtCore>, mod_dict=0x7ffff7e51780) at siplib.c:1798
#11 0x00007fffeefa19b4 in PyInit_QtCore () from /home/ullix/geigerlog/vgl310a/lib/python3.10/site-packages/PyQt5/QtCore.abi3.so
#12 0x00000000005160c0 in ?? ()
#13 0x00000000005120fb in ?? ()
#14 0x0000000000676bc2 in ?? ()
#15 0x000000000043e614 in PyVectorcall_Call ()
#16 0x000000000042689c in _PyEval_EvalFrameDefault ()
#17 0x00000000004efb4f in ?? ()
#18 0x000000000042383f in ?? ()
#19 0x000000000042db71 in _PyEval_EvalFrameDefault ()
#20 0x00000000004efb4f in ?? ()
#21 0x000000000042383f in ?? ()
#22 0x00000000004259d7 in _PyEval_EvalFrameDefault ()
#23 0x00000000004efb4f in ?? ()
#24 0x000000000042383f in ?? ()
#25 0x0000000000425f80 in _PyEval_EvalFrameDefault ()
#26 0x00000000004efb4f in ?? ()
#27 0x000000000042383f in ?? ()
#28 0x0000000000425f80 in _PyEval_EvalFrameDefault ()
#29 0x00000000004efb4f in ?? ()
#30 0x000000000042383f in ?? ()
#31 0x0000000000425f80 in _PyEval_EvalFrameDefault ()
#32 0x00000000004efb4f in ?? ()
#33 0x000000000043e09c in ?? ()
#34 0x0000000000440785 in _PyObject_CallMethodIdObjArgs ()
#35 0x0000000000514fa0 in PyImport_ImportModuleLevelObject ()
#36 0x00000000006a1024 in ?? ()
#37 0x0000000000676476 in ?? ()
#38 0x000000000043db45 in _PyObject_MakeTpCall ()
#39 0x000000000043e396 in ?? ()
#40 0x000000000043f394 in PyObject_CallFunction ()
#41 0x00000000005156c4 in PyImport_Import ()
#42 0x000000000051588a in PyImport_ImportModule ()
#43 0x00007ffff46d32cd in sip_api_export_module (client=0x7ffff65f7be0 <sipModuleAPI_QtWidgets>, api_major=<optimized out>, api_minor=<optimized out>, unused=<optimized out>) at siplib.c:1722
#44 0x00007ffff62f1ca9 in PyInit_QtWidgets () from /home/ullix/geigerlog/vgl310a/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so
#45 0x00000000005160c0 in ?? ()
#46 0x00000000005120fb in ?? ()
#47 0x0000000000676bc2 in ?? ()
#48 0x000000000043e614 in PyVectorcall_Call ()
#49 0x000000000042689c in _PyEval_EvalFrameDefault ()
#50 0x00000000004efb4f in ?? ()
#51 0x000000000042383f in ?? ()
#52 0x000000000042db71 in _PyEval_EvalFrameDefault ()
#53 0x00000000004efb4f in ?? ()
#54 0x000000000042383f in ?? ()
#55 0x00000000004259d7 in _PyEval_EvalFrameDefault ()
#56 0x00000000004efb4f in ?? ()
#57 0x000000000042383f in ?? ()
#58 0x0000000000425f80 in _PyEval_EvalFrameDefault ()
#59 0x00000000004efb4f in ?? ()
#60 0x000000000042383f in ?? ()
#61 0x0000000000425f80 in _PyEval_EvalFrameDefault ()
---Type <return> to continue, or q <return> to quit---
#62 0x00000000004efb4f in ?? ()
#63 0x000000000042383f in ?? ()
#64 0x0000000000425f80 in _PyEval_EvalFrameDefault ()
#65 0x00000000004efb4f in ?? ()
#66 0x000000000043e09c in ?? ()
#67 0x0000000000440785 in _PyObject_CallMethodIdObjArgs ()
#68 0x0000000000514fa0 in PyImport_ImportModuleLevelObject ()
#69 0x000000000042d0db in _PyEval_EvalFrameDefault ()
#70 0x00000000004eef3b in PyEval_EvalCode ()
#71 0x0000000000533671 in ?? ()
#72 0x0000000000534f31 in PyRun_SimpleStringFlags ()
#73 0x000000000042e974 in Py_RunMain ()
#74 0x000000000042f424 in Py_BytesMain ()
#75 0x00007ffff6ab6840 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#76 0x000000000042e129 in _start ()
(gdb)
(gdb) Quit
(gdb) q
A debugging session is active.

    Inferior 1 [process 22363] will be killed.

Quit anyway? (y or n) y


More information about the PyQt mailing list