Ticket #1675 (closed defect: fixed)

Opened 13 months ago

Last modified 7 months ago

Licq runaway process whenever use Search History

Reported by: wed Owned by:
Priority: high Milestone: 1.3.7
Component: Plugin: Qt4/Kde4-GUI Version: 1.3.6
Keywords: Cc: wed080@…

Description (last modified by flynd) (diff)

Whenever I use "search" in History with Licq 1.3.6 in Mandriva 2009.1, I get a runaway process using 100% CPU. With luck I can kill it and get the attached licq.backtrace.

The console shows:

[w@localhost ~]$ licq                   
Backtrace (saved in /home/w/.licq//licq.backtrace):
licq(licq_handle_sigabrt+0x38a) [0x812c05a]        
[0xffffe400]                                       
[0xffffe424]                                       
/lib/i686/libc.so.6(gsignal+0x50) [0xb7a90c00]     
/lib/i686/libc.so.6(abort+0x188) [0xb7a92668]      
/lib/i686/libc.so.6 [0xb7ad1f63]                   
/lib/i686/libc.so.6 [0xb7ad5e75]                   
/lib/i686/libc.so.6(realloc+0x42) [0xb7ad67e2]     
/usr/lib/libQtCore.so.4(_Z8qReallocPvj+0x23) [0xb73689b3]
[0xa5d9078]                                              
Attempting to generate core file.                        

Licq has encountered a fatal error.
Please report this error either by creating a new ticket at http://trac.licq.org/ or by sending an e-mail to the mailing list licq-dev@googlegroups.com (you must be registered to be able to post, see http://trac.licq.org/wiki/MailingList).

To help us debug the error, please include a full description of what you did when the error occurred. Additionally, please include the following files (if they exist):
/home/w/.licq//licq.backtrace
/home/w/.licq//licq.backtrace.gdb

Thanks, The Licq Team
Aborted

Attachments

licq.backtrace (363 bytes) - added by wed 13 months ago.
licq.2.backtrace (363 bytes) - added by wed 13 months ago.
licq.3.backtrace (363 bytes) - added by wed 13 months ago.

Change History

Changed 13 months ago by wed

Changed 13 months ago by flynd

  • priority changed from highest to high
  • description modified (diff)

That backtrace looks a bit short. Do you have a licq.backtrace.gdb? If so please upload it as well. Otherwise could you run licq through a gdb and generate a stack trace of all threads ("thread apply all bt") when it hangs?

Does this happen always or just sometimes? Does it matter what you search for? Do you have checkboxes for match case or regular expression active?

Changed 13 months ago by wed

  • cc wed080@… added

Thanks for your suggestion - I had never heard of gdb previously! I ran it and installed licq-debug, and then ran it again. The problem occurs every time. I search for a word (neither checkbox match case or regular expression active). It will usually find one or two instances of that word on the given date (next or previous) and will sometimes even let me go to a previous date, but then suddenly everything on the computer freezes with CPU at 100% and I have to be pretty quick in killing licq in order to avoid a reboot. At most I can search for 3 or 4 instances of a word and sometimes not even that. This is what happened with gdb, and the generated stack of all threads. I cannot find any licq.backtrace.gdb in the .licq directory but perhaps it is somewhere else. I have attached the licq.backtrace.

[w@localhost ~]$ gdb licq
GNU gdb 6.8-6mdv2009.1 (Mandriva Linux release 2009.1)
Copyright (C) 2008 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 "i586-mandriva-linux-gnu"...                      
(gdb) run                                                                    
Starting program: /usr/bin/licq                                              
[Thread debugging using libthread_db enabled]                                
[New Thread 0xb7aee8e0 (LWP 11453)]                                          
Detaching after fork from child process 11482.                               
Detaching after fork from child process 11484.                               
Detaching after fork from child process 11486.                               
[New Thread 0xb65a8b90 (LWP 11488)]                                          
[New Thread 0xb5da7b90 (LWP 11489)]                                          
[New Thread 0xb55a6b90 (LWP 11490)]                                          
[New Thread 0xb4da5b90 (LWP 11491)]                                          
[New Thread 0xb45a4b90 (LWP 11492)]                                          

Program received signal SIGTERM, Terminated.
0xffffe424 in __kernel_vsyscall ()          
Missing debug package(s), you should install: OpenEXR-debug-1.6.1-3mdv2009.0.i586 bzip2-debug-1.0.5-5mdv2009.1.i586 dbus-debug-1.2.4.4permissive-2mdv2009.1.i586 fontconfig-debug-2.6.0-5mdv2009.1.i586 freetype2-debug-2.3.9-1plf2009.1.i586 gcc-debug-4.3.2-5mnb2.i586 glib2.0-debug-2.20.1-1mdv2009.1.i586 glibc-debug-2.9-0.20081113.5mnb2.i586 gpgme-debug-1.1.8-1mdv2009.1.i586 ilmbase-debug-1.0.1-6mdv2009.1.i586 jasper-debug-1.900.1-5.1mdv2009.1.i586 kdebase4-runtime-debug-4.2.2-7mdv2009.1.i586 kdelibs4-debug-4.2.2-26mdv2009.1.i586 lcms-debug-1.18-1.1mdv2009.1.i586 libgpg-error-debug-1.7-1mdv2009.1.i586 libice-debug-1.0.5-1mdv2009.1.i586 libjpeg-debug-6b-44mdv2009.1.i586 libmng-debug-1.0.10-9mdv2009.1.i586 libpng-debug-1.2.35-1mdv2009.1.i586 libsm-debug-1.1.0-1mdv2009.1.i586 libtiff-debug-3.8.2-13mdv2009.1.i586 libx11-debug-1.2.1-1.2mdv2009.1.i586 libxau-debug-1.0.4-1mdv2009.1.i586 libxcb-debug-1.2-1mdv2009.1.i586 libxcursor-debug-1.1.9-3mdv2009.1.i586 libxdmcp-debug-1.0.2-6mdv2009.1.i586 libxext-debug-1.0.5-2mdv2009.1.i586 libxfixes-debug-4.0.3-4mdv2009.1.i586 libxi-debug-1.2.1-1mdv2009.1.i586 libxinerama-debug-1.0.3-2mdv2009.1.i586 libxml2-debug-2.7.3-2mdv2009.1.i586 libxrandr-debug-1.3.0-1mdv2009.1.i586 libxrender-debug-0.9.4-4mdv2009.1.i586 libxtst-debug-1.0.3-3mdv2009.1.i586 openssl-debug-0.9.8k-1.1mdv2009.1.i586 pcre-debug-7.8-3mdv2009.1.i586 qt4-debug-4.5.0-3mdv2009.1.i586 xz-debug-4.999.8beta-0.2mdv2009.1.i586 zlib-debug-1.2.3-13mdv2009.1.i586                                
(gdb) thread apply all bt

Thread 6 (Thread 0xb45a4b90 (LWP 11492)):
#0  0xb7b8f221 in memcpy () from /lib/i686/libc.so.6
#1  0xb746b8f9 in QString::append () from /usr/lib/libQtCore.so.4
#2  0xb795c379 in LicqQtGui::MLView::toRichText (s=@0xb45a3314,
    highlightURLs=44, useHTML=false, highlight={priv = 0xb45a32fc})
    at /usr/src/debug/licq-1.3.6/plugins/qt4-gui/src/widgets/mlview.cpp:211
#3  0xb787da4d in LicqQtGui::HistoryDlg::showHistory (this=0x92b0210)
    at /usr/src/debug/licq-1.3.6/plugins/qt4-gui/src/dialogs/historydlg.cpp:350
#4  0xb787e786 in LicqQtGui::HistoryDlg::find (this=0x92b0210, backwards=true)
    at /usr/src/debug/licq-1.3.6/plugins/qt4-gui/src/dialogs/historydlg.cpp:484
#5  0xb787ec43 in LicqQtGui::HistoryDlg::findPrevious (this=0x92b0210)
    at /usr/src/debug/licq-1.3.6/plugins/qt4-gui/src/dialogs/historydlg.cpp:385
#6  0xb78d908c in LicqQtGui::HistoryDlg::qt_metacall (this=0x92b0210,
---Type <return> to continue, or q <return> to quit---q
_c=QMetaOQuit
(gdb)

Changed 13 months ago by wed

Changed 13 months ago by flynd

  • component changed from None to qt4-gui

Thanks for the information. In the future, you should press return to let gdb print the entire backtrace instead of quitting. However, I think the part you got will be enough for now.

I'll take a closer look at the loop in MLView::toRichText to see if I can find any reason for it to spin. In the mean time, I have a few more questions:

Does this happen for the history of any user or just one or some few users?
Which version of Qt are you using?
Can you try with the latest development version and see if it still happens there?

Changed 13 months ago by wed

Changed 13 months ago by wed

I only have two users in my history and the problem happens for both of them. It even happens if I create a new history. The following qt Mandriva packages are installed:

libqtcore4_4.5.0-3mdv2009.1.rpm
libqtgui4_4.5.0-3mdv2009.1.rpm
licqqt4_1.3.6-1mdv2009.1.rpm

I have repeated the gdb experiment this time with the other user history and pressing return. In this case it did not even let me find one instance of the word before freezing:

[w@localhost ~]$ gdb licq
GNU gdb 6.8-6mdv2009.1 (Mandriva Linux release 2009.1)
Copyright (C) 2008 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 "i586-mandriva-linux-gnu"...                      
(gdb) run                                                                    
Starting program: /usr/bin/licq                                              
[Thread debugging using libthread_db enabled]                                
[New Thread 0xb7adf8e0 (LWP 9782)]                                           
Detaching after fork from child process 9811.                                
Detaching after fork from child process 9813.                                
Detaching after fork from child process 9815.                                
[New Thread 0xb6599b90 (LWP 9817)]                                           
[New Thread 0xb5d98b90 (LWP 9818)]                                           
[New Thread 0xb5597b90 (LWP 9819)]                                           
[New Thread 0xb4d96b90 (LWP 9820)]                                           
[New Thread 0xb4595b90 (LWP 9821)]                                           

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb4595b90 (LWP 9821)]
0xffffe424 in __kernel_vsyscall ()         
Missing debug package(s), you should install: OpenEXR-debug-1.6.1-3mdv2009.0.i586 bzip2-debug-1.0.5-5mdv2009.1.i586 dbus-debug-1.2.4.4permissive-2mdv2009.1.i586 fontconfig-debug-2.6.0-5mdv2009.1.i586 freetype2-debug-2.3.9-1plf2009.1.i586 gcc-debug-4.3.2-5mnb2.i586 glib2.0-debug-2.20.1-1mdv2009.1.i586 glibc-debug-2.9-0.20081113.5mnb2.i586 gpgme-debug-1.1.8-1mdv2009.1.i586 ilmbase-debug-1.0.1-6mdv2009.1.i586 jasper-debug-1.900.1-5.1mdv2009.1.i586 kdebase4-runtime-debug-4.2.2-7mdv2009.1.i586 kdelibs4-debug-4.2.2-26mdv2009.1.i586 lcms-debug-1.18-1.1mdv2009.1.i586 libgpg-error-debug-1.7-1mdv2009.1.i586 libice-debug-1.0.5-1mdv2009.1.i586 libjpeg-debug-6b-44mdv2009.1.i586 libmng-debug-1.0.10-9mdv2009.1.i586 libpng-debug-1.2.35-1mdv2009.1.i586 libsm-debug-1.1.0-1mdv2009.1.i586 libtiff-debug-3.8.2-13mdv2009.1.i586 libx11-debug-1.2.1-1.2mdv2009.1.i586 libxau-debug-1.0.4-1mdv2009.1.i586 libxcb-debug-1.2-1mdv2009.1.i586 libxcursor-debug-1.1.9-3mdv2009.1.i586 libxdmcp-debug-1.0.2-6mdv2009.1.i586 libxext-debug-1.0.5-2mdv2009.1.i586 libxfixes-debug-4.0.3-4mdv2009.1.i586 libxi-debug-1.2.1-1mdv2009.1.i586 libxinerama-debug-1.0.3-2mdv2009.1.i586 libxml2-debug-2.7.3-2mdv2009.1.i586 libxrandr-debug-1.3.0-1mdv2009.1.i586 libxrender-debug-0.9.4-4mdv2009.1.i586 libxtst-debug-1.0.3-3mdv2009.1.i586 openssl-debug-0.9.8k-1.1mdv2009.1.i586 pcre-debug-7.8-3mdv2009.1.i586 qt4-debug-4.5.0-3mdv2009.1.i586 xz-debug-4.999.8beta-0.2mdv2009.1.i586 zlib-debug-1.2.3-13mdv2009.1.i586                                
(gdb)                                                                          
Display all 146 possibilities? (y or n)                                        
(gdb)                                                                          
(gdb) thread apply all bt                                                      

Thread 6 (Thread 0xb4595b90 (LWP 9821)):
#0  0xffffe424 in __kernel_vsyscall ()  
#1  0xb7b34c00 in raise () from /lib/i686/libc.so.6
#2  0xb7b36668 in abort () from /lib/i686/libc.so.6
#3  0xb7b75f63 in ?? () from /lib/i686/libc.so.6   
#4  0x084c0428 in ?? ()                            
#5  0xb4594000 in ?? ()                            
#6  0xb7b75c85 in ?? () from /lib/i686/libc.so.6   
#7  0xb4594034 in ?? ()                            
#8  0x20001002 in ?? ()                            
#9  0xb7c3f9a0 in ?? () from /lib/i686/libc.so.6   
#10 0x92d0700f in ?? ()                            
#11 0x087dd220 in ?? ()                            
#12 0x2000000f in ?? ()                            
#13 0xb7c58ff4 in ?? () from /lib/i686/libc.so.6   
#14 0x72d07008 in ?? ()                            
---Type <return> to continue, or q <return> to quit---
#15 0x00000000 in ?? ()                               

Thread 5 (Thread 0xb4d96b90 (LWP 9820)):
#0  0xffffe424 in __kernel_vsyscall ()  
#1  0xb7d98c45 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/i686/libpthread.so.0                  
#2  0x080e5748 in OscarServiceSendQueue_tep ()     
#3  0xb7d95315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb7be725e in clone () from /lib/i686/libc.so.6             

Thread 4 (Thread 0xb5597b90 (LWP 9819)):
#0  0xffffe424 in __kernel_vsyscall ()  
#1  0xb7bdf4c1 in select () from /lib/i686/libc.so.6
#2  0x080e16c9 in UpdateUsers_tep ()                
#3  0xb7d95315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb7be725e in clone () from /lib/i686/libc.so.6             

---Type <return> to continue, or q <return> to quit---
Thread 3 (Thread 0xb5d98b90 (LWP 9818)):              
#0  0xffffe424 in __kernel_vsyscall ()                
#1  0xb7bdf4c1 in select () from /lib/i686/libc.so.6  
#2  0x080e1da1 in Ping_tep ()                         
#3  0xb7d95315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb7be725e in clone () from /lib/i686/libc.so.6             

Thread 2 (Thread 0xb6599b90 (LWP 9817)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb7bdf4c1 in select () from /lib/i686/libc.so.6
#2  0x080e2865 in MonitorSockets_tep ()
#3  0xb7d95315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb7be725e in clone () from /lib/i686/libc.so.6

Thread 1 (Thread 0xb7adf8e0 (LWP 9782)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb7d98c45 in pthread_cond_wait@@GLIBC_2.3.2 ()
---Type <return> to continue, or q <return> to quit---
   from /lib/i686/libpthread.so.0
#2  0x08077e00 in CLicq::Main ()
#3  0x0807d23f in main ()
#0  0xffffe424 in __kernel_vsyscall ()
(gdb)
(gdb) q
The program is running.  Exit anyway? (y or n) y
[w@localhost ~]$

Changed 13 months ago by flynd

I added some safty checks in r6708 to make sure the highlighting doesn't run away. However I could only get that to happen by using a regexp that could match an empty string so I'm not sure if it solves this problem. But please try the latest svn version and see if the problem still appears.

Changed 10 months ago by flynd

  • status changed from new to closed
  • resolution set to fixed

No reply in 3 months. Closing ticket.

Note: See TracTickets for help on using tickets.