The tint2 crashes when it gets new tray icon since upgrading glib to 2.76.0. tint2: remove_icon: 35651590 () Thread 1 "tint2" received signal SIGSEGV, Segmentation fault. 0x0000555555577a2e in handle_x_event (e=0x7fffffffd4b0) at /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c:539 539 /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c: No such file or directory. (gdb) bt #0 0x0000555555577a2e in handle_x_event (e=0x7fffffffd4b0) at /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c:539 #1 0x0000555555577d6a in handle_x_events () at /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c:603 #2 0x00005555555788e7 in run_tint2_event_loop () at /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c:781 #3 0x0000555555578a98 in tint2 (argc=1, argv=0x7fffffffdfb8, restart=0x7fffffffde94) at /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c:824 #4 0x0000555555578c11 in main (argc=1, argv=0x7fffffffdfb8) at /var/portage/tmp/portage/x11-misc/tint2-17.1.3/work/tint2-v17.1.3/src/main.c:871 (gdb) Seems like one of many packages that are broken with new glib, same goes for openbox.
With glib-2.76.0 and tint2-17.1.3 Using pidgin-2.14.12 client, if pidgin is configured to put its icon in the tint2 system bar,closing pidgin breaks tint2 disappearing and leaving openbox without tint2. Fixed it by UD to the stable version of tint2-17.0.2. But then I had problems with mcabber and decided UD to glib-2.74.6 and a # emerge -euvaDN @world
Downgrading glib might lead to catastrophic system failure if you happen to rebuild other things with the new glib headers, you would be surprised how many things pulls in libglib via other dependencies, including openbox. Since tint2 is abandoned upstream I will most likely stop using it and switch to polybar or something similar.
For what it is worth. After trying out a bunch of potential replacements I've stayed longer with xfce4-panel with dock disabled. It even has nice GUI for configuration. In my box it did not pull in too many dependencies (I use plain Openbox).
I have experienced crashes with tint2 since March 2023, which indicates it is likely due to >=dev-libs/glib-2.76.0. The crashes that I see are when I get a new Thunderbird notification and try to remove the icon or notification pop-up. It doesn't happen all the time, but with some regularity. Just recently, it looks like a patched version of tint2 has been put into the Mabox Linux repositories: https://forum.maboxlinux.org/t/tint2-panel-started-disappearing-after-system-upgrade/1383/5 We may want to look into that patch in Gentoo.
Could you try dig up what the actual patch used is?
I posted on the Mabox Linux forum asking for details about the patch, but haven't yet received a response. However, it's possible that this is the referenced patch: https://bbs.archlinux.org/viewtopic.php?pid=2090946#p2090946
Mabox Linux Developer, napcok, confirmed the patch that I posted yesterday is the one that they have applied: https://forum.maboxlinux.org/t/tint2-panel-started-disappearing-after-system-upgrade/1383/15 and the corresponding patch from the Arch Linux forum: https://bbs.archlinux.org/viewtopic.php?pid=2090946#p2090946 Note that in Mabox Linux, they are using the 17.0.2 release (from o9000 on GitLab) instead of the forked 17.1.3 release (from Nikita Zlobin on GitLab) as the latter "seems very buggy".
Created attachment 864444 [details, diff] Patch from the Arch Linux forum for tint2-17.0.2 with glib-2.76
Created attachment 864742 [details, diff] Patch for 17.1.3 Analogous patch for 17.1.3 of uevent.c, plus the same kind of change in main.c handle_x_event(), which was the line identified in the stacktrace at https://gitlab.com/nick87720z/tint2/-/issues/4 Not sure if the main.c change is needed, since I had tried various versions of that without any positive result, but have been running with both these for a day now, and couldn't manage to force a crash.
I personally think that we go back to using the 17.0.2 release (from o9000 on GitLab) instead of the forked 17.1.3 release (from Nikita Zlobin on GitLab). This crash happens multiple times daily, so going back to the 17.0.2 release and applying this the applicable patch would be very helpful. Please let me know if you would like me to do any further testing. Thanks again for your time. Cheers, Nathan Zachary
FWIW I've been running the 17.1.3 patch I posted for almost 3 months now, with no crash or other unexpected behaviour.
(In reply to Arve Barsnes from comment #11) > FWIW I've been running the 17.1.3 patch I posted for almost 3 months now, > with no crash or other unexpected behaviour. Thank you for sharing your experience with the 17.1.3 patch as well. I wouldn't mind getting that one into the tree then either. It would just be nice to have a proper version available to all users.
So 17.1.3 is now stable in tree, I upgraded today from 17.0.2 and... kernel: tint2[3837]: segfault at 0 ip 00007f37c3742b1c sp 00007ffe2e49dd88 error 4 in libc.so.6[16db1c,7f37c35f9000+15f000] likely on CPU 15 (core 7, socket 0) kernel: Code: ff ff 48 89 f8 0f bc c9 f3 a4 c3 0f 1f 00 f3 0f 1e fa 89 f8 62 a1 fd 00 ef c0 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 24 01 00 00 <62> f1 7d 20 74 07 c5 fb 93 c0 85 c0 74 16 0f bc c0 c3 66 90 0f bc ...is the patch from this bug in current ebuild?
For me, tint2-17.1.3 doesn't even build with the original glib-2.76 patch. Using this new patch from Arch Linux fixes the build problem: https://gitlab.archlinux.org/archlinux/packaging/packages/tint2/-/blob/main/fix_segfault.patch?ref_type=heads Is there anyone that can update the ebuild to apply this patch in the src_prepare() function using `eapply`?
One more tint2 user here. I can confirm constant segfaults of 17.1.3, but provided patches don't help me (I've tried it as local overlay). What details may I submit to be useful?
Hello Kirill, Can you confirm that you have tried the patch that I mentioned from Arch Linux? https://gitlab.archlinux.org/archlinux/packaging/packages/tint2/-/blob/main/fix_segfault.patch?ref_type=heads I haven't seen any problems with that one in terms of building or running. If you try that one and still see segfaults, can you please provide a trace? Thank you. Cheers, Nathan Zachary
The Arch patch applies [from ../portage/patches/x11-misc/tint2/] and tint2 builds and runs. It still throws some errors when started from CLI and it still crashes. tint2: systray started tint2: got 5 X errors tint2: BadValue (integer parameter out of range for operation) tint2: BadDrawable (invalid Pixmap or Window parameter) tint2: BadValue (integer parameter out of range for operation) tint2: BadDrawable (invalid Pixmap or Window parameter) tint2: BadDrawable (invalid Pixmap or Window parameter) tint2: got 1 X errors tint2: BadDrawable (invalid Pixmap or Window parameter)
Have you confirmed that the patch is actually applying during the build? Chances are that it is, as it likely wouldn't even build properly with glib-2.78.x. Have you noticed any patterns to the crashes? Do you have a stack trace during the crash? I've had it running for nearly a month without any crashes.
Figured out how to patch 17.1.3: * Applying fix_segfault.patch ... patching file src/main.c Hunk #1 succeeded at 448 with fuzz 1 (offset 29 lines). Hunk #2 succeeded at 473 (offset 26 lines). patching file src/util/area.c Hunk #1 succeeded at 833 with fuzz 2 (offset 60 lines). >>> Source prepared. ...still crashes: kernel: tint2[12755]: segfault at 0 ip 00007fc5cf36151c sp 00007ffcc542fe98 error 4 in libc.so.6[17051c,7fc5cf215000+161000] likely on CPU 13 (core 6, socket 0) kernel: Code: ff ff 48 89 f8 0f bc c9 f3 a4 c3 0f 1f 00 f3 0f 1e fa .... ...how do I create a stack trace?
Please see the following wiki page for more information about generating a stack trace: https://wiki.gentoo.org/wiki/Debugging Cheers, Nathan Zachary
Finally figured it out: $ gdb /usr/bin/tint2 -c core Core was generated by `tint2'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f9cc14da51c in ?? () from /lib64/libc.so.6 (gdb) bt #0 0x00007f9cc14da51c in ??? () at /lib64/libc.so.6 #1 0x0000563511fa97d0 in init_separator () at /var/tmp/portage/x11-misc/tint2-17.1.3-r99/work/tint2-v17.1.3/src/separator/separator.c:52 #2 0x0000563511f8d2a4 in init_panel () at /var/tmp/portage/x11-misc/tint2-17.1.3-r99/work/tint2-v17.1.3/src/panel.c:202 #3 0x0000563511f923f0 in init (argc=<optimized out>, argv=argv@entry=0x7fff7708baa8) at /var/tmp/portage/x11-misc/tint2-17.1.3-r99/work/tint2-v17.1.3/src/init.c:322 #4 0x0000563511f914b3 in tint2 (argc=<optimized out>, argv=0x7fff7708baa8, restart=0x7fff7708b974) at /var/tmp/portage/x11-misc/tint2-17.1.3-r99/work/tint2-v17.1.3/src/main.c:818 #5 0x0000563511f86175 in main (argc=1, argv=0x7fff7708baa8) at /var/tmp/portage/x11-misc/tint2-17.1.3-r99/work/tint2-v17.1.3/src/main.c:875 (gdb) ...does that help?