[완료] Free Memory 가 충분함에도 커널 OOM 이 동작합니다. (+ Committed_AS?)
글쓴이: rajakym / 작성시간: 화, 2019/05/28 - 4:03오후
Linux 기반 Android 플랫폼 Navigation 작업중에 자꾸 OOM 이 동작하며 죄없는 process 들을 죽이고 있습니다.
전원 켠 후 1분 정도 지나면 OOM 이 돌기 시작하는데요 이때 free -h 를 찍어보면 유휴 메모리는 충분한 상태 입니다.
free -h total used free shared buffers Mem: 7.3G 3.7G 3.6G 2.2M 28M -/+ buffers/cache: 3.6G 3.6G Swap: 10G 0 10G
meminfo 를 봐도 딱히 문제되는 점은 보이지 않구요
Committed_AS 이 CommitLimit 대비 높긴 하지만 사실 free 메모리가 남은 상태에서 Commited_AS 때문에
OOM 이 돈다고는 생각되지 않습니다.
cat /proc/mem MemTotal: 7680572 kB MemFree: 4894224 kB MemAvailable: 5767216 kB Buffers: 13612 kB Cached: 1103584 kB SwapCached: 0 kB Active: 752348 kB Inactive: 929968 kB Active(anon): 567556 kB Inactive(anon): 2120 kB Active(file): 184792 kB Inactive(file): 927848 kB Unevictable: 2880 kB Mlocked: 2880 kB SwapTotal: 10485756 kB SwapFree: 10485756 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 567888 kB Mapped: 763808 kB Shmem: 2288 kB Slab: 494000 kB SReclaimable: 112936 kB SUnreclaim: 381064 kB KernelStack: 39068 kB PageTables: 43344 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 14326040 kB Committed_AS: 99350244 kB VmallocTotal: 263061440 kB VmallocUsed: 0 kB VmallocChunk: 0 kB CmaTotal: 303104 kB CmaFree: 247224 kB
oom 이 동작하는 로그 입니다.
어느 부분의 메모리가 문제가되어 동작하고 있는 걸까요?
[ 71.527139] Killing 'ABenchMark:push' (3159), adj 906,\x0a to free 157888kB on behalf of 'ActivityManager' (964)\x0a Free CMA is 247224kB\x0a Total reserve is 243008kB\x0a Total free pages is 4800768kB\x0a Total file cache is 1223620kB [ 71.659440] oom_reaper: reaped process 3159 (ABenchMark:push), now anon-rss:0kB, file-rss:84kB, shmem-rss:132kB [ 71.687297] type=1400 audit(1559021932.269:425): avc: denied { create } for pid=743 comm="NET_Chk_thread" scontext=u:r:diag-server-sample:s0 tcontext=u:r:diag-server-sample:s0 tclass=netlink_route_socket permissive=1 [ 71.687385] type=1400 audit(1559021932.649:429): avc: denied { dac_read_search } for pid=5212 comm="main" capability=2 scontext=u:r:zygote:s0 tcontext=u:r:zygote:s0 tclass=capability permissive=1 [ 71.744101] Killing 'FinalizerDaemon' (3216), adj 0,\x0a to free 79612kB on behalf of 'Binder:937_6' (1921)\x0a Free CMA is 247224kB\x0a Total reserve is 243008kB\x0a Total free pages is 4804976kB\x0a Total file cache is 1235800kB [ 71.744109] Mem-Info: [ 71.744125] active_anon:132224 inactive_anon:528 isolated_anon:0\x0a active_file:51301 inactive_file:256440 isolated_file:0\x0a unevictable:769 dirty:158 writeback:0 unstable:0\x0a slab_reclaimable:28686 slab_unreclaimable:94862\x0a mapped:193370 shmem:572 pagetables:11238 bounce:0\x0a free:1201244 free_pcp:675 free_cma:61806 [ 71.744135] Node 0 active_anon:528896kB inactive_anon:2112kB active_file:205204kB inactive_file:1025760kB unevictable:3076kB isolated(anon):0kB isolated(file):0kB mapped:773480kB dirty:632kB writeback:0kB shmem:2288kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no [ 71.744148] DMA free:1521668kB min:2176kB low:25476kB high:43964kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:1613476kB managed:1540684kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:247224kB [ 71.744150] lowmem_reserve[]: 0 5959 5959 [ 71.744182] Normal free:3283308kB min:8676kB low:101532kB high:175208kB active_anon:528896kB inactive_anon:2112kB active_file:205204kB inactive_file:1025760kB unevictable:3076kB writepending:632kB present:6288384kB managed:6139888kB mlocked:3076kB kernel_stack:39376kB pagetables:44952kB bounce:0kB free_pcp:2692kB local_pcp:388kB free_cma:0kB [ 71.744186] lowmem_reserve[]: 0 0 0 [ 71.744200] DMA: 21*4kB (UMC) 22*8kB (MC) 18*16kB (MC) 7*32kB (UMC) 8*64kB (MC) 8*128kB (UMC) 9*256kB (UMC) 9*512kB (UMC) 9*1024kB (UMC) 8*2048kB (UMC) 363*4096kB (MC) = 1521668kB [ 71.744283] Normal: 36*4kB (U) 40*8kB (UME) 29*16kB (UM) 19*32kB (U) 67*64kB (UME) 26*128kB (ME) 7*256kB (ME) 3*512kB (UME) 2*1024kB (ME) 2*2048kB (UE) 797*4096kB (M) = 3283136kB [ 71.744656] 308967 total pagecache pages [ 71.744701] 0 pages in swap cache [ 71.744708] Swap cache stats: add 0, delete 0, find 0/0 [ 71.744710] Free swap = 10485756kB [ 71.744713] Total swap = 10485756kB [ 71.744715] 1975465 pages RAM [ 71.744718] 0 pages HighMem/MovableOnly [ 71.744722] 55322 pages reserved [ 71.744725] 75776 pages cma reserved [ 71.744736] cma: cma-0 pages: => 0 used of 2048 total pages [ 71.744745] cma: cma-1 pages: => 0 used of 4096 total pages [ 71.744754] cma: cma-2 pages: => 8398 used of 9216 total pages [ 71.744763] cma: cma-3 pages: => 3474 used of 10240 total pages [ 71.744783] cma: cma-4 pages: => 0 used of 40960 total pages [ 71.744789] cma: cma-5 pages: => 0 used of 4096 total pages [ 71.744794] cma: cma-6 pages: => 512 used of 4096 total pages [ 71.744798] cma: cma-7 pages: => 768 used of 1024 total pages [ 71.800158] oom_reaper: reaped process 3216 (FinalizerDaemon), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Forums:
oom 이 아니라 android lmk 같은데요.
oom 이 아니라 android lmk 같은데요. lmk 소스 코드 보고 원인이 뭔지 손수 추적 하셔야겠습니다.
감사합니다. 말씀대로 oom 이 아니었습니다....
Out of memory 상태여서 lmk 가 돈게 아니라 그냥 sigkill 을 맞고 garbage collection 이 돈거였습니다.....
Committed_AS 에 꽂혀서 엄청 헤맸네요. 감사합니다.
댓글 달기