Comments (7)
I posted an issue to CPython for this: python/cpython#116510
I also noticed that it's fixed in version v3.13.0a4.
from weechat.
If title is unloaded before autosort then weechat does not crash on exit:
- /script unload title
- /exit
- no crash
If autosort is unloaded before title then weechat does crash on exit or on unloading of title:
- /script unload autosort
- /script unload title
- crash
from weechat.
Does the crash happen with any Python script?
Did you try with two different scripts (if possible very small scripts, doing almost nothing)?
from weechat.
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:
- /script unload grep.py
- /exit
- no crash
If go.py is unloaded before grep.py then weechat does crash on exit or on unloading of grep.py:
- /script unload go.py
- /script unload grep.py
- crash
Note: going straight for /exit when grep.py and go.py are both installed and loaded also results in the crash.
from weechat.
Hi,
I can not reproduce on Debian (Sid/unstable) with Python 3.11 (not 3.12, that could explain), is it possible to write a short Dockerfile based on voidlinux to reproduce the crash inside, so I can investigate?
from weechat.
Hi there,
I can also reproduce the issue with read_marker.py
and soju.py
loaded, in that order. For some reason, loading soju.py
first does not trigger the issue every time.
Reproducer:
- run
weechat -s
to disable autoloading of any script /script load read_marker.py
/script load soju.py
/quit
Here is some more debug info if that helps:
Python 3.12.1 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] on linux
======= WeeChat backtrace =======
(written by WeeChat 4.2.1, compiled on Feb 14 2024 23:44:18)
001 /home/rjarry/upstream/weechat/src/core/wee-backtrace.c:167 [function weechat_backtrace]
002 /home/rjarry/upstream/weechat/src/core/wee-debug.c:192 [function debug_sigsegv_cb]
003 ??:? [function __restore_rt]
004 ??:? [function _PyObject_FastCallDictTstate]
005 ??:? [function PyObject_Free]
006 ??:? [function _PyModule_ClearDict]
007 ??:? [function PyGC_Collect]
008 ??:? [function Py_EndInterpreter]
009 /home/rjarry/upstream/weechat/src/plugins/python/weechat-python.c:978 [function weechat_python_unload]
010 /home/rjarry/upstream/weechat/src/plugins/python/weechat-python.c:1022 [function weechat_python_unload_all]
011 /home/rjarry/upstream/weechat/src/plugins/plugin-script.c:1791 [function plugin_script_end]
012 /home/rjarry/upstream/weechat/src/plugins/python/weechat-python.c:1569 [function weechat_plugin_end]
013 /home/rjarry/upstream/weechat/src/plugins/plugin.c:1259 [function plugin_unload]
014 /home/rjarry/upstream/weechat/src/plugins/plugin.c:1306 [function plugin_unload_all]
015 /home/rjarry/upstream/weechat/src/plugins/plugin.c:1431 [function plugin_end]
016 /home/rjarry/upstream/weechat/src/core/weechat.c:710 [function weechat_end]
017 /home/rjarry/upstream/weechat/src/gui/curses/normal/main.c:47 [function main]
018 ??:? [function __libc_start_call_main]
019 :? [function __libc_start_main_alias_2]
020 ??:? [function _start]
======= End of backtrace =======
(gdb) thread apply all bt full
Thread 1 (Thread 0x7f4e332f0a80 (LWP 171986)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {
__val = {[0] = 140730321364448}
}
ret = <optimized out>
#1 0x00007f4e33aca8a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
No locals.
#2 0x00007f4e33a788ee in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007f4e33a608ff in __GI_abort () at abort.c:79
save_stage = 1
act = {
__sigaction_handler = {
sa_handler = 0x20,
sa_sigaction = 0x20
},
sa_mask = {
__val = {[0] = 139973852474048, [1] = 416, [2] = 14057664, [3] = 140730321364592, [4] = 139973851178954, [5] = 2, [6] = 18446744073709551472, [7] = 2, [8] = 14057248, [9] = 139973824960864, [10] = 18446744073709551472, [11] = 2, [12] = 12498224, [13] = 140730321364672, [14] = 139973851190238, [15] = 140730321364656}
},
sa_flags = 870771879,
sa_restorer = 0x7f4e318eb790
}
#4 0x0000000000406e6f in weechat_shutdown (return_code=1, crash=1) at /home/rjarry/upstream/weechat/src/core/weechat.c:600
No locals.
#5 0x00000000004355f7 in debug_sigsegv_cb () at /home/rjarry/upstream/weechat/src/core/wee-debug.c:192
No locals.
#6 <signal handler called>
No locals.
#7 0x00007f4e31df9a8d in _PyGCHead_SET_NEXT (next=0x7f4e318eb730, gc=0x7f4e3225f0c8) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Include/internal/pycore_gc.h:63
No locals.
#8 _PyObject_GC_UNTRACK (op=0x7f4e318eb790) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Include/internal/pycore_object.h:246
gc = 0x7f4e318eb780
prev = 0x7f4e3225f0c8
next = 0x7f4e318eb730
gc = <optimized out>
prev = <optimized out>
next = <optimized out>
#9 PyObject_GC_UnTrack (op_raw=0x7f4e318eb790) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Modules/gcmodule.c:2242
op = 0x7f4e318eb790
op = <optimized out>
#10 meth_dealloc (m=0x7f4e318eb790) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Objects/methodobject.c:162
No locals.
#11 0x00007f4e31dec157 in _Py_Dealloc (op=0x7f4e318eb790) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Objects/object.c:2625
type = <optimized out>
dealloc = <optimized out>
#12 Py_DECREF (op=0x7f4e318eb790) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Include/object.h:706
No locals.
#13 Py_XDECREF (op=0x7f4e318eb790) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Include/object.h:799
No locals.
#14 insertdict (interp=<optimized out>, mp=0x7f4e30bc7b00, key=0x7f4e32172740 <const_str_register>, hash=<optimized out>, value=0x7f4e321d5960 <_Py_NoneStruct>) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Objects/dictobject.c:1319
old_value = 0x7f4e318eb790
ix = <optimized out>
#15 0x00007f4e31e4fe60 in PyDict_SetItem (value=0x7f4e321d5960 <_Py_NoneStruct>, key=0x7f4e32172740 <const_str_register>, op=0x7f4e30bc7b00) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Objects/dictobject.c:1883
No locals.
#16 _PyModule_ClearDict (d=0x7f4e30bc7b00) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Objects/moduleobject.c:656
pos = 6
key = 0x7f4e32172740 <const_str_register>
value = 0x7f4e318eb790
verbose = <optimized out>
#17 0x00007f4e31ebde94 in finalize_modules_clear_weaklist (verbose=0, weaklist=0x7f4e30d294c0, interp=0x230a8e0) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Python/pylifecycle.c:1526
tup = <optimized out>
name = 0x7f4e30bc94a0
mod = 0x7f4e30bd8540
dict = <optimized out>
i = 70
#18 finalize_modules (tstate=tstate@entry=0x2368200) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Python/pylifecycle.c:1609
interp = <optimized out>
modules = <optimized out>
verbose = 0
weaklist = 0x7f4e30d294c0
#19 0x00007f4e31ecb494 in Py_EndInterpreter (tstate=0x2368200) at /usr/src/debug/python3.12-3.12.1-2.fc39.x86_64/Python/pylifecycle.c:2199
interp = 0x230a8e0
__func__ = "Py_EndInterpreter"
#20 0x00007f4e323fc007 in weechat_python_unload (script=0x2218e10) at /home/rjarry/upstream/weechat/src/plugins/python/weechat-python.c:975
rc = 0x270e6d0
interpreter = 0x2368200
filename = 0x5d074a0 "/home/rjarry/.local/share/weechat/python/autoload/soju.py"
#21 0x00007f4e323fc1c7 in weechat_python_unload_all () at /home/rjarry/upstream/weechat/src/plugins/python/weechat-python.c:1024
No locals.
#22 0x00007f4e3242c8a6 in plugin_script_end (weechat_plugin=0xe592a0, plugin_data=0x7f4e3243a140 <python_data>) at /home/rjarry/upstream/weechat/src/plugins/plugin-script.c:1790
scripts_loaded = 1
#23 0x00007f4e323fd76d in weechat_plugin_end (plugin=0xe592a0) at /home/rjarry/upstream/weechat/src/plugins/python/weechat-python.c:1568
No locals.
#24 0x00000000004c3fb5 in plugin_unload (plugin=0xe592a0) at /home/rjarry/upstream/weechat/src/plugins/plugin.c:1256
end_func = 0x7f4e323fd70c <weechat_plugin_end>
name = 0x1b45be0 "python"
#25 0x00000000004c411c in plugin_unload_all () at /home/rjarry/upstream/weechat/src/plugins/plugin.c:1308
plugins_loaded = 1
#26 0x00000000004c4475 in plugin_end () at /home/rjarry/upstream/weechat/src/plugins/plugin.c:1428
No locals.
#27 0x00000000004071a9 in weechat_end (gui_end_cb=0x4bb8df <gui_main_end>) at /home/rjarry/upstream/weechat/src/core/weechat.c:709
No locals.
#28 0x0000000000406129 in main (argc=1, argv=0x7ffe54d071d8) at /home/rjarry/upstream/weechat/src/gui/curses/normal/main.c:45
No locals.
from weechat.
I bisected this issue to this commit in cpython: python/cpython@de64e75
from weechat.
Related Issues (20)
- Add support of SGR mouse events
- memory leak after using a huge argument list to a command HOT 8
- /amsg and /ame also send in parted channels HOT 1
- add tags in buffer created with /exec -nf
- the hook_line always print a line even if there is no content HOT 1
- removing a line in a hook_line differ between free and formatted buffer HOT 1
- For many IRC signals, ${nick} is the server domain instead of the nick HOT 2
- Reusing a xfer chat buffer after an /upgrade breaks the buffer
- /input search_stop always scrolls to the bottom
- add an addreplace to all commands that have an add
- IRCv3 server-time messages delivered out of order are appended to the buffer which breaks IRC as a p2p protocol HOT 2
- Convert option weechat.look.hotlist_sort to a list of hdata fields
- API function to update hotlist for a buffer with direct values
- Support for more notify levels
- Behaviors search_text and search_text_here the same? HOT 1
- Expose setting custom FIFO path as CLI argument for convenience HOT 1
- Why does my custom buflist.format.buffer not respect color changes by weechat? HOT 1
- different syntax between mouse and cursor mode to specify all keys
- Error decoding websocket frame for client (API relay)
- account-notify causes /who spam in server buffer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weechat.