Opened 8 years ago

Closed 7 years ago

#5294 closed Bug (fixed)

Crash in Transmission 14017, OSX 10.8.2, Assertion Failure

Reported by: mw3demo Owned by: jordan
Priority: Normal Milestone:
Component: libtransmission Version: 2.77+
Severity: Normal Keywords:
Cc:

Description (last modified by jordan)

Not exactly sure, transmission was opened, roughly 5 minutes later it crashed.

Process: Transmission [8457] Path: /Applications/Transmission?.app/Contents/MacOS/Transmission Identifier: org.m0k.transmission Version: 2.76 + (14017) Code Type: X86-64 (Native) Parent Process: launchd [146] User ID: 501

Date/Time?: 2013-02-13 18:07:44.706 +0000 OS Version: Mac OS X 10.8.2 (12C60) Report Version: 10

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information: Assertion failed: (i < array->n_items), function tr_ptrArrayNth, file /Users/transmission/jenkins/workspace/trunk-mac/libtransmission/ptrarray.h, line 62.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff85779212 pthread_kill + 10 1 libsystem_c.dylib 0x00007fff8678eaf4 pthread_kill + 90 2 libsystem_c.dylib 0x00007fff867d2dce abort + 143 3 libsystem_c.dylib 0x00007fff867d3e2a assert_rtn + 146 4 org.m0k.transmission 0x0000000100084a2f tr_peerMgrTorrentStats + 427 5 org.m0k.transmission 0x000000010006dcfb tr_torrentStat + 244 6 org.m0k.transmission 0x000000010002a654 -[Torrent(Private) ratioLimitHit] + 25 7 com.apple.Foundation 0x00007fff86f51677 NSThreadPerformPerform + 225 8 com.apple.CoreFoundation? 0x00007fff8ee44101 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 9 com.apple.CoreFoundation? 0x00007fff8ee43a25 CFRunLoopDoSources0 + 245 10 com.apple.CoreFoundation? 0x00007fff8ee66dc5 CFRunLoopRun + 789 11 com.apple.CoreFoundation? 0x00007fff8ee666b2 CFRunLoopRunSpecific + 290 12 com.apple.HIToolbox 0x00007fff8d5570a4 RunCurrentEventLoopInMode? + 209 13 com.apple.HIToolbox 0x00007fff8d556e42 ReceiveNextEventCommon? + 356 14 com.apple.HIToolbox 0x00007fff8d556cd3 BlockUntilNextEventMatchingListInMode? + 62 15 com.apple.AppKit? 0x00007fff8c96c613 _DPSNextEvent + 685 16 com.apple.AppKit? 0x00007fff8c96bed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 17 com.apple.AppKit? 0x00007fff8c963283 -[NSApplication run] + 517 18 com.apple.AppKit? 0x00007fff8c907cb6 NSApplicationMain + 869 19 org.m0k.transmission 0x0000000100001d26 main + 111 20 org.m0k.transmission 0x0000000100001a74 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff85779d16 kevent + 10 1 libdispatch.dylib 0x00007fff90a0cdea _dispatch_mgr_invoke + 883 2 libdispatch.dylib 0x00007fff90a0c9ee _dispatch_mgr_thread + 54

Thread 2: 0 libsystem_c.dylib 0x00007fff867b473b szone_malloc_should_clear + 4142 1 libsystem_c.dylib 0x00007fff867a6153 malloc_zone_malloc + 71 2 libsystem_c.dylib 0x00007fff867a6ba7 malloc + 41 3 org.m0k.transmission 0x00000001000c8616 UTPSocket::write_outgoing_packet(unsigned long, unsigned int) + 190 4 org.m0k.transmission 0x000000010007ef23 io_close_socket + 120 5 org.m0k.transmission 0x00000001000807c4 io_dtor + 230 6 org.m0k.transmission 0x000000010007b0db tr_runInEventThread + 80 7 org.m0k.transmission 0x000000010007c0a0 tr_handshakeDone + 277 8 org.m0k.transmission 0x000000010008402b stopSwarm + 104 9 org.m0k.transmission 0x000000010006eef7 stopTorrent + 140 10 org.m0k.transmission 0x000000010007b0db tr_runInEventThread + 80 11 org.m0k.transmission 0x000000010006ee1f tr_torrentStop + 119 12 org.m0k.transmission 0x0000000100085f26 bandwidthPulse + 241 13 org.m0k.transmission 0x00000001000b0a37 event_base_loop + 1149 14 org.m0k.transmission 0x000000010007af49 libeventThreadFunc + 145 15 org.m0k.transmission 0x0000000100073166 ThreadFunc? + 15 16 libsystem_c.dylib 0x00007fff8678d742 _pthread_start + 327 17 libsystem_c.dylib 0x00007fff8677a181 thread_start + 13

Change History (15)

comment:1 Changed 8 years ago by x190

https://trac.transmissionbt.com/ticket/5168

Functions made nonblocking:

  • tr_torrentStat()

tr_torrentStat() currently requires a thread lock to ensure that it's not called at the same time that another thread is freeing the torrent.

...which is exactly what might be happening if 'auto removal' on "ratioLimitHit" is set. mw3demo?

Last edited 8 years ago by x190 (previous) (diff)

comment:2 Changed 8 years ago by mw3demo

Another Assertion Failure, this time in platform.c:

Process: Transmission [14447] Path: /Applications/Transmission?.app/Contents/MacOS/Transmission Identifier: org.m0k.transmission Version: 2.76 + (14017) Code Type: X86-64 (Native) Parent Process: launchd [146] User ID: 501

Date/Time?: 2013-02-14 16:13:40.624 +0000 OS Version: Mac OS X 10.8.2 (12C60) Report Version: 10

Interval Since Last Report: 6149241 sec Crashes Since Last Report: 50 Per-App Interval Since Last Report: 13847 sec Per-App Crashes Since Last Report: 2 Anonymous UUID: E03755E3-7A88-E9F8-C1B8-217295043749

Crashed Thread: 2

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:

Assertion failed: (!l->depth
tr_areThreadsEqual (l->lockThread, tr_getCurrentThread ())), function tr_lockLock, file /Users/transmission/jenkins/workspace/trunk-mac/libtransmission/platform.c, line 238.

Thread 0:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff84dea256 objc_msgSend + 22 1 com.apple.CoreFoundation? 0x00007fff8efa9ca4 -[CFPrefsSearchListSource synchronize] + 116 2 com.apple.CoreFoundation? 0x00007fff8efa91b8 +[CFPrefsSearchListSource withSearchListForIdentifier:perform:] + 824 3 com.apple.CoreFoundation? 0x00007fff8eea4253 CFPreferencesAppSynchronize + 99 4 com.apple.Foundation 0x00007fff86f3255a -[NSUserDefaults(NSUserDefaults) synchronize] + 19 5 com.apple.AppKit? 0x00007fff8cb92bc9 -[NSApplication terminate:] + 1737 6 com.apple.AppKit? 0x00007fff8cbb757e -[NSApplication _terminateFromSender:askIfShouldTerminate:saveWindows:] + 280 7 com.apple.AppKit? 0x00007fff8cbc14a2 52-[NSApplication(NSAppleEventHandling) _handleAEQuit]_block_invoke_0 + 46 8 libdispatch.dylib 0x00007fff90a0df01 _dispatch_call_block_and_release + 15 9 libdispatch.dylib 0x00007fff90a0a0b6 _dispatch_client_callout + 8 10 libdispatch.dylib 0x00007fff90a0f0c8 _dispatch_main_queue_callback_4CF + 275 11 com.apple.CoreFoundation? 0x00007fff8ee670fe CFRunLoopRun + 1614 12 com.apple.CoreFoundation? 0x00007fff8ee666b2 CFRunLoopRunSpecific + 290 13 com.apple.HIToolbox 0x00007fff8d5570a4 RunCurrentEventLoopInMode? + 209 14 com.apple.HIToolbox 0x00007fff8d556d84 ReceiveNextEventCommon? + 166 15 com.apple.HIToolbox 0x00007fff8d556cd3 BlockUntilNextEventMatchingListInMode? + 62 16 com.apple.AppKit? 0x00007fff8c96c613 _DPSNextEvent + 685 17 com.apple.AppKit? 0x00007fff8c96bed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 18 com.apple.AppKit? 0x00007fff8c963283 -[NSApplication run] + 517 19 com.apple.AppKit? 0x00007fff8c907cb6 NSApplicationMain + 869 20 org.m0k.transmission 0x0000000100001d26 main + 111 21 org.m0k.transmission 0x0000000100001a74 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff85779d16 kevent + 10 1 libdispatch.dylib 0x00007fff90a0cdea _dispatch_mgr_invoke + 883 2 libdispatch.dylib 0x00007fff90a0c9ee _dispatch_mgr_thread + 54

Thread 2 Crashed: 0 libsystem_kernel.dylib 0x00007fff85779212 pthread_kill + 10 1 libsystem_c.dylib 0x00007fff8678eaf4 pthread_kill + 90 2 libsystem_c.dylib 0x00007fff867d2dce abort + 143 3 libsystem_c.dylib 0x00007fff867d3e2a assert_rtn + 146 4 org.m0k.transmission 0x000000010007325e tr_lockLock + 129 5 org.m0k.transmission 0x00000001000812c9 tr_peerMgrFree + 18 6 org.m0k.transmission 0x000000010006a05d sessionCloseImpl + 436 7 org.m0k.transmission 0x000000010007b284 readFromPipe + 274 8 org.m0k.transmission 0x00000001000b0a37 event_base_loop + 1149 9 org.m0k.transmission 0x000000010007af49 libeventThreadFunc + 145 10 org.m0k.transmission 0x0000000100073166 ThreadFunc? + 15 11 libsystem_c.dylib 0x00007fff8678d742 _pthread_start + 327 12 libsystem_c.dylib 0x00007fff8677a181 thread_start + 13

Thread 3: 0 libsystem_kernel.dylib 0x00007fff857796d6 workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8678feec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8678fcb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8677a171 start_wqthread + 13

Thread 4: 0 libsystem_kernel.dylib 0x00007fff857796d6 workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8678feec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8678fcb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8677a171 start_wqthread + 13

Thread 5: 0 libsystem_kernel.dylib 0x00007fff857796d6 workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8678feec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8678fcb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8677a171 start_wqthread + 13

Thread 2 crashed with X86 Thread State (64-bit):

rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00000001017bdca8 rdx: 0x0000000000000000 rdi: 0x0000000000004407 rsi: 0x0000000000000006 rbp: 0x00000001017bdcd0 rsp: 0x00000001017bdca8

r8: 0x00007fff747cf278 r9: 0x00000000000000ee r10: 0x0000000020000000 r11: 0x0000000000000206

r12: 0x00000001000e60a5 r13: 0x00000001000e6040 r14: 0x00000001017be000 r15: 0x00000001000e604c rip: 0x00007fff85779212 rfl: 0x0000000000000206 cr2: 0x00007fff747c8fe8

Logical CPU: 0

Binary Images:

0x100000000 - 0x10011efff +org.m0k.transmission (2.76 + - 14017) <10CB984A-DB3D-3A1F-A436-6865096B6DE4> /Applications/Transmission?.app/Contents/MacOS/Transmission

This occured with two downloads running, 8 or so paused magnet links (no .torrent data downloaded). I launched Onyx, and it asked to close all applications, upon transmission closing, this error was thrown.

comment:3 Changed 8 years ago by jordan

  • Description modified (diff)
  • Milestone None Set deleted
  • Status changed from new to assigned
  • Version 2.76+ deleted

comment:4 Changed 8 years ago by x190

Double Trouble: In r14023: Line 273/4 Did it not work the first time? Maybe the first one was/is leaky?

static void tr_webThreadFunc (void * vsession);
              ...
271	        }
272	     
273	      task = tr_new0 (struct tr_web_task, 1);
274	      task = tr_new0 (struct tr_web_task, 1);
275	      task->session = session;
        ...
291	}
292	

r13625 changed the way that the tr_lockLock() assert is stated:

207	 	    if( l->depth ) 
208	 	        assert( tr_areThreadsEqual( l->lockThread, tr_getCurrentThread( ) ) );

TO:

204	  assert (!l->depth || tr_areThreadsEqual (l->lockThread, tr_getCurrentThread ()));

¿No es bueno?

Last edited 8 years ago by x190 (previous) (diff)

comment:5 Changed 8 years ago by jordan

I'm not sure what it has to do with this ticket, but it's a good catch anyway. Thanks for finding that leak x190. :)

r14024: "(libT) fix memory leak regression in the nightlies reported by x190"

comment:6 Changed 8 years ago by jordan

As for this ticket, yes the issue mw3demo's seeing is because the reduced mutex use is *too* relaxed. I'd hate to have to put the thread-wide lock back into tr_torrentStat() though, so I'm thinking about making per-swarm mutexes. Haven't decided yet, I've been pretty busy and haven't given it enough thought yet.

comment:7 Changed 8 years ago by x190

r13625 was billed as a "whitespace style" revision, however, the assert mentioned in comment:4 also got re-stated. Was that change in functionality intentional?

Last edited 8 years ago by x190 (previous) (diff)

comment:8 follow-up: Changed 8 years ago by jordan

x190, I don't understand what you mean by "change in functionality" and "No es bueno". Under what conditions will the two versions of the lock check code in comment:4 behave differently?

comment:9 in reply to: ↑ 8 Changed 8 years ago by x190

Replying to jordan:

x190 Under what conditions will the two versions of the lock check code in comment:4 behave differently?

At this point I'm assuming you feel both crashes have the same underlying cause so that's fine. I was thinking more in terms of "if it ain't broke, don't fix it" as sometimes strange subtleties can creep in. :)

comment:10 Changed 8 years ago by livings124

  • Version set to 2.77+

comment:11 Changed 8 years ago by livings124

#5325 is a duplicate of this.

comment:12 Changed 7 years ago by x190

Is this ticket on the radar for v2.80?

comment:13 Changed 7 years ago by jordan

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

Fixed in r14083.

comment:14 Changed 7 years ago by rb07

  • Resolution fixed deleted
  • Status changed from closed to reopened

The fix seems to have introduced a problem, see https://trac.transmissionbt.com/ticket/5391#comment:12

comment:15 Changed 7 years ago by jordan

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

Let's handle that in #5391

Note: See TracTickets for help on using tickets.