Bug 319400 - KDE startup failure - hangs on startup
Summary: KDE startup failure - hangs on startup
Status: RESOLVED NOT A BUG
Alias: None
Product: ktouchpadenabler
Classification: Miscellaneous
Component: General (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 07:37 UTC by Alex
Modified: 2013-06-02 21:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Stack trace (some symbols missing) (2.61 KB, application/octet-stream)
2013-06-02 13:26 UTC, naur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2013-05-06 07:37:10 UTC
When I enter login and password, KDE startup arrives on the screen, 2 first items (HDD and a hammer with wrench) are shown and after it xsession hangs. Nothing more is done, not reply to mouse/kbd hits.

In ~/.xsession-errors I see the following:
/etc/X11/gdm/Xsession: Beginning session setup...
which: no keychain in (~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/qt/3/bin:/usr/lib64/subversion/bin:/usr/loca/intel/Compiler/11.1/038/bin/intel64)
/etc/X11/gdm/Xsession: Setup done, will execute: /usr/bin/dbus-launch --exit-with-session /usr/bin/ssh-agent -- /usr/bin/startkde
startkde: Starting up...
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kbuildsycoca4 running...
kded(14001) KDEDModule::setModuleName: registerObject() successful for  "device_automounter"
*** glibc detected *** kdeinit4: kded4 [kdeinit]: malloc(): memory corruption: 0x0000000001221560 ***

Currently I use gdm cause it makes possible to easily switch between gnome/kde (I have to work with gnome now), but same memory corruption takes place if I use kdm.

I had to file this bug as generic kde because kdeinit/kded4 are missing when choosing from the list.

Reproducible: Always

Steps to Reproduce:
Trivial, but looks like system-dependent




This bug happened a month or two ago after upgrading from KDE 4.9 to 4.10 with 4.10.1. When same happened for 4.10.2 I'ev decided that it's time to add a bug to the tracker. 

Gentoo linux is updated every week or two. Taking into an account that bug is system specific let me provide some info about the box:

uname -a:
Linux fbs 3.7.10-gentoo #1 SMP Tue Apr 9 11:29:27 MSK 2013 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux

glibc version is 2.15

lspci:
00:00.0 Host bridge: Advanced Micro Devices [AMD] nee ATI RD890 PCI to PCI bridge (external gfx0 port B) (rev 02)
00:02.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RD890 PCI to PCI bridge (PCI express gpp port B)
00:04.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RD890 PCI to PCI bridge (PCI express gpp port D)
00:09.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RD890 PCI to PCI bridge (PCI express gpp port H)
00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 42)
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA) (rev 40)
00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:15.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0)
00:16.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:16.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h Processor Function 5
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
02:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)

Closed-source nvidia driver is installed, version 319.17, same bug happened with 313.30.
Comment 1 Christoph Feck 2013-05-06 22:50:30 UTC
> *** glibc detected *** kdeinit4: kded4 [kdeinit]: malloc(): memory corruption: 0x0000000001221560 ***

A module in kded process caused memory corruption.

To find out, which module is responsible, please disable desktop files from /usr/share/kde4/services/kded/ by moving them to a different place, and try logging in again.

If you found the offending modules, please add the information here.

For more information about debugging kded, please see http://kdepepo.wordpress.com/2011/05/11/troubleshooting-kded4-bugs/
Comment 2 Alex 2013-05-07 08:05:30 UTC
Thank you, that helped. Module that causes problems is ktouchpadenabler.desktop. Taking into an account that my desktop definitely has no touchpad, my problem is solved. But if you need any more test/experiment, I'll be always glad to help. Causing memory corruption in heap is not good way to report missing device :)
Comment 3 Christoph Feck 2013-05-07 11:19:54 UTC
Thanks for the feedback. Reassigning.
Comment 4 Albert Astals Cid 2013-05-07 18:20:54 UTC
So ktouchpadenabler is crashing, you sure you're on 4.10.2 right? Because there was a similar crasher i fixer early in january. 

Anyway you can get a better bracktrace of the crash of kded using gdb? Maybe log into the session, attach to kded process with gdb, copy the .desktop file back to the folder, and enable the ktouchpadenabler again?

Christoph that ought to work no?

Alex do you understand what i'm asking for?
Comment 5 Alex 2013-05-08 10:18:57 UTC
Albert,
I have an experience working with gdb, the only thing which is not clear - how to enable ktouchpadenabler after copying .desktop file. 

Just to make sure - should this process
 4364 ?        Sl     0:01 kdeinit4: kded4 [kdeinit]         
and this binary
/usr/bin/kded4
be used? 

If yes
# file /usr/bin/kded4
/usr/bin/kded4: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

and for stripped file we have binary-only trace like this:

# gdb /usr/bin/kded4 4364
.....
(gdb) bt
#0  0x00007f0b8f459be3 in ?? ()
#1  0x0000000000cb7040 in ?? ()
#2  0x000000000000088c in ?? ()
#3  0x0000000000000008 in ?? ()
#4  0x0000000000cb7040 in ?? ()
#5  0x0000000000000001 in ?? ()
#6  0x00007f0b8c563965 in ?? ()
#7  0x00007f0b8f716620 in ?? ()
#8  0x0000000100954200 in ?? ()
#9  0x0000000000000001 in ?? ()
#10 0x7fffffff0000088c in ?? ()
#11 0x0000000000000000 in ?? ()

If it's not Ok for you, please provide instructions how to build kded with debuginfo.
Comment 6 Albert Astals Cid 2013-05-08 17:07:42 UTC
qdbus org.kde.kded /kded loadModule ktouchpadenabler

will load the ktouchpadenabler module again, you may need a kbuildsycoca4 run for it to work. About the debuginfo, i'm expecting the distro you use to provide debug packages, oh wait, you're using gentoo, well i'm guessing you'll have to ask around in gentoo forums which config file to get a debug build of kde stuff.
Comment 7 Alex 2013-05-15 13:18:05 UTC
When started this way 

qdbus org.kde.kded /kded loadModule ktouchpadenabler

ktouchpadenabler cause no harm - it just writes to ~/.xsession-errors 

kded(4313) TouchpadEnablerDaemonPrivate::TouchpadEnablerDaemonPrivate: Did not find a touchpad. If you have one, please report a bug against ktouchpadenabler in http://bugs.kde.org
kded(4313) KDEDModule::setModuleName: registerObject() successful for  "ktouchpadenabler"
Comment 8 Albert Astals Cid 2013-05-15 17:37:20 UTC
Ouch, that is weird :-/ Not sure how to continue here now :/ Christoph any idea on your side?
Comment 9 Alex 2013-05-17 07:18:18 UTC
If you can point to the way to rebuild related libraries w/o gentoo emerge (what src to use and may be non-trivial configure parameters), we can add sleep in the beginning of main() and I will gdb-attach to it from text tty.

I want to avoid gentoo emerge cause it's too generic and therefore too long.
Comment 10 Albert Astals Cid 2013-05-17 21:45:58 UTC
Well, you can get the code from anongit.kde.org/kde-workspace.git
then it's "just" a matter of running cmake . && make && make install
Comment 11 William Skinner 2013-05-25 15:49:10 UTC
I can confirm that this is a problem, at least with 4.10.2 and  Gentoo. i upgraded from 4.9.5 to 4.10.2 and had the same exact problem. I came across this bug report, moved ktouchpadenabler.desktop out of services/kded/, which fixed the problem.
Comment 12 naur 2013-06-02 13:26:28 UTC
Created attachment 80258 [details]
Stack trace (some symbols missing)

I managed to capture a slightly better backtrace. It actually seems that the bug is located in libXi.

I upgraded libXi from 1.4.1 to 1.6.1 on my system, and the problem went away.
Comment 13 Albert Astals Cid 2013-06-02 21:05:04 UTC
Good to know.