Opened 12 years ago

Closed 12 years ago

#2215 closed Bug (fixed)

Transmission segfaults on loading/adding torrents

Reported by: KyleK Owned by:
Priority: High Milestone: None Set
Component: Transmission Version: 1.71
Severity: Major Keywords:
Cc:

Description

@Charles,

I chased the segfault I told you about yesterday down to revision 8693. r8692 works just fine.

This is the log I get when providing an existing Transmission config (with 1 torrent that is complete/seeding):

[13:19:07.347] event readFromPipe: eventType is 2 (trevent.c:167)
[13:19:07.348] event command is [r], ret is 1, errno is 0 (trevent.c:177)
[13:19:07.348] event invoking function in libevent thread (trevent.c:188)
[13:19:07.348] tr_sessionInit: the session's top-level bandwidth object is 0x85628 (session.c:602)
[13:19:07.350] creating tracker timer (tracker.c:849)
[13:19:07.352] RPC Server: Adding address to whitelist: 127.0.0.1
[13:19:07.353] RPC Server: Adding address to whitelist: 192.168.178.*
[13:19:07.355] RPC Server: Serving RPC and Web requests on port 31339
[13:19:07.355] RPC Server: Whitelist enabled
[13:19:07.356] Transmission 1.71 (8681) started
[13:19:07.386] returning session 0x85530; session->tracker is 0x8ce10 (session.c:837)
[13:19:07.392] event readFromPipe: eventType is 2 (trevent.c:167)
[13:19:07.393] event command is [r], ret is 1, errno is 4 (trevent.c:177)
[13:19:07.394] event invoking function in libevent thread (trevent.c:188)
[13:19:07.406] event readFromPipe: eventType is 2 (trevent.c:167)
[13:19:07.407] event command is [r], ret is 1, errno is 4 (trevent.c:177)
[13:19:07.408] event invoking function in libevent thread (trevent.c:188)
Segmentation fault

If I start with a fresh profile, build 8693 runs as long as I don't try to add torrents:

$ transmission-remote -a 4a37552b.torrent

[13:22:05.946] RPC torrentAdd: filename is "(null)" (rpcimpl.c:1071)
Killed

Similarily, If I create a new profile, then quit the daemon, copy a torrent file to <profile>/torrents and restart the daemon, it also segfaults on startup.

No clue so far what this could be, unfortunately gdb doesn't work on the NAS so I can't debug. I can try on a Ubuntu VM later today.

PS: I would've set Version 1.71+, but it's not available :)

Change History (7)

comment:1 Changed 12 years ago by charles

KyleK: for what it's worth, I'm not seeing this error at all. valgrind is giving transmission-daemon a clean bill of health when I try to add torrents to it.

Does the problem appear when adding any torrent via the remote, or just that one? If you download a test case from legaltorrents.com will it still crash for you?

No clue so far what this could be, unfortunately gdb doesn't work on the NAS so I can't debug. I can try on a Ubuntu VM later today.

That would be good. Thanks for offering.

Does valgrind work inside the VM?

comment:2 Changed 12 years ago by KyleK

I haven't tested yet, but Valgrind should work in the VM.

I fear though that the issue won't show up in Ubuntu, while persistent on the NAS :(

We'll see.

comment:3 Changed 12 years ago by charles

The other thing is, I don't see anything in r8693 that would account for this problem. That's why I suggested valgrind; it might be more helpful. Typically I tweak daemon/my-valgrind.sh to add a "-g /tmp/test", or whatever is necessary for the test session, and run the script.

comment:4 Changed 12 years ago by charles

Another random thought: if it works on the VM but not on the NAS, is libevent being compiled correctly? If you're cross-compiling it for the NAS, is it building the correct event backend?

comment:5 Changed 12 years ago by KyleK

I'm not cross-compiling, I compile everything directly on the NAS. I use the bundled libevent, it has been working fine so far (without setting any env variables).

I can only assume that libevent is compiled correctly, because Transmission surely would complain otherwise?

comment:6 Changed 12 years ago by charles

If you're compiling directly on the NAS then libevent probably isn't the problem. The only reason I brought it up is because some other embedded platforms use a cross-compiler, which in the past has caused problems that manifest themselves with mysterious crashes.

Any luck with valgrind and/or gdb?

comment:7 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed

r8709 reportedly fixes this. (though I suspect it's more of a build issue ;)

Note: See TracTickets for help on using tickets.