<div dir="ltr">Hi, <div><br></div><div>I was using a program to test OOM killer, but OOM killer hung my board. The test snippet is very simple, just malloc() without free().</div><div><br></div><div><div> 6 int i=0;</div><div> 7 char *ptrtest=NULL;</div><div> 8 while (1)</div><div> 9 {</div><div> 10 ptrtest = malloc(0x1000);</div><div> 11 if (ptrtest == NULL)</div><div> 12 printf("malloc failed.\n");</div><div> 13 }</div><div> 14 return 0;</div><div> 15 </div><div><br></div><div>After I executed this program(a.out), there is no reaction of my shell. Only this messege was shown:</div><div><div><br></div><div>[ 180.138188] Out of memory: Kill process 2706 (qq) score 623 or sacrifice child</div><div>[ 180.164230] Killed process 2706 (qq) total-vm:98156kB, anon-rss:96400kB, file-rss:4kB</div></div><div><br></div><div>I think it must be some problem with OOM killer, and tried a lot of way to get some infomation. And I got this:</div><div><br></div><div><div><div>=======================================================</div><div>Process: a.out, cpu: 0 pid: 1463 start: 0xd5849b00</div><div>=====================================================</div><div> Task name: a.out pid: 1463 cpu: 0</div><div> state: 0x2 exit_state: 0x0 stack base: 0xd6190000</div><div> Stack:</div><div> [<c08394e4>] __schedule+0x2c8</div><div> [<c018df88>] squashfs_cache_get+0x108</div><div> [<c0191020>] squashfs_readpage_block+0x28</div><div> [<c018f648>] squashfs_readpage+0x624</div><div> [<c0090d4c>] __do_page_cache_readahead+0x228</div><div> [<c00882f4>] filemap_fault+0x1d4</div><div> [<c00a5f10>] __do_fault+0x34</div><div> [<c00a8ab0>] do_read_fault+0x19c</div><div> [<c00a9388>] handle_mm_fault+0x468</div><div> [<c00164b0>] do_page_fault+0x11c</div><div> [<c00084a4>] do_PrefetchAbort+0x34</div><div> [<c0011c1c>] ret_from_exception+0x0</div></div></div><div><br></div><div>I am suprised, because a.out is in /tmp, there is no relation between a.out and squashfs(my rootfs). Could anyone give me a hint ? Is the problem of squashfs or OOM killer. </div>-- <br><div class="gmail_signature">Cheers,<br>Rock</div>
</div></div>