Version: unspecified (using KDE 4.6.5) OS: Linux When launching ktorrent, it will load the main window, but in just a few seconds will crash, with error: 'Signal: Segmentation fault (11)' Reproducible: Always Steps to Reproduce: 1. Load 3000 torrents in ktorrent, most of them are completed (seeding), just a few of them are incomplete (still downloading) 2. Start ktorrent Actual Results: ktorrent crashes Expected Results: ktorrent should run normally I have just over 3000 (three thousands) torrents loaded in ktorrent, most likely this is part of the problem. I had similar issues in the past while running few hundreds torrents, I managed to work around it by removing all torrents and re-adding them. In this case, there are way too many torrents so that workaround is not feasible anymore, I'd rather have the problem fixed :) While I know this is quite large number of torrents for most regular users, this happens when I had much less torrents loaded, so this may be a generic issue that needs to be addressed. I also have another Virtual Machine with a few hundreds torrents, on which ktorrent crashes as well. We can troubleshoot on that one, if that is easier/better for you. Fixing this(these) bug(s) would make ktorrent more robust.
to be noted that the original problem occurred on this configuration: Gentoo Linux with: kernel 3.1.1, KDE 4.6.5, ktorrent 4.1.1, libktorrent 1.1.1 Steps taken to troubleshoot/fix the problem: 1. upgraded ktorrent to 4.1.2 and libktorrent to 1.1.2 from Gentoo portage, but the problem persists. 2. upgraded ktorrent to 9999 and libktorrent to 9999 from Gentoo 'kde' overlay (these versions are based on ktorrent 4.2dev) but the problem persists. 3. compiled libktorrent/ktorrent from source code latest version and installed them, following the steps here: http://ktorrent.org/wiki/index.php/FAQ#How_do_I_get_the_latest_code_.3F this didn't help also I am willing to do any troubleshooting steps and run any debugging programs you need, in order to have this fixed.
Post the backtrace of the crash
I'm pretty sure this is related to an old bug, bug 137640. Upgrading your kde version should fix it.
Do you know how to obtain that ? Is it just the report that KDE is generating at the time of crash or I need to take some special steps (using 'gdb' and or other tools) ?
(In reply to comment #3) > I'm pretty sure this is related to an old bug, bug 137640. Upgrading your kde > version should fix it. It is not very likely. That bug was reported in KDE 4.5.5, I am running KDE 4.6.5..
(In reply to comment #2) > Post the backtrace of the crash Do you know how to obtain that ? Is it just the report that KDE is generating at the time of crash or I need to take some special steps (using 'gdb' and or other tools) ?
In the developer information tab of the KDE crash dialog: http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Crash.21
Created attachment 66369 [details] crash after running overnight
Created attachment 66370 [details] crash at startup right after loading the main window
Somehow ktorrent managed to start yesterday and I let it run overnight, but it was already in 'crashed' when I checked this morning. When I try to start it again, sometimes starts, and sometimes crashes right after loading the main window. I attached both crash files from "Developer" tab, although KDE is complaining that they may not be useful. Should I recompile ktorrent and libktorrent with "-ggdb" flag as described here, in order to get better backtrace files? http://www.gentoo.org/proj/en/qa/backtraces.xml
I am trying to generate a useful backtrace log file. I followed the instructions here: http://www.gentoo.org/proj/en/qa/backtraces.xml I enabled -ggdb flag in make.conf and I enabled 'stripdebug' FEATURE in make.conf, after that I recompiled the packages libktorrent and ktorrent. Then I ran: marcus@Storage ~ $ gdb /usr/bin/ktorrent GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 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 "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/ktorrent...Reading symbols from /usr/lib64/debug/usr/bin/ktorrent.debug...done. done. (gdb) set logging file backtrace.log (gdb) set logging on Copying output to backtrace.log. (gdb) thread apply all bt full (gdb) run Starting program: /usr/bin/ktorrent [Thread debugging using libthread_db enabled] KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work Program exited normally. (gdb) KCrash: Application 'ktorrent' crashing... KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit sock_file=/home/marcus/.kde4/socket-Storage/kdeinit4__0 Warning: QSocketNotifier: Invalid socket 29 and type 'Read', disabling... (gdb) thread apply all bt full (gdb) quit For some reason, it says "Program exited normally" but immediately after that it is crashing. Also, nothing useful is recorded in backtrace.log marcus@Storage ~ $ cat backtrace.log Starting program: /usr/bin/ktorrent [Thread debugging using libthread_db enabled] Program exited normally Any advice on how to get a good backtrace log?
Created attachment 66378 [details] Backtrace log obtained with gdb. ktorrent crashed right after startup
I figured the problem, I had to do: (gdb) run --nofork and then I was able to save the backtrace. Let me know if this log is useful, I can generate more for you if you need. I will try to get a valgrind log as well, if you'd like.
Hi, do you have any updates for this bug? Is the backtrace log helpful at all? Is there anything else I can help with?
It is a duplicate of 274544 *** This bug has been marked as a duplicate of bug 274544 ***
If this bug is a duplicate of 27544, how come I am still experiencing it after updating to latest ktorrent? That bug was marked as fixed..
latest being ?
(In reply to comment #17) > latest being ? I basically followed the instructions here: http://ktorrent.org/wiki/index.php/FAQ#How_do_I_get_the_latest_code_.3F To be more precise these are the steps I followed, while logged-in as root: 1. Download source code: mkdir /torrentsource cd /torrentsource git clone git://anongit.kde.org/libktorrent git clone git://anongit.kde.org/ktorrent 2. Compile/install libktorrent: cd /torrentsource/libktorrent mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) .. make && make install 3. Compile/install ktorrent: cd /torrentsource/ktorrent mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) .. make && make install Then I tried launching ktorrent from my regular user 'marcus' and it keeps crashing. I just performed those steps once more, but still doesn't work. Please let me know if I did something wrong and if that's the case, how to correct it. Thanks a lot, -Marius
Can you please confirm the steps above are correct? If not, can you please tell me how to get latest ktorrent version so I can test it on my computer? I now have a similar problem (ktorrent crash at startup) on a virtual machine, I'd like to test it on that machine as well. thanks a lot, -Marius
I tried to collect the backtrace from ktorrent crashing on the virtual machine, however something is not working properly (or I am not doing it right). It seems that after crashing, no backtrace cam be generated: Marcus@DL1 ~ $ gdb /usr/bin/ktorrent GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 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 "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/ktorrent...Reading symbols from /usr/lib64/debug/usr/bin/ktorrent.debug...done. done. (gdb) run --nofork Starting program: /usr/bin/ktorrent --nofork [Thread debugging using libthread_db enabled] KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work [New Thread 0x7fffe8da0700 (LWP 29117)] [Thread 0x7fffe8da0700 (LWP 29117) exited] [New Thread 0x7fffe8da0700 (LWP 29118)] Warning: Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there. [Thread 0x7fffe8da0700 (LWP 29118) exited] Program exited normally. (gdb) set logging file backtrace.log (gdb) set logging on Copying output to backtrace.log. (gdb) thread apply all bt full (gdb) bt No stack. (gdb) quit marcus@DL1 ~ $ cat backtrace.log No stack.
Hi Joris, I would really appreciate if you could give this bug a higher priority. I am getting very late responses from you, this way it would take forever to troubleshoot/fix the problem. I already have two machines with ktorrent crashing (with slightly different behavior though). As I said before I am willing to spend as much time needed and to run any troubleshooting steps in order to have this fixed. ktorrent is very buggy in this current state, and I would be happy to help improving it. But that would require a bit more commitment from your side. thank you, -Marius
Can we please reassign this bug to someone else which has the time/commitment to work on it?
Marius, please be patient. Joris is the maintainer of KTorrent and he also has a day job and is working on this in his free time. AFAIK you are not paying him for the work he is doing. FWIW: I wasn't able to reproduce this despite several tries.
Hi Myriam, Can you please confirm at least if the steps I described at Comment #18 are the correct ones to get the latest version of the code? Otherwise please provide the correct steps to follow. Joris stated this is a duplicate bug, but it is critical to verify that I am running latest version. If I am indeed running latest version and ktorrent is still crashing that means this bug isn't a duplicate of another bug and should be properly investigated, am I correct? best regards, -Marius
So you are running latest code, then my fix doesn't fix the problem. It crashes somewhere in Qt, but I'm not sure if it is actually a Qt problem. I thought it had something to do with running out of file descriptors, but that should no longer be the problem with my previous fix.
What are the next steps, how do we get to the bottom of the problem so we can fix it? Also, we should un-mark this bug as Resolved/Duplicate, is that correct? These crashes happens very often, usually when I have more than 50-100 torrents in mixed status (seeding/downloading), ktorrent would always crash at startup. I have that VM where I am also running ktorrent, and ktorrent is barely usable. I have to remove torrents manually one by one from the folder where it keeps the torrent information (those "torXYZ" folders, where X, Y, Z are digits 0 to 9) in order to have ktorrent starting up again without crashing...
Hmmm... Marius, could you, please: 1. Reemerge libktorrent-9999 and ktorrent-9999 again and 2. provide us the valgrind log: valgrind -v --log-file=%p.log --num-callers=50 ktorrent --nofork
Created attachment 68695 [details] ktorrent crash at startup, backtrace
Without the valgrind trace, this is impossible to fix.