Control: reassign -1 libvte-2.91-0 0.78.2-1
Control: affects -1 src:terminator
Control: tag -1 patch
On Wed, Jan 08, 2025 at 08:41:46PM +0100, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
>
>
> Relevant part (hopefully):
> > make[1]: Entering directory '/build/reproducible-path/terminator-2.1.4'
> > xvfb-run dh_auto_test
> > I: pybuild base:311: cd
> > /build/reproducible-path/terminator-2.1.4/.pybuild/cpython3_3.13/build;
> > python3.13 -m pytest --doctest-modules
> > ============================= test session starts
> > ==============================
> > platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 --
> > /usr/bin/python3.13
> > cachedir: .pytest_cache
> > rootdir:
> > /build/reproducible-path/terminator-2.1.4/.pybuild/cpython3_3.13/build
> > configfile: pytest.ini
> > plugins: typeguard-4.4.1
> > collecting ... collected 27 items / 1 error
> >
> > ==================================== ERRORS
> > ====================================
> > ___________ ERROR collecting terminatorlib/plugins/command_notify.py
> > ___________
> > TypeError: <Vte.Terminal object at 0x7f7c4dc6a1c0 (VteTerminal at
> > 0x18c1370)>: unknown signal name: notification-received
> >
> > The above exception was the direct cause of the following exception:
> > TypeError: <Vte.Terminal object at 0x7f7c4dc6a1c0 (VteTerminal at
> > 0x18c1370)>: unknown signal name: notification-received
> >
> > The above exception was the direct cause of the following exception:
> >
> > SystemError: <class 'gobject.Warning'> returned a result with an exception
> > set
> >
> > The above exception was the direct cause of the following exception:
> > terminatorlib/plugins/command_notify.py:26: in <module>
> > Vte.Terminal().connect('notification-received',lambda *args: None,None)
> > E SystemError: <class 'gobject.Warning'> returned a result with an
> > exception set
I tracked this down to what I think is a vte2.91 bug.
With python3.13-dbg and a local vte2.91 build to get me some debug
symbols, the top of the traceback looks like this:
Thread 1 "python3.13-dbg" received signal SIGABRT, Aborted.
0x00007ffff7d25d8c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff7d25d8c in ??? () at /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7cd1d02 in raise () at /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff7cba4f0 in abort () at /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff7cba418 in ??? () at /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff7cca612 in __assert_fail () at /lib/x86_64-linux-gnu/libc.so.6
#5 0x000000000053a663 in type_call (self=self@entry=<type at remote
0x11a0e80>, args=args@entry=('invalid (NULL) pointer instance',),
kwds=kwds@entry=0x0)
at ../Objects/typeobject.c:1950
#6 0x00000000004b93f8 in _PyObject_MakeTpCall
(tstate=tstate@entry=0xaf9de0 <_PyRuntime+299040>,
callable=callable@entry=<type at remote 0x11a0e80>,
args=args@entry=0x7fffffffc788, nargs=<optimized out>,
keywords=keywords@entry=0x0) at ../Objects/call.c:242
#7 0x00000000004b960b in _PyObject_VectorcallTstate
(tstate=0xaf9de0 <_PyRuntime+299040>, callable=callable@entry=<type at
remote 0x11a0e80>, args=args@entry=0x7fffffffc788, nargsf=<optimized out>,
nargsf@entry=9223372036854775809, kwnames=kwnames@entry=0x0) at
../Include/internal/pycore_call.h:166
#8 0x00000000004b96a2 in PyObject_CallOneArg (func=func@entry=<type at
remote 0x11a0e80>, arg=arg@entry='invalid (NULL) pointer instance') at
../Objects/call.c:395
#9 0x000000000058c5f2 in warn_explicit
(tstate=tstate@entry=0xaf9de0 <_PyRuntime+299040>,
category=category@entry=<type at remote 0x11a0e80>,
message=message@entry='invalid (NULL) pointer instance',
filename='/build/reproducible-path/terminator-2.1.4/.pybuild/cpython3_3.13/build/terminatorlib/plugins/command_notify.py',
lineno=26, module='terminatorlib.plugins.command_notify', registry={},
sourceline=0x0, source=0x0) at ../Python/_warnings.c:666
#10 0x000000000058ca2b in do_warn
(message='invalid (NULL) pointer instance', category=<type at remote
0x11a0e80>, stack_level=1, source=0x0,
skip_file_prefixes=skip_file_prefixes@entry=0x0)
at ../Python/_warnings.c:1002
#11 0x000000000058caa1 in warn_unicode (category=<optimized out>,
category@entry=<type at remote 0x11a0e80>, message=message@entry='invalid
(NULL) pointer instance', stack_level=stack_level@entry=1,
source=source@entry=0x0)
at ../Python/_warnings.c:1202
#12 0x000000000058d5c4 in PyErr_WarnEx (category=<type at remote 0x11a0e80>,
text=<optimized out>, stack_level=1) at ../Python/_warnings.c:1275
#13 0x00007ffff5a1122b in ??? () at
/usr/lib/python3/dist-packages/gi/_gi.cpython-313-x86_64-linux-gnu.so
#14 0x00007ffff590a5eb in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff590a943 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff5845aba in g_type_check_instance () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff583aed8 in g_signal_handlers_disconnect_matched () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007fffe43be49b in vte::platform::Widget::~Widget (this=0x15ac210,
__in_chrg=<optimized out>) at ../src/widget.cc:603
#19 0x00007fffe43642d7 in
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use
(this=0x15ac200) at /usr/include/c++/14/bits/shared_ptr_base.h:175
#20
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold
(this=0x15ac200) at /usr/include/c++/14/bits/shared_ptr_base.h:199
#21 0x00007fffe439fbc8 in
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x15ac200)
at /usr/include/c++/14/bits/shared_ptr_base.h:353
#22 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
(this=<optimized out>, __in_chrg=<optimized out>) at
/usr/include/c++/14/bits/shared_ptr_base.h:1069
#23 std::__shared_ptr<vte::platform::Widget,
(__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=<optimized out>,
__in_chrg=<optimized out>)
at /usr/include/c++/14/bits/shared_ptr_base.h:1525
#24 std::__shared_ptr<vte::platform::Widget,
(__gnu_cxx::_Lock_policy)2>::reset (this=0x134af90) at
/usr/include/c++/14/bits/shared_ptr_base.h:1643
#25 VteTerminalPrivate::reset (this=0x134af90) at ../src/vtegtk.cc:193
#26 vte_terminal_dispose (object=0x134b090) at ../src/vtegtk.cc:1015
#27 0x00007ffff5825279 in g_object_unref () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff5a0a74d in ??? () at
/usr/lib/python3/dist-packages/gi/_gi.cpython-313-x86_64-linux-gnu.so
#29 0x000000000053b955 in subtype_dealloc (self=<Terminal at remote
0x7fffe44582f0>) at ../Objects/typeobject.c:2384
#30 0x00000000005098ae in _Py_Dealloc (op=op@entry=<Terminal at remote
0x7fffe44582f0>) at ../Objects/object.c:2935
#31 0x00000000005caef9 in Py_DECREF (filename=filename@entry=0x7629e3
"../Python/generated_cases.c.h", lineno=lineno@entry=837, op=<Terminal at
remote 0x7fffe44582f0>)
at ../Include/object.h:934
#32 0x00000000005d1fbf in _PyEval_EvalFrameDefault (tstate=0xaf9de0
<_PyRuntime+299040>, frame=0x7ffff7ad27d8, throwflag=0) at
../Python/generated_cases.c.h:837
[...]
I believe the bug is in vte::platform::Widget::~Widget: it's passing a
null instance to g_signal_handlers_disconnect_matched, which is
reasonably complaining. This patch against upstream gets terminator's
tests to pass.
diff --git a/src/widget.cc b/src/widget.cc
index 66955a60..0daaed1e 100644
--- a/src/widget.cc
+++ b/src/widget.cc
@@ -600,10 +600,12 @@ Widget::Widget(VteTerminal* t)
Widget::~Widget() noexcept
try
{
- g_signal_handlers_disconnect_matched(m_settings.get(),
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- this);
+ if (m_settings) {
+ g_signal_handlers_disconnect_matched(m_settings.get(),
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ this);
+ }
if (m_vadjustment) {
g_signal_handlers_disconnect_by_func(m_vadjustment.get(),
I haven't contributed this upstream yet because my gitlab.gnome.org
account was deactivated a couple of years ago and I need to figure out
how to get it reactivated, but once that's done I'm happy to send it
upstream.
--
Colin Watson (he/him) [[email protected]]