Bug 497010 - rtorrent or libtorrent crashes in konsole and gnome-terminal
rtorrent or libtorrent crashes in konsole and gnome-terminal
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: nss (Show other bugs)
10
i686 Linux
low Severity low
: ---
: ---
Assigned To: Kai Engert (:kaie)
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-21 22:11 EDT by Shawn Baker
Modified: 2014-01-20 06:11 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 455954
Environment:
Last Closed: 2009-12-18 04:18:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shawn Baker 2009-04-21 22:11:23 EDT
+++ This bug was initially created as a clone of Bug #455954 +++

Description of problem:
rtorrent or libtorrent crashes after a few minutes (konsole) or like 30 minutes
(gnome-terminal) runtime. This is a installation from a kde4-livecd of Fedora 9.
The system is uptodate until SatJul19. I will add a screenshot of it, because i
cant describe how it looks.

Version-Release number of selected component (if applicable):
rtorrent-0.7.8-3.fc9.i386
libtorrent-0.11.8-4.fc9.i386
gnome-terminal-2.22.2-1.fc9.i386
Konsole Version 2.0 on KDE 4.0.5

How reproducible:
Just start rtorrent and let it run for a while

Steps to Reproduce:
1. start rtorrent with some torrents in
2. wait (her it needs just up to 30 minutes)
3.
  
Actual results:
Like in the screenshot, crashing rtorrent

Expected results:
A rtorrent that works like before in F8, rock solid.

Additional info:
I will see if i can strace it.

--- Additional comment from thomasj@fedoraproject.org on 2008-07-19 04:23:26 EDT ---

Created an attachment (id=312194)
This is the screenshot in gnome-terminal. It looks exactly the same in Konsole.


--- Additional comment from thomasj@fedoraproject.org on 2008-07-19 06:49:04 EDT ---

This the strace output, there was a lot going on on my screen, but in the end
there was just this few lines left.

[thomas@dementia ~]$ rtorrent
) = 16
      ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
write(1, "Caught Segmentation fault, dumpi"..., 42Caught Segmentation fault,
dumping stack:
) = 42
futex(0xab1a74, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(1, "0 rtorrent [0x80637ac]\n", 230 rtorrent [0x80637ac]
) = 23
write(1, "1 rtorrent [0x806617c]\n", 231 rtorrent [0x806617c]
) = 23
write(1, "2 [0x110400]\n", 132 [0x110400]
)          = 13
write(1, "3 /usr/lib/libcurl.so.4(Curl_do+"..., 503
/usr/lib/libcurl.so.4(Curl_do+0xed) [0x399d20d]
) = 50
write(1, "4 /usr/lib/libcurl.so.4 [0x39acf"..., 364 /usr/lib/libcurl.so.4
[0x39acf5d]
) = 36
write(1, "5 /usr/lib/libcurl.so.4(curl_mul"..., 615
/usr/lib/libcurl.so.4(curl_multi_perform+0x59) [0x39ad2a9]
) = 61
write(1, "6 rtorrent [0x8088293]\n", 236 rtorrent [0x8088293]
) = 23
write(1, "7 rtorrent [0x808337a]\n", 237 rtorrent [0x808337a]
) = 23
write(1, "8 rtorrent [0x80642b8]\n", 238 rtorrent [0x80642b8]
) = 23
write(1, "9 /lib/libc.so.6(__libc_start_ma"..., 529
/lib/libc.so.6(__libc_start_main+0xe6) [0x9605d6]
) = 52
write(1, "10 rtorrent(_ZNSt8ios_base4InitD"..., 5410
rtorrent(_ZNSt8ios_base4InitD1Ev+0x51) [0x8052001]
) = 54
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(27330, 27330, SIGABRT)           = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++
[thomas@dementia ~]$

I hope it is helpful. If you need more or the output of other commands let me know.

--- Additional comment from thomasj@fedoraproject.org on 2008-07-19 08:41:13 EDT ---

Created an attachment (id=312201)
Ok, this is a better strace from gnome-terminal.


--- Additional comment from nikolay@vladimiroff.com on 2008-07-26 16:47:18 EDT ---

what version of libcurl are you using ? 

--- Additional comment from nikolay@vladimiroff.com on 2008-07-26 17:01:15 EDT ---

I'm having the same crash. I noticed that downgrading curl to 7.17.1 the crash
doesn't happen. Not sure about this. I may be just a coincidence. Can you try this? 

--- Additional comment from thomasj@fedoraproject.org on 2008-07-28 15:59:50 EDT ---

Well.. Interesting is, i tested rtorrent on another Box
(libcurl-7.18.2-1.fc9.i386) and without my old rtorrent.rc with just 1 File
(community-respin) and it runs for hours now.
It seems it is related to the old rtorrent.rc (i`ve done copy/paste from F8 to
F9) or if there are to many torrents the same time (about 40-50).

I cant test it again on the Box that fails, because there is no more Fedora on
it. There was to much trouble on this Laptop with Fedora, so i changed to
another Linux Distro.
But rtorrent runs on the Desktopsystem with F9, no rtorrent.rc and just 1 torrent.

--- Additional comment from bugs.michael@gmx.net on 2008-07-28 16:20:53 EDT ---

What does it look like if you get a full backtrace?
https://fedoraproject.org/wiki/StackTraces


--- Additional comment from nikolay@vladimiroff.com on 2008-07-29 04:58:11 EDT ---

Ah, I'm running rtorrent with about 50 torrents for 2 days now with no problem.
Latest rawhide. I guess this can be closed since no one  can reproduce it and
provide a backtrace.

--- Additional comment from nikolay@vladimiroff.com on 2008-12-23 12:53:36 EDT ---

Still no problem with fedora 10: 
libtorrent-0.12.4-1.fc10.x86_64
rtorrent-0.8.4-1.fc10.x86_64

I'm closing this. No need to be open since no one has complained for 4 months.

--- Additional comment from vinic@lardpirates.com on 2009-04-11 16:39:59 EDT ---

I'm getting this issue on fully-updated Fedora 10. rtorrent will run for between 30 minutes and a few hours before crashing with SIGABRT. Here's the backtrace made by following the directions in the aforementioned link:

Thread 1 (Thread 0xb7fe8740 (LWP 3377)):
#0  0x003d8416 in __kernel_vsyscall ()
#1  0x005f4460 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x005f5e28 in abort () at abort.c:88
#3  0x00631fed in __libc_message (do_abort=2, fmt=0x70ce68 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#4  0x006383a4 in malloc_printerr (action=2, str=0x70cf60 "double free or corruption (!prev)", ptr=0xa530788) at malloc.c:5994
#5  0x0063a356 in __libc_free (mem=0xa530788) at malloc.c:3625
#6  0x04765b37 in PR_Free () from /lib/libnspr4.so
#7  0x00e382f8 in ?? () from /lib/libnsspem.so
#8  0x00e2679b in ?? () from /lib/libnsspem.so
#9  0x00e283ce in ?? () from /lib/libnsspem.so
#10 0x00e2c7f4 in ?? () from /lib/libnsspem.so
#11 0x00e342c9 in ?? () from /lib/libnsspem.so
#12 0x00e234ac in ?? () from /lib/libnsspem.so
#13 0x047d2ece in ?? () from /lib/libnss3.so
#14 0x047d3150 in PK11_CreateGenericObject () from /lib/libnss3.so
#15 0x06084949 in nss_load_cert () from /usr/lib/libcurl.so.4
#16 0x0608544c in Curl_nss_connect () from /usr/lib/libcurl.so.4
#17 0x0607c2f5 in Curl_ssl_connect_nonblocking () from /usr/lib/libcurl.so.4
#18 0x06057291 in https_connecting () from /usr/lib/libcurl.so.4
#19 0x060629c1 in Curl_protocol_connect () from /usr/lib/libcurl.so.4
#20 0x06076cb7 in multi_runsingle () from /usr/lib/libcurl.so.4
#21 0x060771ba in multi_socket () from /usr/lib/libcurl.so.4
#22 0x06077285 in curl_multi_socket_action () from /usr/lib/libcurl.so.4
#23 0x0808f5f8 in core::CurlStack::receive_action (this=0x81163a8, socket=0x87f8208, events=3377) at curl_stack.cc:93
#24 0x08091206 in core::CurlSocket::event_write (this=0x87f8208) at curl_socket.cc:118
#25 0x0054977c in torrent::PollEPoll::perform (this=0x811cdc8) at poll_epoll.cc:168
#26 0x0808be8b in core::PollManagerEPoll::poll (this=0x811cc18, timeout={m_time = 938917}) at poll_manager_epoll.cc:74
#27 0x0806b6aa in main (argc=1, argv=0xbffff234) at main.cc:318

--- Additional comment from bugs.michael@gmx.net on 2009-04-12 02:25:43 EDT ---

To Shawn Baker:

This ticket is a closed one. Please open a new one. Your backtrace would be more detailed if you installed "nss-debuginfo" and "curl-debuginfo" e.g. by running "debuginfo-install -y nss curl", because the backtrace is deep into NSS.
Comment 1 Shawn Baker 2009-04-21 22:12:50 EDT
At this point, it seems to crash anywhere between half an hour to a few hours. Here's a new backtrace made after installing the aforementioned debuginfos:

Thread 1 (Thread 0xb7fe8740 (LWP 19691)):
#0  0x00aaf416 in __kernel_vsyscall ()
#1  0x00326460 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x00327e28 in abort () at abort.c:88
#3  0x00363fed in __libc_message (do_abort=2, fmt=0x43ee68 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#4  0x0036a3a4 in malloc_printerr (action=2, str=0x43ef60 "double free or corruption (!prev)", ptr=0xa612488) at malloc.c:5994
#5  0x0036c356 in __libc_free (mem=0xa612488) at malloc.c:3625
#6  0x04765b37 in PR_Free (ptr=0x0) at ../../../mozilla/nsprpub/pr/src/malloc/prmem.c:490
#7  0x006b32f8 in nss_ZRealloc (pointer=0xa612490, newSize=4096) at arena.c:1076
#8  0x006a179b in pem_CreateObject (fwInstance=0x8958de0, fwSession=0x895ad08, mdToken=0x8958f38, pTemplate=0xbfffdd84, ulAttributeCount=4, 
    pError=0xbfffdca8) at pobject.c:1080
#9  0x006a33ce in pem_mdSession_CreateObject (mdSession=0x895ad78, fwSession=0x895ad08, mdToken=0x8958f38, fwToken=0x895a2d8, mdInstance=0x6c4180, 
    fwInstance=0x8958de0, arena=0x895a238, pTemplate=0xbfffdd84, ulAttributeCount=4, pError=0xbfffdca8) at psession.c:156
#10 0x006a77f4 in nssCKFWSession_CreateObject (fwSession=0x895ad08, pTemplate=0xbfffdd84, ulAttributeCount=4, pError=0xbfffdca8) at session.c:1353
#11 0x006af2c9 in NSSCKFWC_CreateObject (fwInstance=0x8958de0, hSession=1, pTemplate=0xbfffdd84, ulCount=4, phObject=0xbfffdd38) at wrap.c:1991
#12 0x0069e4ac in pemC_CreateObject (hSession=1, pTemplate=0xbfffdd84, ulCount=4, phObject=0xbfffdd38) at ../../../../../dist/public/nss/nssck.api:566
#13 0x047d2ece in PK11_CreateNewObject (slot=0x8959f90, session=1, theTemplate=0xbfffdd84, count=4, token=0, objectID=0xbfffdd38) at pk11obj.c:412
#14 0x047d3150 in PK11_CreateGenericObject (slot=0x8959f90, pTemplate=0xbfffdd84, count=4, token=0) at pk11obj.c:1346
#15 0x06084949 in nss_load_cert () from /usr/lib/libcurl.so.4
#16 0x0608544c in Curl_nss_connect () from /usr/lib/libcurl.so.4
#17 0x0607c2f5 in Curl_ssl_connect_nonblocking () from /usr/lib/libcurl.so.4
#18 0x06057291 in https_connecting () from /usr/lib/libcurl.so.4
#19 0x060629c1 in Curl_protocol_connect () from /usr/lib/libcurl.so.4
#20 0x06076cb7 in multi_runsingle () from /usr/lib/libcurl.so.4
#21 0x060771ba in multi_socket () from /usr/lib/libcurl.so.4
#22 0x06077285 in curl_multi_socket_action () from /usr/lib/libcurl.so.4
#23 0x0808f5f8 in core::CurlStack::receive_action (this=0x81163a8, socket=0x9638868, events=19691) at curl_stack.cc:93
#24 0x08091206 in core::CurlSocket::event_write (this=0x9638868) at curl_socket.cc:118
#25 0x0054977c in torrent::PollEPoll::perform (this=0x811cdc8) at poll_epoll.cc:168
#26 0x0808be8b in core::PollManagerEPoll::poll (this=0x811cc18, timeout={m_time = 851908}) at poll_manager_epoll.cc:74
#27 0x0806b6aa in main (argc=1, argv=0xbffff574) at main.cc:318
Comment 2 Conrad Meyer 2009-04-21 22:19:54 EDT
Get a usable backtrace and send it to rtorrent upstream. I can't fix bugs like this, and I've never run into them using rtorrent for days at a time. As soon as rtorrent makes a new release I will be happy to push it as an update.

And what would gnome-terminal or konsole have *anything* to do with the issue?
Comment 3 Shawn Baker 2009-04-21 22:36:05 EDT
I found this ticket detailing the same problem I have, added to it, and was told to make a new one, so I cloned it. You'll have to ask the other commenters who kept the original ticket alive what it has to do with gnome-terminal or konsole.

What would I need to do to generate a more "usable" backtrace?
Comment 4 Conrad Meyer 2009-04-21 23:09:10 EDT
Comment #1 looks like a reasonable backtrace, but I'm not an rtorrent developer, there's not much I can do. Open a bug on their tracker.
Comment 5 Michael Schwendt 2009-04-22 04:09:32 EDT
At least let's ask the Fedora NSS and Curl maintainers for a second pair of eyes first. As I pointed out in the cloned bug 455954 comment 11, the "double free or corruption" crash is deep into NSS and NSPR with a longer code path from within Curl -- hopefully not caused by side-effects from unsafe threading.

Btw, next time *please* don't clone a bug, but really open a new one. One wants to eliminate old less useful or unrelated comments and strace logs from a different report, and at most mention the ticket number.
Comment 6 Kai Engert (:kaie) 2009-04-23 13:46:05 EDT
When you experienced this bug on Fedora 10, did you use nss-3.12.2.0-5.fc10 ?

That update got released after 2009-04-13.
It fixed an off-by-one error in the libpem module, which is listed multiple times in your stack trace.

It's been bug 483855.

It sounds like it could be the same issue.
Could you please test the new package?
Comment 7 Pavel Alexeev 2009-05-01 03:24:59 EDT
I've similar bug (coredump [1]), but I think it is not related Konsole, gnome-terminal or anyting other terminal emulator.

Caught Segmentation fault, dumping stack:
0 rtorrent [0x806a998]
1 rtorrent [0x806d46c]
2 [0x5d2400]
3 /lib/libcrypto.so.7(BN_num_bits+0x1c) [0x86360c]
4 /usr/lib/libtorrent.so.11 [0xcfea9a]
5 /usr/lib/libtorrent.so.11 [0xcedfe5]
6 /usr/lib/libtorrent.so.11 [0xcef556]
7 /usr/lib/libtorrent.so.11 [0xcef641]
8 /usr/lib/libtorrent.so.11(_ZN7torrent9PollEPoll7performEv+0x67) [0xcb9737]
9 rtorrent [0x808bb6f]
10 rtorrent [0x806b56e]
11 /lib/libc.so.6(__libc_start_main+0xe6) [0xabf5d6]
12 rtorrent(_ZNSt8ios_base4InitD1Ev+0x69) [0x8051d31]
bash: line 1: 10875 Аварийный останов         (core dumped) rtorrent

P.S. I can't find possibility to attach file in bugzilla... Didn't I search it well or it is not exist?

[1] http://ru.bir.ru/_temp/rtorrent/core.10875
Comment 8 Kai Engert (:kaie) 2009-05-07 15:54:19 EDT
Nobody responded to my question/request:

Please make sure you have at least nss-3.12.2.0-5.fc10 (or newer) installed.
Does it fix the bug?
Comment 9 Pavel Alexeev 2009-05-08 11:44:30 EDT
I'm have bit older version:
$ rpm -q nss
nss-3.12.2.0-3.fc9.i386

but it is last available in stable repositories for Fedora 9, which I use.
I check now, and in testing also have not updates for nss.
Comment 10 Michael Schwendt 2009-05-08 12:50:14 EDT
nss-3.12.2.0-3.fc9.i386 contains the same fixed (see package changelog) Kai refers to. But:

Pavel Alexeev,

please do open a new ticket and attach a complete backtrace ( http://fedoraproject.org/wiki/StackTraces ). For that you need to install a couple of missing -debuginfo packages. Your comment 7 looks entirely different than the previous traces posted in this bug. It's a different code path than e.g. comment 1 and involves just libtorrent/openssl/rtorrent but not nss.
Comment 11 Pavel Alexeev 2009-05-10 07:13:17 EDT
Ok, I reopen previous my bugreport. Sorry if it is not applicable to that error.
Comment 12 Bug Zapper 2009-11-18 07:50:24 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 13 Bug Zapper 2009-12-18 04:18:59 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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