KwaiAppTeam / KOOM

KOOM is an OOM killer on mobile platform by Kwai.
Other
3.21k stars 426 forks source link

heap_analysis进程 OOM #275

Open zhengzhong1 opened 7 months ago

zhengzhong1 commented 7 months ago

heap_analysis 进程 出现oom情况,不清楚是否和hprof文件大小有关。

2024-04-07 15:13:40.701 20180-20197 o:heap_analysis com.kwai.koom.demo I Starting a blocking GC Alloc 2024-04-07 15:13:40.701 20180-20197 o:heap_analysis com.kwai.koom.demo I Starting a blocking GC Alloc 2024-04-07 15:13:40.713 20180-20197 o:heap_analysis com.kwai.koom.demo I This is sticky GC, maxfree is 8388608 minfree is 2097152 2024-04-07 15:13:40.713 20180-20197 o:heap_analysis com.kwai.koom.demo I Forcing collection of SoftReferences for 8192KB allocation 2024-04-07 15:13:40.713 20180-20197 o:heap_analysis com.kwai.koom.demo I Starting a blocking GC Alloc 2024-04-07 15:13:40.803 20180-20197 o:heap_analysis com.kwai.koom.demo I This is non sticky GC, maxfree is 8388608 minfree is 2097152 2024-04-07 15:13:40.804 20180-20197 o:heap_analysis com.kwai.koom.demo I Clamp target GC heap from 518MB to 512MB 2024-04-07 15:13:40.804 20180-20197 o:heap_analysis com.kwai.koom.demo W Throwing OutOfMemoryError "Failed to allocate a 8388624 byte allocation with 1975288 free bytes and 1928KB until OOM, target footprint 536870912, growth limit 536870912" (VmSize 6842008 kB) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W java.lang.OutOfMemoryError: Failed to allocate a 8388624 byte allocation with 1975288 free bytes and 1928KB until OOM, target footprint 536870912, growth limit 536870912 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofRecordReader.readIdArray(HprofRecordReader.kt:454) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofRecordReader.readObjectArrayDumpRecord(HprofRecordReader.kt:315) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofHeapGraph$readObjectArrayDumpRecord$1.invoke(HprofHeapGraph.kt:262) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofHeapGraph$readObjectArrayDumpRecord$1.invoke(HprofHeapGraph.kt:53) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofHeapGraph$readObjectRecord$1.invoke(HprofHeapGraph.kt:351) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofHeapGraph$readObjectRecord$1.invoke(HprofHeapGraph.kt:53) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.RandomAccessHprofReader.readRecord(RandomAccessHprofReader.kt:43) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofHeapGraph.readObjectRecord(HprofHeapGraph.kt:350) 2024-04-07 15:13:40.805 20180-20197 System.err com.kwai.koom.demo W at kshark.HprofHeapGraph.readObjectArrayDumpRecord$shark(HprofHeapGraph.kt:261) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at kshark.HeapObject$HeapObjectArray.readRecord(HeapObject.kt:567) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at kshark.internal.PathFinder.visitObjectArray(PathFinder.kt:591) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at kshark.internal.PathFinder.findPathsFromGcRoots(PathFinder.kt:278) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at kshark.internal.PathFinder.findPathsFromGcRoots(PathFinder.kt:225) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at kshark.HeapAnalyzer.findLeaks(HeapAnalyzer.kt:197) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at com.kwai.koom.javaoom.monitor.analysis.HeapAnalysisService.findPathsToGcRoot(HeapAnalysisService.kt:513) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at com.kwai.koom.javaoom.monitor.analysis.HeapAnalysisService.onHandleIntent(HeapAnalysisService.kt:212) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at android.os.Handler.dispatchMessage(Handler.java:106) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at android.os.Looper.loopOnce(Looper.java:211) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at android.os.Looper.loop(Looper.java:300) 2024-04-07 15:13:40.806 20180-20197 System.err com.kwai.koom.demo W at android.os.HandlerThread.run(HandlerThread.java:67) 2024-04-07 15:13:40.807 20180-20197 OOMMonitor_Exception com.kwai.koom.demo I find gc path exception Failed to allocate a 8388624 byte allocation with 1975288 free bytes and 1928KB until OOM, target footprint 536870912, growth limit 536870912 2024-04-07 15:13:40.809 20047-20066 OOMMonitor com.kwai.koom.demo E heap analysis error, do file delete 2024-04-07 15:13:40.817 20180-20197 Looper com.kwai.koom.demo W PerfMonitor longMsg : seq=1 plan=15:13:08.386 late=0ms wall=32424ms running=31724ms runnable=128ms h=android.app.IntentService$ServiceHandler w=0 procState=-1

koomcrash.txt

zhengzhong1 commented 7 months ago

@AndroidInternal @alhah 辛苦大佬帮忙看看什么原因