bmrlab / gendam

A privacy-first generative DAM
6 stars 1 forks source link

app crashed caused by tracing_subscriber #40

Closed web3nomad closed 23 hours ago

web3nomad commented 1 month ago

系统进入睡眠后打开,app 重新被唤起到前台,发生了 crash

Thread 15 Crashed:
0   libdispatch.dylib                      0x19b1b1890 voucher_activity_create_with_data + 324
1   libsystem_trace.dylib                  0x19b0868a8 _os_activity_create_addr + 1020
2   muse-v2-client                         0x1028fdee0 _$LT$tracing_subscriber..layer..layered..Layered$LT$L$C$S$GT$$u20$as$u20$tracing_core..subscriber..Subscriber$GT$::new_span::h0708db7b77f05220 + 1948
3   muse-v2-client                         0x1028fe954 _$LT$tracing_subscriber..layer..layered..Layered$LT$L$C$S$GT$$u20$as$u20$tracing_core..subscriber..Subscriber$GT$::new_span::ha52e6aeea1d791c1 + 28
4   muse-v2-client                         0x103af48d4 tracing::span::Span::make_with::h60caea919250ccdc + 112
5   muse-v2-client                         0x103af3608 tracing_core::dispatcher::get_default::h25aa578141da5bb5 + 468
6   muse-v2-client                         0x103af4854 tracing::span::Span::new::hd37e2a2df264f9f4 + 28
7   muse-v2-client                         0x10286a8d0 _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h9c36e8ee185d949b + 1104
8   muse-v2-client                         0x1029c0850 _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::h6fcdda87e245a45a + 740
9   muse-v2-client                         0x102b59824 prisma_client_rust::client::PrismaClientInternals::execute::_$u7b$$u7b$closure$u7d$$u7d$::ha1fe1d4b8b2cda64 + 408
10  muse-v2-client                         0x102b5883c _$LT$futures_util..future..future..map..Map$LT$Fut$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h339bedf292e16e93 + 56
11  muse-v2-client                         0x102b39ea4 prisma_client_rust::queries::upsert::Upsert$LT$Actions$GT$::exec::_$u7b$$u7b$closure$u7d$$u7d$::hd4184941fb3b01b0 + 288
12  muse-v2-client                         0x102b2d124 file_handler::video::utils::frame::save_frames::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h5753b2ff2bff8c5a + 272
13  muse-v2-client                         0x102b57898 tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::h976acdb9468f2bd2 + 76
14  muse-v2-client                         0x102ba6d88 tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::h1a8e43c24870c70e + 88
15  muse-v2-client                         0x102ca94f0 tokio::runtime::scheduler::current_thread::CurrentThread::block_on::ha2179f24d71e5cfe + 1264
16  muse-v2-client                         0x102cc899c api_server::task_queue::pool::TaskProcessor::init_task_pool::_$u7b$$u7b$closure$u7d$$u7d$::hf4a21acfad0ef276 + 1292
17  muse-v2-client                         0x102cb433c std::sys_common::backtrace::__rust_begin_short_backtrace::h1af12fa693aae21e + 184
18  muse-v2-client                         0x102c44c70 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h38397336aed2a108 + 168
19  muse-v2-client                         0x103b54cdc std::sys::unix::thread::Thread::new::thread_start::h8dda2af345bab446 + 48
20  libsystem_pthread.dylib                0x19b33af94 _pthread_start + 136
21  libsystem_pthread.dylib                0x19b335d34 thread_start + 8
web3nomad commented 1 month ago

完整的 crash report 太大,贴不下,这是 claude3 sonnet 总结的,校验了一下是对的:

Based on the crash report, this error seems to be caused by a segmentation fault (EXC_BAD_ACCESS) when trying to access an invalid memory address (0x0000000000000014). The crash occurred in the voucher_activity_create_with_data function from the libdispatch.dylib library, which is part of the Grand Central Dispatch (GCD) subsystem.

The root cause appears to be in the tracing_subscriber crate, specifically in the new_span function of the Layered struct implementation. This function is responsible for creating a new span (a unit of work in the tracing system) and is called by the query_core crate during the execution of a database query.

The crash likely occurred due to an invalid pointer or memory access issue within the tracing_subscriber crate or one of its dependencies. It's possible that there's a bug in the crate or a memory corruption issue in the application.

To further investigate and resolve this issue, you may need to:

Check for any updates or known issues with the tracing_subscriber crate and its dependencies, and update them if necessary. Review the code in the tracing_subscriber crate, particularly the new_span function and its related code, for any potential memory safety issues or bugs. Enable additional debugging or logging in the tracing_subscriber crate to gather more information about the state of the application when the crash occurs. If the issue persists, you may need to debug the application and the tracing_subscriber crate using a debugger or other debugging tools to identify the root cause of the invalid memory access. It's also worth noting that the crash occurred in a worker thread of the Tokio runtime, which is responsible for executing asynchronous tasks in the application. This may provide additional context or clues about the circumstances under which the crash occurred.

web3nomad commented 1 month ago

crashreport.log

可以复现

web3nomad commented 1 week ago

很长一段时间没复现了,可以先忽略