FS#68859 - [hexchat] Python 3.9 Crashes HexChat 2.14

Attached to Project: Community Packages
Opened by Null Route (NullRoute) - Saturday, 05 December 2020, 14:16 GMT
Last edited by Christian Hesse (eworm) - Monday, 14 December 2020, 21:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Python 3.9 breaks Hexchat, it results in core dumps.


Additional info:
* HexChat - hexchat-2.14.3-4-x86_64.pkg.tar.zst
* Python - python-3.9.0-1-x86_64.pkg.tar.zst

Steps to reproduce:
Simply install HexChat and new Python to see this.

Workaround:
Downgrading back to Python 3.8.6 (including related python libs) and Hexchat 2.14.3-3 seems to at least not crash HexChat. But if hexchat run from terminal you can still see that its produces core dumps.
This task depends upon

Closed by  Christian Hesse (eworm)
Monday, 14 December 2020, 21:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  hexchat 2.14.3-5
Comment by Doug Newgard (Scimmia) - Saturday, 05 December 2020, 14:29 GMT
logs? Backtraces? Anything useful at all?
Comment by Filipe Laíns (FFY00) - Saturday, 05 December 2020, 18:31 GMT
I ran into the same problem.

#0 0x00007ffff0383624 in PyEval_ReleaseLock () at /usr/lib/libpython3.9.so.1.0
#1 0x00007ffff0ac8842 in () at /usr/lib/hexchat/plugins/python.so
#2 0x00005555555db978 in ()
#3 0x00005555555f42ac in ()
#4 0x00005555555e30a5 in ()
#5 0x00007ffff7c5d8f4 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#6 0x00007ffff7cb1821 in () at /usr/lib/libglib-2.0.so.0
#7 0x00007ffff7c5ce43 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#8 0x00007ffff78edb7e in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#9 0x000055555558f4da in fe_main ()
#10 0x0000555555581828 in main ()

The current hexchat Python plugin relies on PyEval_ReleaseLock, which has been deprecated since 3.2. Unfortunately there isn't a clean upstream fix for this as they just rewrote the whole plugin in CFFI (706f9bca82d463f6f1bd17d5dc609807e4a1e8a9).

I'd recommend either disabling the Python plugin for now or use the new Python plugin from master.

Btw, with the current plugin, hexchat will also crash if there is invalid Python syntax in your plugins.

Loading...