What does this stack trace mean?

2019-03-02 15:21发布

问题:

Devices tested on: Samsung S4, Ipad
Browsers : Chrome and Safari for mobile
Server : JBOSS 
Export type: war

Chrome and Safari (mobile) crash intermittently during regular use of my application. I sent in a crash report to google and received this back: Thread 16 CRASHED [SIGABRT @ 0x000056e7] MAGIC SIGNATURE THREAD

0x40140134      [libc.so + 0x00022134 ] 
0x4013118b      [libc.so + 0x0001318b ] 
0x4013139f      [libc.so + 0x0001339f ] 
0x401300d5      [libc.so + 0x000120d5 ] 
0x4013f9ea      [libc.so + 0x000219ea ] 
0x64b07dd7      [dalvik-mark-stack (deleted) + 0x0222bdd7 ]     
0x40130bbb      [libc.so + 0x00012bbb ] 
0x4015e14d      [libc.so + 0x0004014d ] 
0x4012d2c7      [libc.so + 0x0000f2c7 ] 
0x4015e14d      [libc.so + 0x0004014d ] 
0x40161d2e      [libc.so + 0x00043d2e ] 
0x4012e1d3      [libc.so + 0x000101d3 ] 
0x4012df73      [libc.so + 0x0000ff73 ] 
0x4012bcff      [libc.so + 0x0000dcff ] 
0x78264ae7      [libchrome.2214.109.so -sqlite3.c:14539 ]       sqlite3MemRoundup
0x78264af7      [libchrome.2214.109.so -sqlite3.c:14468 ]       sqlite3MemMalloc
0x78264a8b      [libchrome.2214.109.so -sqlite3.c:17981 ]       mallocWithAlarm
0x78264a15      [libchrome.2214.109.so -sqlite3.c:18014 ]       sqlite3Malloc
0x7826513f      [libchrome.2214.109.so -sqlite3.c:18345 ]       sqlite3DbMallocRaw
0x78277773      [libchrome.2214.109.so -sqlite3.c:56058 ]       sqlite3VdbeMemGrow
0x782798f5      [libchrome.2214.109.so -sqlite3.c:64836 ]       sqlite3VdbeExec
0x78277c19      [libchrome.2214.109.so -sqlite3.c:60748 ]       sqlite3_step
0x7827e3eb      [libchrome.2214.109.so -statement.cc:61 ]       sql::Statement::Run
0x78196339      [libchrome.2214.109.so -sqlite_persistent_cookie_store.cc:1042 ]        content::SQLitePersistentCookieStore::Backend::Commit
0x781936c9      [libchrome.2214.109.so -callback.h:401 ]        base::SequencedWorkerPool::Inner::ThreadLoop
0x781930f5      [libchrome.2214.109.so -sequenced_worker_pool.cc:507 ]  base::SequencedWorkerPool::Worker::Run
0x78192f55      [libchrome.2214.109.so -simple_thread.cc:60 ]   base::SimpleThread::ThreadMain
0x7818674f      [libchrome.2214.109.so -platform_thread_posix.cc:80 ]   base::::ThreadFunc
0x4012b27a      [libc.so + 0x0000d27a ] 
0x4012b412      [libc.so + 0x0000d412 ] 
0x64b07dd7      [dalvik-mark-stack (deleted) + 0x0222bdd7 ]

I'm going to assume that there is a memory leak . How do I address this or track down the origins?

Please not that I do not make any explicit calls to sqlite using sqlite commands. However, I do make ample use of html5 localStorage and I have external JS libraries that make use of storage using cookies.

回答1:

The stack trace shows you the path that the code follows during the execution of your application. It can help you to find were did the error took place.

Looks like the error is related with sqlite3 in your stack trace. Each line inyour stak trace is a function in the code:

sqlite3MemRoundup
sqlite3MemMalloc
mallocWithAlarm
sqlite3Malloc
sqlite3DbMallocRaw
sqlite3VdbeMemGrow
sqlite3VdbeExec
sqlite3_step

You should investigate the parts of your application that use sqlite.

I don't think it is a JavaScript memory leak but you can use the Chrome memory Profiler to study the memory usage and find leaks https://developer.chrome.com/devtools/docs/javascript-memory-profiling