Opened 14 years ago

Closed 14 years ago

#853 closed Bug (fixed)

transmission-(daemon|gtk) segfault when querying status

Reported by: icy Owned by: charles
Priority: High Milestone: 1.20
Component: Transmission Version: 1.11
Severity: Major Keywords:
Cc:

Description

The transmission daemon as well as the gtk frontend segfault when I query their status.

transmission-remote -t gtk -l => gtk frontend crashes daemon.get_stats_all() from the transmission python client => daemon segfaults

This is with the latest svn version on a amd64 ubuntu box.

transmission-daemon 1.10 from gentoo does not crash btw.

Trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47385743894000 (LWP 24453)]
tr_globalLock (handle=0x4) at transmission.c:228
228         tr_lockLock( handle->lock );
(gdb) bt
#0  tr_globalLock (handle=0x4) at transmission.c:228
#1  0x0000000000411b89 in tr_torrentStat (tor=0x670878) at torrent.c:90
#2  0x000000000040c287 in ipc_addstat (list=0x676ee8, torrent_id=47159, tor=0xcf55b, types=4193271)
    at ipcparse.c:667
#3  0x0000000000405ba0 in infomsg (id=<value optimized out>, val=<value optimized out>, 
    tag=<value optimized out>, arg=0x676e90) at server.c:715
#4  0x000000000040c11f in callmsgfunc (info=0x677550, name=0x678130, val=0x678148, 
    tagval=<value optimized out>, user_data=0x676e90) at ipcparse.c:990
#5  0x000000000040d4e0 in ipc_handleMessages (info=0x677550, 
    msgs=0x676ba0 "0000001dd7:versiond3:maxi2e3:mini1eee00000121l14:get-status-alll9:completed14:download-speed14:download-total5:error13:error-message3:eta2:id17:peers-downloading10:peers-from11:peers-total15:peers-upl"..., msgslen=334, user_data=0x676e90) at ipcparse.c:1038
#6  0x0000000000404a65 in doread (ev=0x67bc10, arg=0x676e90) at server.c:361
#7  0x0000000000439718 in event_base_loop (base=0x65b0a0, flags=0) at event.c:366
#8  0x0000000000403aaf in main (argc=<value optimized out>, argv=<value optimized out>)
    at daemon.c:104

Attachments (1)

ipc.patch (2.2 KB) - added by KyleK 14 years ago.

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by KyleK

comment:1 Changed 14 years ago by KyleK

The bug was introduced in revision 5547 (which btw had an incomplete log entry).

The function ipc_addstat() in ipcparse.c was changed, but not the respective calls of said function in gtk/ipc.c and daemon/server.c The attached patch should fix the segfaults. Since function torrent_stat() in daemon/torrents.c now no longer returns a tr_stat object, it probably should be renamed.

I tested with the daemon, and it worked fine. I was not able, however, to test the GTK build, since I'm running things on my NAS.

comment:2 Changed 14 years ago by charles

  • Milestone changed from None Set to 1.20
  • Resolution set to fixed
  • Status changed from new to closed

r5579 should work better.

I didn't mean to check in the ipc files with r5547.

comment:3 Changed 14 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 14 years ago by charles

  • Owner set to charles
  • Status changed from reopened to new

comment:5 Changed 14 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.