How to debug Kmetronome

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

How to debug Kmetronome

Postby kateto » May 4th, '24, 08:38

Hello, I'm having trouble with Kmetronome (Drumstick Metronome).

It segfaults as soon as I click on the play button, any time. Since nobody reported this I assume it's a bug, so I'm trying to submit a proper bug report.

However I don't even know how to debug. I'm trying to follow the directions here (https://wiki.mageia.org/en/How_to_report_a_bug_properly) and here (https://wiki.mageia.org/en/Debugging_software_crashes). I installed kmetronome-debugsource and kmetronome-debuginfo. Then I run "gdb /usr/bin/kmetronome", but I only get this:

Code: Select all
[ruben@Fractal ACTIU]$ gdb /usr/bin/kmetronome
GNU gdb (GDB) 12.1-7.mga9 (Mageia release 9)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/kmetronome...
Reading symbols from /usr/lib/debug/usr/bin/kmetronome-1.3.1-1.mga9.x86_64.debug...


And then it stays there, doing nothing. The Kmetronome window doesn't show up at all, so I manually must quit gdb. What am I doing wrong?
kateto
 
Posts: 72
Joined: Jul 31st, '12, 13:00

Re: How to debug Kmetronome

Postby Germ » May 4th, '24, 14:08

start kmetronome from konsole and see if it shows anything interesting.
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 723
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA

Re: How to debug Kmetronome

Postby doktor5000 » May 4th, '24, 15:50

kateto wrote:
Code: Select all
Reading symbols from /usr/bin/kmetronome...
Reading symbols from /usr/lib/debug/usr/bin/kmetronome-1.3.1-1.mga9.x86_64.debug...


And then it stays there, doing nothing. The Kmetronome window doesn't show up at all, so I manually must quit gdb. What am I doing wrong?


After the last line you should get the gdb prompt. Enter "run" to actually start the program. Then click play. It segfaults and will tell you which debug packages are still missing.

Code: Select all
[doktor5000@Mageia9]─[15:33:20]─[~] gdb kmetronome
GNU gdb (GDB) 12.1-7.mga9 (Mageia release 9)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kmetronome...
Reading symbols from /usr/lib/debug/usr/bin/kmetronome-1.3.1-1.mga9.x86_64.debug...
(gdb) run
Starting program: /usr/bin/kmetronome
Missing separate debuginfos, use: debuginfo-install glibc-2.36-53.mga9.x86_64
/usr/bin/kmetronome: Symbol `_ZTVN9drumstick4ALSA14SequencerEventE' has different size in shared object, consider re-linking
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff46906c0 (LWP 287202)]
[New Thread 0x7ffff3e6f6c0 (LWP 287203)]
Failure loading Qt5 translations for "" from "/usr/share/qt6/translations"
[New Thread 0x7ffff34936c0 (LWP 287204)]
[New Thread 0x7ffff2b636c0 (LWP 287205)]
[New Thread 0x7ffff23626c0 (LWP 287206)]
[New Thread 0x7ffff1b616c0 (LWP 287207)]
[New Thread 0x7ffff13606c0 (LWP 287208)]

Thread 4 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff34936c0 (LWP 287204)]
0x0000000000000000 in ?? ()
Missing separate debuginfos, use: debuginfo-install lib64alsa2-1.2.9-1.mga9.x86_64 lib64b2_1-0.98.1-4.mga9.x86_64 lib64brotlicommon1-1.0.9-5.mga9.x86_64 lib64brotlidec1-1.0.9-5.mga9.x86_64 lib64bz2_1-1.0.8-5.mga9.x86_64 lib64dbus1_3-1.14.6-1.mga9.x86_64 lib64double-conversion3-3.2.1-1.mga9.x86_64 lib64drumstick2-2.7.2-1.mga9.x86_64 lib64fontconfig1-2.14.2-1.1.mga9.x86_64 lib64freetype6-2.13.0-1.mga9.tainted.x86_64 lib64gcrypt20-1.10.2-2.mga9.x86_64 lib64glib2.0_0-2.76.3-1.mga9.x86_64 lib64glx0-1.6.0-1.mga9.x86_64 lib64gpg-error0-1.47-1.mga9.x86_64 lib64graphite2_3-1.3.14-2.mga9.x86_64 lib64harfbuzz0-7.0.1-1.mga9.x86_64 lib64ice6-1.1.1-1.mga9.x86_64 lib64icu72-72.1-1.mga9.x86_64 lib64jpeg8-2.1.4-1.mga9.x86_64 lib64lz4_1-1.9.4-1.mga9.x86_64 lib64lzma5-5.4.3-1.mga9.x86_64 lib64md4c0-0.4.8-3.mga9.x86_64 lib64opengl0-1.6.0-1.mga9.x86_64 lib64pcre2_0-10.42-1.mga9.x86_64 lib64png16_16-1.6.38-1.mga9.x86_64 lib64qt6core6-6.4.1-5.mga9.x86_64 lib64qt6dbus6-6.4.1-5.mga9.x86_64 lib64qt6svg6-6.4.1-3.mga9.x86_64 lib64qt6svgwidgets6-6.4.1-3.mga9.x86_64 lib64qt6widgets6-6.4.1-5.mga9.x86_64 lib64sm6-1.2.4-1.mga9.x86_64 lib64systemd0-253.16-1.mga9.x86_64 lib64uuid1-2.38.1-1.1.mga9.x86_64 lib64x11_6-1.8.6-1.1.mga9.x86_64 lib64xau6-1.0.11-1.mga9.x86_64 lib64xcb-icccm4-0.4.2-1.mga9.x86_64 lib64xcb-randr0-1.15-2.mga9.x86_64 lib64xcb-render0-1.15-2.mga9.x86_64 lib64xcb-shape0-1.15-2.mga9.x86_64 lib64xcb-sync1-1.15-2.mga9.x86_64 lib64xcb-util-keysyms1-0.4.1-1.mga9.x86_64 lib64xcb-util-renderutil0-0.3.10-1.mga9.x86_64 lib64xcb-util1-0.4.1-1.mga9.x86_64 lib64xcb-xinput0-1.15-2.mga9.x86_64 lib64xcb-xkb1-1.15-2.mga9.x86_64 lib64xcursor1-1.2.1-1.mga9.x86_64 lib64xdmcp6-1.1.4-1.mga9.x86_64 lib64xfixes3-6.0.0-2.mga9.x86_64 lib64xkbcommon0-1.5.0-1.mga9.x86_64 lib64xml2_2-2.10.4-1.2.mga9.x86_64 lib64zstd1-1.5.5-1.mga9.x86_64 libstdc++6-12.3.0-3.mga9.x86_64 qtbase6-common-6.4.1-5.mga9.x86_64
(gdb)



This is what the full backtrace looks like, you can use that to report it as a bug:

Code: Select all
Reading symbols from kmetronome...
Reading symbols from /usr/lib/debug/usr/bin/kmetronome-1.3.1-1.mga9.x86_64.debug...
(gdb) run
Starting program: /usr/bin/kmetronome
Missing separate debuginfos, use: debuginfo-install glibc-2.36-53.mga9.x86_64
/usr/bin/kmetronome: Symbol `_ZTVN9drumstick4ALSA14SequencerEventE' has different size in shared object, consider re-linking
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff46906c0 (LWP 288527)]
[New Thread 0x7ffff3e6f6c0 (LWP 288528)]
Failure loading Qt5 translations for "" from "/usr/share/qt6/translations"
[New Thread 0x7ffff34936c0 (LWP 288529)]
[New Thread 0x7ffff2b636c0 (LWP 288530)]
[New Thread 0x7ffff23626c0 (LWP 288531)]
[New Thread 0x7ffff1b616c0 (LWP 288532)]
[New Thread 0x7ffff13606c0 (LWP 288533)]

Thread 4 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff34936c0 (LWP 288529)]
0x0000000000000000 in ?? ()
(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x00007ffff7f7f1c5 in drumstick::ALSA::MidiClient::doEvents (this=0x5c30b0) at /usr/src/debug/drumstick-2.7.2-1.mga9.x86_64/library/alsa/alsaclient.cpp:680
        err = <optimized out>
        evp = 0x69a7fc
        event = 0x7fffe8001390
#2  0x00007ffff7f7f739 in drumstick::ALSA::MidiClient::SequencerInputThread::run (this=0x67c9e0) at /usr/src/debug/drumstick-2.7.2-1.mga9.x86_64/library/alsa/alsaclient.cpp:1812
        rt = <optimized out>
        npfd = 1
        pfd = 0x7fffe8001370
#3  0x00007ffff66ea340 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase6-6.4.1-5.mga9.x86_64/src/corelib/thread/qthread_unix.cpp:321
        thr = 0x67c9e0
        data = 0x5d2ff0
        arg = <optimized out>
        arg = <optimized out>
        thr = <optimized out>
        data = <optimized out>
        locker = <optimized out>
#4  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at /usr/src/debug/qtbase6-6.4.1-5.mga9.x86_64/src/corelib/thread/qthread_unix.cpp:257
No locals.
#5  QThreadPrivate::start (arg=0x67c9e0) at /usr/src/debug/qtbase6-6.4.1-5.mga9.x86_64/src/corelib/thread/qthread_unix.cpp:280
        __clframe = {__cancel_routine = 0x7ffff66e9980 <QThreadPrivate::finish(void*)>, __cancel_arg = 0x67c9e0, __do_it = 1, __cancel_type = <optimized out>}
#6  0x00007ffff6ab19ca in start_thread () from /lib64/libc.so.6
No symbol table info available.
#7  0x00007ffff6b2d61c in clone3 () from /lib64/libc.so.6
No symbol table info available.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to debug Kmetronome

Postby kateto » May 6th, '24, 07:07

Thanks for the help. When I run Drumstick Metronome (Kmetronome; why two names?) from the terminal I get this:
Code: Select all
[ruben@Fractal ~]$ kmetronome
kmetronome: Symbol `_ZTVN9drumstick4ALSA14SequencerEventE' has different size in shared object, consider re-linking
Failure loading Qt5 translations for "" from "/usr/share/qt6/translations"
Violació de segment (s'ha bolcat la memòria)

The last sentence (which the terminal spits when Kmetronome crashes after clicking "Play") seems to mean "Segment violation (buffer overflow)" or something similar.
When I run Kmetronome from within gdb its window doesn't disappear but gets frozen after clicking "Play" and I have to manually kill it. However, when I run "bt full" in gdb I get this:
Code: Select all
(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: Cannot access memory at address 0x7ffff0e3ebd8

What is going on? Is this a proper backtrace? How to get more info?
It is unfortunate that the wiki page is so unclear, I'd improve it if I understood the whole debugging process.
kateto
 
Posts: 72
Joined: Jul 31st, '12, 13:00

Re: How to debug Kmetronome

Postby doktor5000 » May 6th, '24, 18:02

Not sure what you mean is unclear on that wiki page in particular, or what you didn't understand about the whole process.

And what you posted is definitely not a proper backtrace, simply compare it to the one I posted previously. (which BTW has enough information to create a bugreport for your issue, seems you missed that part).
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to debug Kmetronome

Postby kateto » May 7th, '24, 12:48

And what you posted is definitely not a proper backtrace, simply compare it to the one I posted previously. (which BTW has enough information to create a bugreport for your issue, seems you missed that part).

OK, so shall I use your post for the bug report?
And how come I can't get a backtrace? I thought the whole concept of debugging was getting something reproducible everywhere, that's why this stumbling block puzzles me.
As for the page, I don't even get what a "core file" is supposed to be, for example. It doesn't really seem aimed at newbies like me, who just want to help.
kateto
 
Posts: 72
Joined: Jul 31st, '12, 13:00

Re: How to debug Kmetronome

Postby doktor5000 » May 7th, '24, 18:53

Yes you can use it if you don't want to do that yourself. Unfortunately you didn't post what you actually see if you run kmetronome in gdb, as I did previously - or the output was cut.
There you can also see the debug packages that need to be installed to obtain a full backtrace.

For a core file, take a look at e.g. https://wiki.archlinux.org/title/Core_dump if you need some more explanation - this is usually known.
Also nobody mentioned that the wiki page is aimed at newbies.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron