Bug 11506 - Segmentation fault while calling drakconf as root in KDE4
Summary: Segmentation fault while calling drakconf as root in KDE4
Status: RESOLVED WORKSFORME
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2013-10-21 20:20 CEST by Bjarne Thomsen
Modified: 2013-12-05 17:21 CET (History)
2 users (show)

See Also:
Source RPM: drakconf
CVE:
Status comment:


Attachments
Output fro gdb (3.23 KB, text/plain)
2013-10-23 15:36 CEST, Bjarne Thomsen
Details
Output from gdb (3.22 KB, text/plain)
2013-10-23 15:59 CEST, Bjarne Thomsen
Details
Output from gdb pasted to this logfile (497 bytes, text/plain)
2013-10-23 21:47 CEST, Bjarne Thomsen
Details
List of debug packages (3.00 KB, text/plain)
2013-10-24 05:21 CEST, Bjarne Thomsen
Details
complete output from gdb with a segfault (2.95 KB, text/plain)
2013-10-24 05:25 CEST, Bjarne Thomsen
Details
Full gdb output (2.42 KB, text/plain)
2013-10-24 12:22 CEST, Bjarne Thomsen
Details

Description Bjarne Thomsen 2013-10-21 20:20:55 CEST
Description of problem:

drakconf gives segmentation fault while starting as root in KDE.
It works fine in IceWM, xfce4, and MATE
Version-Release number of selected component (if applicable):
All packages are updated from cauldron on October 20. 

How reproducible:
Apparently every time that drakconf is called.


Steps to Reproduce:
1. start terminal
2. su
3. drakconf
Segmentation fault

When running strace drakconf it does NOT crash at the same position.
While running "strace drakconf" several times I managed to get rpmdrake on the screen. So it does not repeat. 

Reproducible: 

Steps to Reproduce:
Comment 1 Bjarne Thomsen 2013-10-22 03:43:38 CEST
I should have mentioned that mageia cauldron is running in virtual box on mageia3. Also, the "Software Management" screen appears for a second before the crash. The problem could be virtualbox in combination with KDE4.

Source RPM: drakconf-12.43-2.mga4 => (none)

Comment 2 Bjarne Thomsen 2013-10-23 05:47:22 CEST
I have now updated 1282 packages from cauldron, but drakconf still segfaults in KDE4. I now reinstalled java-1.7.0.60-openjdk, and called drakconf in the MATE DE. It segfaulted the first time, but the next many times it worked!
Comment 3 Bjarne Thomsen 2013-10-23 06:09:22 CEST
I have now also obtained a segmentation fault while calling drakconf in xfce4, but this has so far only happened once. It never reached java, so it is doubtful that the problem has anything to do with java.
Comment 4 Bjarne Thomsen 2013-10-23 08:56:45 CEST
The above looks like a memory leak, so I tried valgrind.
valgrind -v --leak-check=full --show-reachable=yes /usr/bin/drakconf
..
==4270== LEAK SUMMARY:
==4270==    definitely lost: 356 bytes in 1 blocks
==4270==    indirectly lost: 4,173 bytes in 87 blocks
==4270==      possibly lost: 1,484,584 bytes in 4,091 blocks
==4270==    still reachable: 1,263,078 bytes in 15,972 blocks
==4270==         suppressed: 0 bytes in 0 blocks
==4270== 
==4270== ERROR SUMMARY: 161 errors from 161 contexts (suppressed: 0 from 0)
==4270== ERROR SUMMARY: 161 errors from 161 contexts (suppressed: 0 from 0)

So, what is causing it.
Manuel Hiebel 2013-10-23 10:31:32 CEST

Assignee: bugsquad => thierry.vignaud
Source RPM: (none) => drakconf

Comment 5 Bjarne Thomsen 2013-10-23 12:10:27 CEST
I do not understand valgrind! I had hoped that more than 0 errors meant that something was wrong. I have used valdgrind in Mageia3 on a real PC, and I obtain 4 errors with the identical command. Well, 4 is less than 161, but...
Comment 6 Thierry Vignaud 2013-10-23 14:26:24 CEST
The odds are high it's an issue with the qt/gtk/oxygen theme engine.

Could you try running drakconf from gdb?
1) install it: "urpmi gdb"
2) it would be nice to install debug packages:
  - enable the "Core Release Debug" medium in the medium manager
    (edit-urpm-sources.pl)
  - run "urpmi {perl{,-Gtk2,-Glib},glib2.0,gtk+2.0}-debuginfo"
3) run gdb: "gdb -q --args perl /usr/sbin/drakconf"
4) type "run" in order to tell gdb to actually start drakconf
5) type "bt" once it segfaults
6) copy the backtrace that is printed in some file you'll attach
   to this bug report (please do not paste it as a comment)

Keywords: (none) => NEEDINFO

Comment 7 Bjarne Thomsen 2013-10-23 15:36:41 CEST
Created attachment 4444 [details]
Output fro gdb

gdb -q --args perl /usr/bin/drakconf 2>&1 | tee logfile.txt

CC: (none) => bjarne.thomsen

Comment 8 Bjarne Thomsen 2013-10-23 15:40:54 CEST
The problem with the output above is that it exited normally.
Just running drakconf gives segmentation fault.
Comment 9 Thierry Vignaud 2013-10-23 15:42:03 CEST
I told you to use "sbin" in drakconf path, not "bin"
                   /\
Comment 10 Bjarne Thomsen 2013-10-23 15:59:14 CEST
Created attachment 4445 [details]
Output from gdb

gdb -q --args perl /usr/sbin/drakconf 2>&1 | tee logfile1.txt
No difference. It still exits normally.
Comment 11 Bjarne Thomsen 2013-10-23 16:11:38 CEST
I forgot to mention that gdb at the first run asked me to install debuginfo for 84 more packages that I could do by pasting the given long command to the command line.
Comment 12 Thierry Vignaud 2013-10-23 17:31:29 CEST
You mean that drakconf doesn't segfault when started from the debugger but only when run from the command line?
How do you run it?
Does running the "drakconf" command segfault?
Comment 13 Bjarne Thomsen 2013-10-23 19:14:07 CEST
Terminal:
# drakconf
The "Software Management" screen comes up for about 1 s, and then
# Segmentation fault
From within gdb:
(gdb) run
The "Software Management" screen comes up permanently until I quit.
(gdb) normal exit.

Somehow the debug code prevents the segfault.
Comment 14 Bjarne Thomsen 2013-10-23 21:47:28 CEST
Created attachment 4447 [details]
Output from gdb pasted to this logfile

New development. This time the output was not piped to a logfile. Instead the screen output was pasted to a file using vim. gdb was started by the command

gdb -q --args perl /usr/sbin/drakconf
(gdb) run

This time drakconf segfaulted inside gdb, and I could type bt.
The result is found in the attached file.
Comment 15 Thierry Vignaud 2013-10-23 22:59:17 CEST
Didn't gdb complained about some missing debuginfo packages?
What's the output of 'rpm -qa "*-debuginfo"'
Comment 16 Barry Jackson 2013-10-23 23:18:16 CEST
(In reply to Thierry Vignaud from comment #15)
> Didn't gdb complained about some missing debuginfo packages?

see comment #11

CC: (none) => zen25000

Comment 17 Thierry Vignaud 2013-10-24 01:50:09 CEST
I did saw but your trace is not complete.
Again, what's the output of 'rpm -qa "*-debuginfo"' ?
Comment 18 Bjarne Thomsen 2013-10-24 05:21:07 CEST
Created attachment 4448 [details]
List of debug packages

A few new debug packages were missing. I am quite sure they were not missing the first time. They are now installed. I did make an update to cauldron last night.
Comment 19 Bjarne Thomsen 2013-10-24 05:25:00 CEST
Created attachment 4449 [details]
complete output from gdb with a segfault

There is still something missing: a python module "backtrace".
How can I fix that?
Comment 20 Thierry Vignaud 2013-10-24 12:03:59 CEST
And yet it's not usable yet.
Try running directly:
gdb -q --args perl /usr/libexec/drakconf
Comment 21 Bjarne Thomsen 2013-10-24 12:22:21 CEST
Created attachment 4453 [details]
Full gdb output

This time it exited normally, but still
ImportError: No module named backtrace
Comment 22 Bjarne Thomsen 2013-10-27 19:42:11 CET
Any news on this bug? I still get a segmentation fault when calling drakconf in KDE4. Mageia4 from cauldron is running in virtualbox on Mageia3.
Comment 23 Bjarne Thomsen 2013-12-03 14:32:15 CET
Actually, I have some news on this bug. I have installed mageia4-beta1 from scratch, and the bug went away. Since then, I have updated on a regular basis, and the bug has never re-appeared again. I do not know why. I should perhaps mention that I am running Mageia4 in virtualbox.
Comment 24 Manuel Hiebel 2013-12-05 17:21:43 CET
So closing, there was some update too. If it come back feel free to reopen

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME


Note You need to log in before you can comment on or make changes to this bug.