-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WeeChat crashes on exit when both title.py and autosort.py are loaded with Python 3.12 (voidlinux) #2046
Comments
If title is unloaded before autosort then weechat does not crash on exit:
If autosort is unloaded before title then weechat does crash on exit or on unloading of title:
|
Does the crash happen with any Python script? |
I can reproduce this crash with other python plugins. I reproduced the crash with the scripts go.py and grep.py both installed. If grep.py is unloaded before go.py then weechat does not crash on exit:
If go.py is unloaded before grep.py then weechat does crash on exit or on unloading of grep.py:
Note: going straight for /exit when grep.py and go.py are both installed and loaded also results in the crash. |
Hi, |
Hi there, I can also reproduce the issue with Reproducer:
Here is some more debug info if that helps:
|
I bisected this issue to this commit in cpython: python/cpython@de64e75 |
I posted an issue to CPython for this: python/cpython#116510 I also noticed that it's fixed in version v3.13.0a4. |
Python 3.12 has a bug where it crashes when you unload all the interpreters unless you make sure to unload the first interpreter you loaded last. For some reason, loading the eval interpreter before any scripts also seems to prevent the issue, even if the eval interpreter is unloaded before the other interpreters. So this just evals an empty string at the end of initing the Python plugin if the Python version is 3.12, to make sure the eval interpreter is loaded first. Fixes weechat#2046
Guys in IRC helped me to compile weechat's python plugin linked to python3.13. I have:
Here is a guide: https://gist.github.com/belkka/4dc42664fe383983c5a5d9d99da00952 Thanks to trygveaa and others at libera.chat for babysitting me. (do not confuse with trygveaa at github — they could be an impostor) |
Python 3.12 has a bug where it crashes when you unload all the interpreters unless you make sure to unload the first interpreter you loaded last. For some reason, loading the eval interpreter before any scripts also seems to prevent the issue, even if the eval interpreter is unloaded before the other interpreters. So this just evals an empty string at the end of initing the Python plugin if the Python version is 3.12, to make sure the eval interpreter is loaded first. Fixes #2046
Python 3.12 has a bug where it crashes when you unload all the interpreters unless you make sure to unload the first interpreter you loaded last. For some reason, loading the eval interpreter before any scripts also seems to prevent the issue, even if the eval interpreter is unloaded before the other interpreters. So this just evals an empty string at the end of initing the Python plugin if the Python version is 3.12, to make sure the eval interpreter is loaded first. Fixes #2046
So the issue is fixed even in python 3.12 now? 😮 |
I confirm that weechat doesn't crash on exit anymore! Thanks! For that I've upgraded to weechat 4.3.3, removed @flashcode(1) no, and this is actually rude. (2) the first question was a joke (which you decided to respond to), but the second question was an initiation of inter-person trust-establishment protocol. (3) I was not asking for this and have nothing to do with this information (even if I could verify the claim). I just pointed out that same-name identities on different hosts can be controlled by different people. I have no idea why you felt like it's important to start and continue this conversation. Feel free to stop as soon as you feel there is nothing valuable to tell; I'm not spamming with follow-ups demanding to answer my questions. Please, don't teach people to trust verifiable claims WITHOUT verification. Children could read github. Also, to clarify my wording: I chose the word "impostor" to add a humorous connotation influenced by a community of one popular game. While doing so, I was still only referring to the original meaning of the word (impersonation), not to any of the in-game activities (sabotage/killing). In particular, I didn't mean to say that any of github users could be "saboteurs". I thought I've made it clear from the context by saying "...do not confuse A with B..." |
I spent some time investigating today and came up with a different work-around. See: python/cpython#116510 (comment) How does your workaround work, do you think? |
Bug summary
When using weechat-4.1.1_1 and weechat-python-4.1.1_1 under voidlinux. When scripts title.py and autosort.py are both installed weechat crashes on exit.
Steps to reproduce
1. /script load title.py
2. /script load autosort.py
3. /exit
If no crash at this time then reloading weechat and /exit will definitely crash weechat in voidlinux.
Current behavior
Weechat crashes during exit when both scripts are installed.
Expected behavior
Weechat doesn't crash on exit when both scripts are installed.
Suggested solutions
Additional information
After bulding debug packages in voidlinux
gdb /usr/bin/weechat
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff626f76d in PyObject_GC_UnTrack () from /usr/lib/libpython3.12.so.1.0
bt full
The text was updated successfully, but these errors were encountered: