Bug 416038

Summary: Installation of debug packages fails, although they are already installed
Product: [Applications] drkonqi Reporter: Freek de Kruijf <freekdekruijf>
Component: backtraceparsingAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: fabian, sitter
Priority: NOR    
Version: 5.17.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.18.0
Sentry Crash Report:
Attachments: output of pmap -p `pidof akonadi_imap_resource`|grep KF5Akonadi

Description Freek de Kruijf 2020-01-09 11:23:04 UTC
SUMMARY
Always when I start kontact there is a crash of an akonadi_imap_resource bug#403391, which is there for quite some time, so I decided to report that this bug still exists. The crash triggers drkonqi and I am asked to install debug packages for:
/usr/bin/akonadi_imap_resource
/usr/lib64/libKF5AkonadiAgentBase.so.5
/usr/lib64/libKF5AkonadiCore.so.5
/usr/lib64/libKF5CoreAddons.so.5
/usr/lib64/libQt5Core.so.5
/usr/lib64/libQt5Widgets.so.5
However these debug packages are already installed, but drkonqi still needs these to be installed. A console windows opens, but shows errors, so these packages are not installed and I am unable to generate a traceback.

OBSERVED RESULT
Unable to extend the bug report.

EXPECTED RESULT
Adding new information to the bug report.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.3.12-2-default
(available in About System)
KDE Plasma Version: 5.17.4-1.1
KDE Frameworks Version: 5.65.0-2.1
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Comment 1 Harald Sitter 2020-01-15 10:49:35 UTC
Does this even happen after reboots?

When drkonqi is up, what's the output of:
pmap -p `pidof akonadi_imap_resource`|grep KF5Akonadi
Comment 2 Freek de Kruijf 2020-01-16 09:03:15 UTC
(In reply to Harald Sitter from comment #1)
> Does this even happen after reboots?

Yes

> When drkonqi is up, what's the output of:
> pmap -p `pidof akonadi_imap_resource`|grep KF5Akonadi

See attachment.
Comment 3 Freek de Kruijf 2020-01-16 09:04:39 UTC
Created attachment 125160 [details]
output of pmap -p `pidof akonadi_imap_resource`|grep KF5Akonadi
Comment 4 Freek de Kruijf 2020-01-16 09:05:23 UTC
Info reported
Comment 5 Harald Sitter 2020-01-16 09:20:51 UTC
So, not ephemeral file mismatches :/
I am pretty sure this isn't a bug in drkonqi though. It is correct in saying that the symbols are missing as we can see in https://bugs.kde.org/show_bug.cgi?id=403391#c20

What perhaps irritates me the most is that in some of the older backtraces you posted the symbols resolved just fine, so this isn't an entirely persistent issue either, is it?

@Fabian do you have any guess as to why gdb on opensuse wouldn't be able to find the symbols?
Comment 6 Fabian Vogt 2020-01-16 09:26:34 UTC
It's possible that the -debuginfo packages are installed, but not matching the non-debuginfo one.

There can be errors if drkonqi tries to install debuginfo without the debug repo enabled. That should be fixed with https://phabricator.kde.org/D24751 (never heard back from the reporter again...).

What's the output of "rpm -q libQt5Core5 libQt5Core5-debuginfo"?
Can you provide the full output of gdb? Normally gdb prints helpful info about the debuginfo files like "CRC mismatch" or ".debug not found".
Comment 7 Freek de Kruijf 2020-01-16 12:53:45 UTC
(In reply to Fabian Vogt from comment #6)
> It's possible that the -debuginfo packages are installed, but not matching
> the non-debuginfo one.
> 
> There can be errors if drkonqi tries to install debuginfo without the debug
> repo enabled. That should be fixed with https://phabricator.kde.org/D24751
> (never heard back from the reporter again...).
> 
> What's the output of "rpm -q libQt5Core5 libQt5Core5-debuginfo"?

# rpm -q libQt5Core5 libQt5Core5-debuginfo
libQt5Core5-5.13.1-2.5.x86_64
libQt5Core5-debuginfo-5.13.1-2.1.x86_64

For some reason the debug repository was disabled. Will come back to this later.

> Can you provide the full output of gdb? Normally gdb prints helpful info
> about the debuginfo files like "CRC mismatch" or ".debug not found".
Comment 8 Fabian Vogt 2020-01-16 12:55:42 UTC
(In reply to Freek de Kruijf from comment #7)
> (In reply to Fabian Vogt from comment #6)
> > It's possible that the -debuginfo packages are installed, but not matching
> > the non-debuginfo one.
> > 
> > There can be errors if drkonqi tries to install debuginfo without the debug
> > repo enabled. That should be fixed with https://phabricator.kde.org/D24751
> > (never heard back from the reporter again...).
> > 
> > What's the output of "rpm -q libQt5Core5 libQt5Core5-debuginfo"?
> 
> # rpm -q libQt5Core5 libQt5Core5-debuginfo
> libQt5Core5-5.13.1-2.5.x86_64
> libQt5Core5-debuginfo-5.13.1-2.1.x86_64
> 
> For some reason the debug repository was disabled. Will come back to this
> later.

Ok, so please give https://phabricator.kde.org/D24751 a try. It's a simple shell script, so you could just edit /usr/bin/installdbgsymbols.sh manually.
Comment 9 Freek de Kruijf 2020-01-17 08:54:40 UTC
The real problem here is that the error messages of the attempt to install missing packages are unreadable. The console in which they appear displays the messages but disappears immediately after that. drkonqi should introduce a "sleep 10" after the command to install the packages or a prompt asking to close the console.
Comment 10 Fabian Vogt 2020-01-17 08:56:02 UTC
(In reply to Freek de Kruijf from comment #9)
> The real problem here is that the error messages of the attempt to install
> missing packages are unreadable. The console in which they appear displays
> the messages but disappears immediately after that. drkonqi should introduce
> a "sleep 10" after the command to install the packages or a prompt asking to
> close the console.

Did you try the fix I linked?
Comment 11 Freek de Kruijf 2020-01-17 09:39:32 UTC
(In reply to Fabian Vogt from comment #10)
> Did you try the fix I linked?

The option "--plus-content debug" was not recognized by zypper. The "sleep 1" in there is far to small.
Comment 12 Fabian Vogt 2020-01-17 09:55:46 UTC
(In reply to Freek de Kruijf from comment #11)
> (In reply to Fabian Vogt from comment #10)
> > Did you try the fix I linked?
> 
> The option "--plus-content debug" was not recognized by zypper.

Just tested, works here on TW and Leap 15.0/15.1. Which version of openSUSE are you using?

> The "sleep 1" in there is far to small.

IMO it should wait for the user in case of errors ("Press any key to close this window")
Comment 13 Freek de Kruijf 2020-01-17 10:22:51 UTC
(In reply to Fabian Vogt from comment #12)
> (In reply to Freek de Kruijf from comment #11)
> > (In reply to Fabian Vogt from comment #10)
> > > Did you try the fix I linked?
> > 
> > The option "--plus-content debug" was not recognized by zypper.
> 
> Just tested, works here on TW and Leap 15.0/15.1. Which version of openSUSE
> are you using?

user > LC_ALL=C sudo zypper install --plus-content debug -C  "debuginfo(build-id)=6483cb4db033866eb1dc4990eaae4ee54e4c25fb"
The flag --plus-content is not known.

user > cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20200114"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20200114"
PRETTY_NAME="openSUSE Tumbleweed"

user > zypper -V
zypper 1.14.33
 
> > The "sleep 1" in there is far to small.
> 
> IMO it should wait for the user in case of errors ("Press any key to close
> this window")

I completely agree.
Comment 14 Fabian Vogt 2020-01-17 10:30:32 UTC
(In reply to Freek de Kruijf from comment #13)
> (In reply to Fabian Vogt from comment #12)
> > (In reply to Freek de Kruijf from comment #11)
> > > (In reply to Fabian Vogt from comment #10)
> > > > Did you try the fix I linked?
> > > 
> > > The option "--plus-content debug" was not recognized by zypper.
> > 
> > Just tested, works here on TW and Leap 15.0/15.1. Which version of openSUSE
> > are you using?
> 
> user > LC_ALL=C sudo zypper install --plus-content debug -C 
> "debuginfo(build-id)=6483cb4db033866eb1dc4990eaae4ee54e4c25fb"
> The flag --plus-content is not known.

The order is important. The linked diff does 

sudo zypper --plus-content install debug -C "debuginfo(build-id)=6483cb4db033866eb1dc4990eaae4ee54e4c25fb"

which should work fine.
Comment 15 Freek de Kruijf 2020-01-17 10:45:11 UTC
(In reply to Fabian Vogt from comment #14)
> > user > LC_ALL=C sudo zypper install --plus-content debug -C 
> > "debuginfo(build-id)=6483cb4db033866eb1dc4990eaae4ee54e4c25fb"
> > The flag --plus-content is not known.
> 
> The order is important. The linked diff does 
> 
> sudo zypper --plus-content install debug -C
> "debuginfo(build-id)=6483cb4db033866eb1dc4990eaae4ee54e4c25fb"

It should be "--plus-content debug install"

now it works! Thanks!!
Comment 16 Christophe Marin 2020-01-17 12:21:56 UTC
Git commit 807d9dccab085e3a17dadf110d3aee1cf1bef806 by Christophe Giboudeaux, on behalf of Fabian Vogt.
Committed on 17/01/2020 at 12:21.
Pushed by cgiboudeaux into branch 'Plasma/5.18'.

installdbgsymbols_suse: Pass --plus-content debug to zypper

Summary:
This way the repository with debuginfo does not have to be enabled
manually before clicking on the button.
This option works again now, so it should be passed as default.

Test Plan: Works locally. Reported success on the linked bug.

Reviewers: lbeltrame, cgiboudeaux

Reviewed By: cgiboudeaux

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24751

M  +1    -1    src/doc/examples/installdbgsymbols_suse.sh

https://commits.kde.org/drkonqi/807d9dccab085e3a17dadf110d3aee1cf1bef806