HarmonyOS crash日志如何定位问题代码

APP运行一段时间出现crash,请问如何根据日志信息定位问题代码,详细日志:

Pid:30855 
Uid:20020127 
Process name:com.example.x.ssa.hm 
Reason:Signal:SIGBUS(BUS_ADRALN)@0x0000000525938247 
Fault thread Info: 
  Tid:30918, Name:OS_TaskWorker 
#00 pc 0000000000000000 Not mapped 
#01 pc 00000000000472a8 /system/lib64/platformsdk/libace_napi.z.so(napi_create_external::$_1::__invoke(void*, void*)+36)(20e5f1xxx05d0c6fb1934f4bbe2d1f3) 
#02 pc 000000000028d6d4 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::JSNativePointer::DeleteExternalPointer(bool)+64)(c6b7d03bf28ecxxxdd4cd68a94a2bb) 
#03 pc 000000000028a52c /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::EcmaVM::ProcessNativeDelete(std::__h::function<panda::ecmascript::TaggedObject* (panda::ecmascript::TaggedObject*)> const&)+208)(c6b7d03bf28exxx3fdd4cd68a94a2bb) 
#04 pc 00000000003a00f8 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::PartialGC::ProcessNativeDelete()+176)(c6b7d03bf28ec19f3fdd4cd68a94a2bb) 
#05 pc 000000000039ff48 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::PartialGC::Sweep()+96)(c6b7d03bf28ec19xxx 
#06 pc 000000000039f338 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::PartialGC::RunPhases()+1372)(c6b7d03bfxxx28ec19f3fdd4cd68a94a2bb) 
#07 pc 0000000000380b84 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::Heap::CollectGarbage(panda::ecmascript::TriggerGCType, panda::ecmascript::GCReason)+752)(c6b7d03bxxf3fdd4cd68a94a2bb) 
#08 pc 00000000003783fc /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::ConcurrentMarker::HandleMarkingFinished()+72)(c6b7d03bfxxx3fdd4cd68a94a2bb) 
#09 pc 00000000003627b0 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::JSThread::CheckSafepoint()+396)(c6b7d03xxxc19f3fdd4cd68a94a2bb) 
#10 pc 000000000047a138 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::RuntimeStubs::UpdateHotnessCounter(unsigned long, unsigned int, unsigned long)+92)(c6b7d03bf2xdd4xxxcd68a94a2bb) 
#11 pc 000000000013dc58 /system/lib64/module/arkcompiler/stub.an 
#12 at anonymous (library_quota/src/main/ets/quota/manager/ChartManager.ets:43:17) 
#13 pc 000000000029e2f8 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::InterpreterAssembly::Execute(panda::ecmascript::EcmaRuntimeCallInfo*)+408)(c6b7d03bf28ec1xx4cd68a94a2bb) 
#14 pc 0000000000354740 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::JSStableArray::HandleforEachOfStable(panda::ecmascript::JSThread*, panda::ecmascript::JSHandle<panda::ecmascript::JSObject>, panda::ecmascript::JSHandle<panda::ecmascript::JSTaggedValue>, panda::ecmascript::JSHandle<panda::ecmascript::JSTaggedValue>, unsigned int, unsigned int&)+588)(c6b7d03bf2xxxd4cd68a94a2bb) 
#15 pc 0000000000167ae0 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::builtins::BuiltinsArray::ForEach(panda::ecmascript::EcmaRuntimeCallInfo*)+832)(c6b7d03bf28exxxfdd4cd68a94a2bb) 
#16 pc 000000000013f968 /system/lib64/module/arkcompiler/stub.an 
#17 at indicatorToChartData (library_quota/src/main/ets/quota/manager/ChartManager.ets:41:13) 
#18 at calculateKLINETask (library_quota/src/main/ets/quota/manager/IndicatorManager.ets:79:18) 
#19 pc 000000000029e2f8 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::InterpreterAssembly::Execute(panda::ecmascript::EcmaRuntimeCallInfo*)+408)(c6b7d03bf28ec19xxx4cd68a94a2bb) 
#20 pc 00000000003e1bf4 /system/lib64/platformsdk/libark_jsruntime.so(panda::FunctionRef::CallForNapi(panda::ecmascript::EcmaVM const*, panda::JSValueRef*, panda::JSValueRef* const*, int)+288)(c6b7d03bf28ec1xxxdd4cd68a94a2bb) 
#21 pc 0000000000040cbc /system/lib64/platformsdk/libace_napi.z.so(napi_call_function+352)(20e5f157xxxc6fb1934f4bbe2d1f3) 
#22 pc 000000000001fc7c /system/lib64/module/libtaskpool.z.so(Commonlibrary::Concurrent::TaskPoolModule::Worker::PerformTask(uv_async_s const*)+1832)(6d9925febc6xxx1ffb56abe39fe55) 
#23 pc 00000000000172b8 /system/lib64/platformsdk/libuv.so(uv__async_io+352)(d806ef9a2exxxabd7f5e6e3180b8f9) 
#24 pc 0000000000016c00 /system/lib64/platformsdk/libuv.so(uv__io_poll+904)(d806ef9axxx42abd7f5e6e3180b8f9) 
#25 pc 0000000000017728 /system/lib64/platformsdk/libuv.so(uv_run+376)(d806ef9a2eaxxxabd7f5e6e3180b8f9) 
#26 pc 000000000001ef54 /system/lib64/module/libtaskpool.z.so(Commonlibrary::Concurrent::TaskPoolModule::Worker::ExecuteInThread(void const*)+376)(6d9925febc6f14xxxfb56abe39fe55) 
#27 pc 000000000001c7fc /system/lib64/module/libtaskpool.z.so(Commonlibrary::Concurrent::TaskPoolModule::TaskRunner::TaskInnerRunner::Run()+68)(6d9925febc6f149d1xxxx6abe39fe55) 
#28 pc 00000000001a9034 /system/lib/ld-musl-aarch64.so.1(start+244)(22804f9f85xxx06b615b5a21f8) 
#29 pc 000000000009de00 /system/lib/ld-musl-aarch64.so.1(22804f9fxxx41806b615b5a21f8)
HarmonyOS
2024-09-11 11:42:55
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
Heiang

以下是有关日志分析指导链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/cppcrash-guidelines-V5

这个原因是应用使用napi_create_external系列接口有问题,可以参考“正确的使napi_create_external系列接口创建的JS Object”:https://gitee.com/openharmony/docs/blob/3d2b44c9a47a35f42fe221ee47486fd597a1b93f/zh-cn/application-dev/napi/napi-guidelines.md#%E6%AD%A3%E7%A1%AE%E7%9A%84%E4%BD%BF%E7%94%A8napi_create_external%E7%B3%BB%E5%88%97%E6%8E%A5%E5%8F%A3%E5%88%9B%E5%BB%BA%E7%9A%84js-object

napi_value这种类型的变量,不能跨线程使用。

分享
微博
QQ
微信
回复
2024-09-11 16:53:07
相关问题
DFX-crash定位定界工具
579浏览 • 1回复 待解决
HarmonyOS 关于crash问题
138浏览 • 1回复 待解决
日志打印重复过多,影响定位
829浏览 • 1回复 待解决
HarmonyOS定位权限问题
361浏览 • 1回复 待解决
基于反混淆工具混淆后的日志定位
346浏览 • 1回复 待解决
如何实现crash堆栈抓取、crash回调
1721浏览 • 1回复 待解决
HarmonyOS 应用崩溃日志问题
164浏览 • 1回复 待解决
HarmonyOS 找不到崩溃日志问题
126浏览 • 1回复 待解决
求大佬告知如何定位混淆问题
394浏览 • 1回复 待解决
如何定位musl libc接口使用问题
324浏览 • 0回复 待解决
HarmonyOS taskpool使用crash
1286浏览 • 2回复 待解决
HarmonyOS日志文件上传问题
458浏览 • 1回复 待解决
如何解决定位接口调用问题
257浏览 • 1回复 待解决
HarmonyOS 代码转化问题
403浏览 • 1回复 待解决
使用hiappevent获取崩溃日志的示例代码
1803浏览 • 1回复 待解决
报错问题不全没法定位问题
278浏览 • 1回复 待解决
非HiLog打印的C代码日志怎么查看?
2421浏览 • 1回复 待解决
关于系统定位缓存问题咨询
494浏览 • 1回复 待解决