pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42578: KDE4 plasma crashes - Qt4 resolver interface issue



>Number:         42578
>Category:       pkg
>Synopsis:       KDE4 plasma crashes - Qt4 resolver interface issue
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 05 02:40:00 +0000 2010
>Originator:     Sverre Froyen
>Release:        NetBSD 5.99.23
>Organization:
        Viewmark
>Environment:
System: NetBSD abbor.fesk.com 5.99.23 NetBSD 5.99.23 (ABBOR) #12: Thu Dec 31 
10:02:20 MST 2009 
toor%abbor.fesk.com@localhost:/usr/src/obj.amd64/sys/arch/amd64/compile/ABBOR 
amd64
Architecture: x86_64
Machine: amd64
>Description:
At some point, possibly all the way back to when I first tried KDE4, I started 
to see crashes in plasma-desktop.  Because it restarts automatically, however, 
fixing it was not a priority, but I did start collecting backtraces from core 
dumps.  One of these shows a problem in the resolver library:

Core was generated by `plasma-desktop'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f7ff56e18ba in _lwp_kill () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7ff56e18ba in _lwp_kill () from /usr/lib/libc.so.12
#1  0x00007f7ffaea4f15 in KCrash::defaultCrashHandler (sig=11) at 
    /usr/pkgsrc/x11/kdelibs4/work.x86_64/kdelibs-4.3.4/kdeui/util/kcrash.cpp:258
#2  <signal handler called>
#3  0x00007f7ff5689bbb in _malloc_prefork () from /usr/lib/libc.so.12
#4  0x00007f7ff5689e13 in free () from /usr/lib/libc.so.12
#5  0x00007f7ff56a0f3d in __res_ndestroy () from /usr/lib/libc.so.12
#6  0x00007f7ff56a216f in __res_vinit () from /usr/lib/libc.so.12
#7  0x00007f7ff56a967b in res_init () from /usr/lib/libc.so.12
#8  0x00007f7ffb89e683 in QHostInfoAgent::fromName ()
...
>How-To-Repeat:
Use the KDE4 desktop on NetBSD current.
>Fix:
According to Christos, res_init should not be used in a multithreaded program 
program (which this is).  I do not pretend to understand the Qt code, but
res_init is called from QHostInfoAgent::fromName if local_res_init is set.
Preventing this variable from being set makes the crashes stop (for me at
least).  Besides, setting local_res_init seems superfluous since NetBSD
has res_ninit - which is thread-safe.  The following patch (to x11/qt4-libs)
 has worked well for me:

--- src/network/kernel/qhostinfo_unix.cpp.orig  2009-12-22 08:24:04.000000000 
-0700
+++ src/network/kernel/qhostinfo_unix.cpp       2009-12-22 08:25:32.000000000 
-0700
@@ -115,6 +115,8 @@ static void resolveLibrary()
         if (!local_res_nclose)
             local_res_ninit = 0;
     }
+    if (local_res_ninit)
+       local_res_init = 0;
 #endif
 }

>Unformatted:
 The KDE4 plasma desktop crashes randomly.


Home | Main Index | Thread Index | Old Index