Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in TR_ASSERT(now >= latest) #6833

Closed
Coeur opened this issue May 8, 2024 · 3 comments
Closed

Crash in TR_ASSERT(now >= latest) #6833

Coeur opened this issue May 8, 2024 · 3 comments

Comments

@Coeur
Copy link
Collaborator

Coeur commented May 8, 2024

What is the issue?

Crash on:

TR_ASSERT(now >= latest);

I think I was on 821a681.

Process:               Transmission [16419]
Path:                  /Users/USER/Library/Developer/Xcode/DerivedData/Transmission-dwwfjrryvuhkcbhgpfcrgatmwrre/Build/Products/Debug/Transmission.app/Contents/MacOS/Transmission
Identifier:            org.m0k.transmission
Version:               4.1.0-dev (14718.1.0)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-05-04 21:06:40.1996 +0800
OS Version:            macOS 14.4.1 (23E224)
Report Version:        12
Anonymous UUID:        07E14A99-A02D-3E03-CA4A-8EF3842BB65E

Sleep/Wake UUID:       F575167A-B475-479A-AF8F-6D798F72F49F

Time Awake Since Boot: 730000 seconds
Time Since Wake:       6413 seconds

System Integrity Protection: enabled

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

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

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Transmission [16419]

Application Specific Information:
abort() called


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x194a02a60 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x194a3ac20 pthread_kill + 288
2   libsystem_c.dylib             	       0x194947a20 abort + 180
3   Transmission                  	       0x100ce4bc8 tr_assert_report(std::__1::basic_string_view<char, std::__1::char_traits<char>>, long, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 136 (tr-assert.cc:16)
4   Transmission                  	       0x100b235f8 tr_torrent::idle_seconds(long) const + 248 (torrent.h:829)
5   Transmission                  	       0x100b72c80 tr_torrent::stats() const + 156 (torrent.cc:1294)
6   Transmission                  	       0x100b73c30 tr_torrentStat(tr_torrent*) + 36 (torrent.cc:1411)
7   Transmission                  	       0x1009ce738 -[Torrent update] + 108 (Torrent.mm:248)
8   Transmission                  	       0x100975364 -[Controller updateUI] + 276 (Controller.mm:2387)
9   Foundation                    	       0x195c84224 __NSFireTimer + 104
10  CoreFoundation                	       0x194b35f90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
11  CoreFoundation                	       0x194b35c34 __CFRunLoopDoTimer + 972
12  CoreFoundation                	       0x194b3576c __CFRunLoopDoTimers + 356
13  CoreFoundation                	       0x194b18ba4 __CFRunLoopRun + 1856
14  CoreFoundation                	       0x194b17e0c CFRunLoopRunSpecific + 608
15  HIToolbox                     	       0x19f2b3000 RunCurrentEventLoopInMode + 292
16  HIToolbox                     	       0x19f2b2e3c ReceiveNextEventCommon + 648
17  HIToolbox                     	       0x19f2b2b94 _BlockUntilNextEventMatchingListInModeWithFilter + 76
18  AppKit                        	       0x198370970 _DPSNextEvent + 660
19  AppKit                        	       0x198b62dec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
20  AppKit                        	       0x198363cb8 -[NSApplication run] + 476
21  AppKit                        	       0x19833af54 NSApplicationMain + 880
22  Transmission                  	       0x10095bd94 main + 72 (main.mm:17)
23  dyld                          	       0x1946b20e0 start + 2360

Thread 1:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 4:
0   libsystem_kernel.dylib        	       0x1949fe754 __sendto + 8
1   Transmission                  	       0x100e0e88c tr_session::tr_udp_core::sendto(void const*, unsigned long, sockaddr const*, unsigned int) const + 376 (tr-udp.cc:284)
2   Transmission                  	       0x100e12030 (anonymous namespace)::utp_send_to(tr_session const*, unsigned char const*, unsigned long, sockaddr const*, unsigned int) + 64 (tr-utp.cc:111)
3   Transmission                  	       0x100e11b20 (anonymous namespace)::utp_callback(utp_callback_arguments*) + 352 (tr-utp.cc:134)
4   Transmission                  	       0x100efb8ec utp_call_sendto(struct_utp_context*, UTPSocket*, unsigned char const*, unsigned long, sockaddr const*, unsigned int, unsigned int) + 148 (utp_callbacks.cpp:206)
5   Transmission                  	       0x100efbb88 send_to_addr(struct_utp_context*, unsigned char const*, unsigned long, PackedSockAddr const&, int) + 112 (utp_internal.cpp:709)
6   Transmission                  	       0x100efbe74 UTPSocket::send_data(unsigned char*, unsigned long, bandwidth_type_t, unsigned int) + 268 (utp_internal.cpp:765)
7   Transmission                  	       0x100efc97c UTPSocket::send_packet(OutgoingPacket*) + 816 (utp_internal.cpp:923)
8   Transmission                  	       0x100efdd18 UTPSocket::check_timeouts() + 1620 (utp_internal.cpp:1251)
9   Transmission                  	       0x100f0c500 auto utp_check_timeouts::$_0::operator()<std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const>(std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) const + 48 (utp_internal.cpp:3283)
10  Transmission                  	       0x100f0c4c0 decltype(std::declval<utp_check_timeouts::$_0&>()(std::declval<std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&>())) std::__1::__invoke[abi:ue170006]<utp_check_timeouts::$_0&, std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&>(utp_check_timeouts::$_0&, std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) + 32 (invoke.h:340)
11  Transmission                  	       0x100f0c46c bool std::__1::__invoke_void_return_wrapper<bool, false>::__call[abi:ue170006]<utp_check_timeouts::$_0&, std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&>(utp_check_timeouts::$_0&, std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) + 32 (invoke.h:407)
12  Transmission                  	       0x100f0c43c std::__1::__function::__alloc_func<utp_check_timeouts::$_0, std::__1::allocator<utp_check_timeouts::$_0>, bool (std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&)>::operator()[abi:ue170006](std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) + 36 (function.h:193)
13  Transmission                  	       0x100f0b29c std::__1::__function::__func<utp_check_timeouts::$_0, std::__1::allocator<utp_check_timeouts::$_0>, bool (std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&)>::operator()(std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) + 36 (function.h:364)
14  Transmission                  	       0x100f08c88 std::__1::__function::__value_func<bool (std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&)>::operator()[abi:ue170006](std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) const + 76 (function.h:518)
15  Transmission                  	       0x100f08a8c std::__1::function<bool (std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&)>::operator()(std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&) const + 32 (function.h:1169)
16  Transmission                  	       0x100f03be8 UTPSocketHT::erase_if(std::__1::function<bool (std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<UTPSocketKey, std::__1::unique_ptr<UTPSocket, UTPSocketHT::SocketDeleter>>, void*>*>> const&)>) + 88 (utp_internal.h:149)
17  Transmission                  	       0x100f03904 utp_check_timeouts + 448 (utp_internal.cpp:3280)
18  Transmission                  	       0x100e11c10 (anonymous namespace)::timer_callback(void*) + 36 (tr-utp.cc:176)
19  Transmission                  	       0x100e13974 libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()::operator()() const + 32 (timer.h:57)
20  Transmission                  	       0x100e13948 decltype(std::declval<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()&>()()) std::__1::__invoke[abi:ue170006]<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()&>(libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()&) + 24 (invoke.h:340)
21  Transmission                  	       0x100e13900 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()&>(libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()&) + 24 (invoke.h:415)
22  Transmission                  	       0x100e138dc std::__1::__function::__alloc_func<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'(), std::__1::allocator<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()>, void ()>::operator()[abi:ue170006]() + 28 (function.h:193)
23  Transmission                  	       0x100e12744 std::__1::__function::__func<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'(), std::__1::allocator<libtransmission::Timer::set_callback(void (*)(void*), void*)::'lambda'()>, void ()>::operator()() + 28 (function.h:364)
24  Transmission                  	       0x100bf5504 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const + 68 (function.h:518)
25  Transmission                  	       0x100bf5074 std::__1::function<void ()>::operator()() const + 24 (function.h:1169)
26  Transmission                  	       0x100e731f8 libtransmission::EvTimer::handleTimer() + 148 (timer-ev.cc:151)
27  Transmission                  	       0x100e72df0 libtransmission::EvTimer::onTimer(int, short, void*) + 32 (timer-ev.cc:143)
28  Transmission                  	       0x100ec61cc event_process_active_single_queue + 1224 (event.c:1691)
29  Transmission                  	       0x100ebfa80 event_process_active + 372 (event.c:1783)
30  Transmission                  	       0x100ebe69c event_base_loop + 948 (event.c:2006)
31  Transmission                  	       0x100bf48dc tr_session_thread_impl::session_thread_func(event_base*) + 216 (session-thread.cc:244)
32  Transmission                  	       0x100bf6038 decltype(*std::declval<tr_session_thread_impl*>().*std::declval<void (tr_session_thread_impl::*)(event_base*)>()(std::declval<event_base*>())) std::__1::__invoke[abi:ue170006]<void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*, void>(void (tr_session_thread_impl::*&&)(event_base*), tr_session_thread_impl*&&, event_base*&&) + 128 (invoke.h:308)
33  Transmission                  	       0x100bf5fac void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*>&, std::__1::__tuple_indices<2ul, 3ul>) + 64 (thread.h:227)
34  Transmission                  	       0x100bf5c00 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_session_thread_impl::*)(event_base*), tr_session_thread_impl*, event_base*>>(void*) + 84 (thread.h:238)
35  libsystem_pthread.dylib       	       0x194a3af94 _pthread_start + 136
36  libsystem_pthread.dylib       	       0x194a35d34 thread_start + 8

Thread 5:
0   libsystem_kernel.dylib        	       0x1949fd7e8 __semwait_signal + 8
1   libsystem_c.dylib             	       0x1948de274 nanosleep + 220
2   libc++.1.dylib                	       0x194972b8c std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>> const&) + 84
3   Transmission                  	       0x100d15360 void std::__1::this_thread::sleep_for[abi:ue170006]<long long, std::__1::ratio<1l, 1000l>>(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l>> const&) + 172 (this_thread.h:55)
4   Transmission                  	       0x100d32868 tr_web::Impl::curlThreadFunc() + 832 (web.cc:717)
5   Transmission                  	       0x100d33d3c decltype(*std::declval<tr_web::Impl*>().*std::declval<void (tr_web::Impl::*)()>()()) std::__1::__invoke[abi:ue170006]<void (tr_web::Impl::*)(), tr_web::Impl*, void>(void (tr_web::Impl::*&&)(), tr_web::Impl*&&) + 116 (invoke.h:308)
6   Transmission                  	       0x100d33cbc void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_web::Impl::*)(), tr_web::Impl*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_web::Impl::*)(), tr_web::Impl*>&, std::__1::__tuple_indices<2ul>) + 48 (thread.h:227)
7   Transmission                  	       0x100d33968 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (tr_web::Impl::*)(), tr_web::Impl*>>(void*) + 84 (thread.h:238)
8   libsystem_pthread.dylib       	       0x194a3af94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x194a35d34 thread_start + 8

Thread 6:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 10:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 11:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	       0x1949fa1f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x194a0cb24 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x194a02e34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib        	       0x1949fa578 mach_msg + 24
4   CoreFoundation                	       0x194b1a058 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x194b1891c __CFRunLoopRun + 1208
6   CoreFoundation                	       0x194b17e0c CFRunLoopRunSpecific + 608
7   AppKit                        	       0x198499cb4 _NSEventThread + 144
8   libsystem_pthread.dylib       	       0x194a3af94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x194a35d34 thread_start + 8

Thread 12:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 13:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 14:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 15:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 16:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 17:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0

Thread 18:
0   libsystem_pthread.dylib       	       0x194a35d20 start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x000000016f4a5a78   x5: 0x0000000000000020   x6: 0x000000016f4a5ab0   x7: 0x00000000ffffffff
    x8: 0x708b84f7426a1110   x9: 0x708b84f6be1e6bd0  x10: 0x0000000000000002  x11: 0x00000000fffffffd
   x12: 0x0000010000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x0000000206ab2c30  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001fc747ac0  x21: 0x0000000000000103  x22: 0x00000001fc747ba0  x23: 0x0000600000acc340
   x24: 0x0000600003179d00  x25: 0x0000600000acc350  x26: 0x00006000004c8610  x27: 0x0000000137809048
   x28: 0x00000000141300c9   fp: 0x000000016f4a5b70   lr: 0x0000000194a3ac20
    sp: 0x000000016f4a5b50   pc: 0x0000000194a02a60 cpsr: 0x40001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

Which application of Transmission?

macOS app

Which version of Transmission?

No response

@ckerr
Copy link
Member

ckerr commented May 27, 2024

Possibly fixed by #6844?

edit: hm, looks unrelated

@tearfur
Copy link
Member

tearfur commented Jun 2, 2024

I don't understand how this could even happen, unless there's some memory corruption.

@Coeur
Copy link
Collaborator Author

Coeur commented Jun 2, 2024

#6834 was merged, so let's close it for now. In it, I wrote:

I see for instance that we read date_active_ from a resume file, so that could be a scenario where date_active_ is above now. Or the system clock was modified.

@Coeur Coeur closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants