Вот такое странное поведение... Дано: программа выедает всю доступную память по 256кб за раз. (Точнее, ест в бесконечном цикле).
Дальше (начала не вижу, лог умотало, цитирую с середины): [ 250.997187] Killed process 1704 (sleep) [ 251.276387] sh invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0 [ 251.276399] Pid: 1708, comm: sh Not tainted 2.6.26-2-xen-686 #1 ... так прибиваются всякие процессы, потом доходит очередь до жрущего процесса: [ 251.336426] a.out invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=-17 [ 251.336438] Pid: 1658, comm: a.out Not tainted 2.6.26-2-xen-686 #1 [ 251.336445] [<c0150d66>] oom_kill_process+0x4f/0x1bb [ 251.336455] [<c01250d8>] __capable+0x8/0x1b [ 251.336461] [<c0151207>] out_of_memory+0x14e/0x17f [ 251.336467] [<c0153255>] __alloc_pages_internal+0x2b8/0x34e [ 251.336473] [<c01532f7>] __alloc_pages+0x7/0x9 [ 251.336478] [<c0154df0>] __do_page_cache_readahead+0x86/0x163 [ 251.336484] [<c0155222>] do_page_cache_readahead+0x3d/0x47 [ 251.336489] [<c0150606>] filemap_fault+0x164/0x35a [ 251.336494] [<c015a519>] __do_fault+0x43/0x4c9 [ 251.336500] [<c015eb71>] handle_mm_fault+0x5f6/0xd4a [ 251.336505] [<c015007b>] generic_file_aio_read+0x11e/0x4e1 [ 251.336511] [<c010eaeb>] do_page_fault+0x605/0xb2e [ 251.336517] [<c01607aa>] remove_vma+0x3e/0x43 [ 251.336523] [<c0161179>] do_munmap+0x181/0x19b [ 251.336528] [<c010e4e6>] do_page_fault+0x0/0xb2e [ 251.336533] [<c02cc5b5>] error_code+0x35/0x3c [ 251.336540] [<c02c0000>] setup_cpu_cache+0xf8/0x11f [ 251.336546] ======================= [ 251.336549] Mem-info: [ 251.336551] DMA per-cpu: [ 251.336554] CPU 0: hi: 0, btch: 1 usd: 0 [ 251.336557] CPU 1: hi: 0, btch: 1 usd: 0 [ 251.336560] Normal per-cpu: [ 251.336563] CPU 0: hi: 186, btch: 31 usd: 155 [ 251.336566] CPU 1: hi: 186, btch: 31 usd: 152 [ 251.336569] HighMem per-cpu: [ 251.336572] CPU 0: hi: 90, btch: 15 usd: 3 [ 251.336575] CPU 1: hi: 90, btch: 15 usd: 27 [ 251.336580] Active:250266 inactive:117 dirty:0 writeback:0 unstable:0 [ 251.336580] free:4305 slab:970 mapped:13 pagetables:0 bounce:0 [ 251.336587] DMA free:4060kB min:72kB low:88kB high:108kB active:8240kB inactive:0kB present:16256kB pages_scanned:14053 all_unreclaimable? yes [ 251.336593] lowmem_reserve[]: 0 706 1000 1000 [ 251.336602] Normal free:12756kB min:3364kB low:4204kB high:5044kB active:691188kB inactive:56kB present:723392kB pages_scanned:184146 all_unreclaimable? no [ 251.336608] lowmem_reserve[]: 0 0 2349 2349 [ 251.336616] HighMem free:404kB min:292kB low:640kB high:988kB active:301636kB inactive:412kB present:300736kB pages_scanned:18839 all_unreclaimable? no [ 251.336622] lowmem_reserve[]: 0 0 0 0 [ 251.336628] DMA: 1*4kB 1*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 4060kB [ 251.336643] Normal: 81*4kB 24*8kB 9*16kB 8*32kB 4*64kB 3*128kB 2*256kB 1*512kB 2*1024kB 4*2048kB 0*4096kB = 12820kB [ 251.336658] HighMem: 41*4kB 2*8kB 1*16kB 1*32kB 1*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 420kB [ 251.336673] 254 total pagecache pages [ 251.336677] Swap cache: add 0, delete 0, find 0/0 [ 251.336680] Free swap = 0kB [ 251.336682] Total swap = 0kB [ 251.338930] 262144 pages of RAM [ 251.338937] 75776 pages of HIGHMEM [ 251.338940] 3676 reserved pages [ 251.338942] 119 pages shared [ 251.338944] 0 pages swap cached [ 251.338947] 0 pages dirty [ 251.338949] 0 pages writeback [ 251.338952] 13 pages mapped [ 251.338954] 970 pages slab [ 251.338957] 0 pages pagetables ... но на этом не заканчивается. Сносятся все процессы, после чего ядро паникует. [ 253.118728] Out of memory: kill process 1242 (getty) score 27 or a child [ 253.118735] Killed process 1242 (getty) [ 254.033444] init invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0 [ 254.033514] Pid: 1, comm: init Not tainted 2.6.26-2-xen-686 #1 [ 254.033520] [<c0150d66>] oom_kill_process+0x4f/0x1bb [ 254.033529] [<c01250d8>] __capable+0x8/0x1b [ 254.033535] [<c0151207>] out_of_memory+0x14e/0x17f [ 254.033541] [<c0153255>] __alloc_pages_internal+0x2b8/0x34e [ 254.033547] [<c01532f7>] __alloc_pages+0x7/0x9 [ 254.033552] [<c0154df0>] __do_page_cache_readahead+0x86/0x163 [ 254.033561] [<c0155222>] do_page_cache_readahead+0x3d/0x47 [ 254.033567] [<c0150606>] filemap_fault+0x164/0x35a [ 254.033574] [<c0183af5>] mntput_no_expire+0x13/0x120 [ 254.033580] [<c015a519>] __do_fault+0x43/0x4c9 [ 254.033589] [<c017135e>] file_move+0x14/0x50 [ 254.033594] [<c015eb71>] handle_mm_fault+0x5f6/0xd4a [ 254.033601] [<c0179c69>] do_filp_open+0x34f/0x684 [ 254.033610] [<c010eaeb>] do_page_fault+0x605/0xb2e [ 254.033618] [<c0170a13>] generic_file_llseek+0x96/0xa1 [ 254.033626] [<c017097d>] generic_file_llseek+0x0/0xa1 [ 254.033636] [<c016fc9d>] vfs_llseek+0x30/0x34 [ 254.033643] [<c0170c31>] sys_llseek+0x60/0x82 [ 254.033650] [<c010e4e6>] do_page_fault+0x0/0xb2e [ 254.033658] [<c02cc5b5>] error_code+0x35/0x3c [ 254.033667] ======================= [ 254.033672] Mem-info: [ 254.033677] DMA per-cpu: [ 254.033679] CPU 0: hi: 0, btch: 1 usd: 0 [ 254.033685] CPU 1: hi: 0, btch: 1 usd: 0 [ 254.033690] Normal per-cpu: [ 254.033693] CPU 0: hi: 186, btch: 31 usd: 157 [ 254.033699] CPU 1: hi: 186, btch: 31 usd: 136 [ 254.033705] HighMem per-cpu: [ 254.033708] CPU 0: hi: 90, btch: 15 usd: 76 [ 254.033713] CPU 1: hi: 90, btch: 15 usd: 62 [ 254.033719] Active:250327 inactive:132 dirty:0 writeback:0 unstable:0 [ 254.033720] free:4249 slab:977 mapped:14 pagetables:0 bounce:0 [ 254.033730] DMA free:4060kB min:72kB low:88kB high:108kB active:8240kB inactive:0kB present:16256kB pages_scanned:14085 all_unreclaimable? yes [ 254.033736] lowmem_reserve[]: 0 706 1000 1000 [ 254.033749] Normal free:12672kB min:3364kB low:4204kB high:5044kB active:691836kB inactive:72kB present:723392kB pages_scanned:691779 all_unreclaimable? no [ 254.033759] lowmem_reserve[]: 0 0 2349 2349 [ 254.033770] HighMem free:264kB min:292kB low:640kB high:988kB active:301232kB inactive:456kB present:300736kB pages_scanned:682637 all_unreclaimable? yes [ 254.033778] lowmem_reserve[]: 0 0 0 0 [ 254.033786] DMA: 1*4kB 1*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 4060kB [ 254.033802] Normal: 63*4kB 36*8kB 14*16kB 7*32kB 4*64kB 3*128kB 1*256kB 1*512kB 2*1024kB 4*2048kB 0*4096kB = 12636kB [ 254.033818] HighMem: 10*4kB 3*8kB 1*16kB 1*32kB 0*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 240kB [ 254.033833] 179 total pagecache pages [ 254.033836] Swap cache: add 0, delete 0, find 0/0 [ 254.033839] Free swap = 0kB [ 254.033842] Total swap = 0kB [ 254.035921] 262144 pages of RAM [ 254.035927] 75776 pages of HIGHMEM [ 254.035930] 3676 reserved pages [ 254.035932] 33 pages shared [ 254.035935] 0 pages swap cached [ 254.035937] 0 pages dirty [ 254.035940] 0 pages writeback [ 254.035942] 14 pages mapped [ 254.035944] 977 pages slab [ 254.035947] 0 pages pagetables [ 254.035950] Out of memory: kill process 1248 (getty) score 27 or a child [ 254.035956] Killed process 1248 (getty) [ 254.118343] Out of memory: kill process 1249 (getty) score 27 or a child [ 254.118353] Killed process 1249 (getty) [ 254.562312] Out of memory: kill process 1252 (getty) score 27 or a child [ 254.562377] Killed process 1252 (getty) [ 254.678435] Out of memory: kill process 1254 (getty) score 27 or a child [ 254.678506] Killed process 1254 (getty) [ 255.051177] Kernel panic - not syncing: Out of memory and no killable processes... [ 255.051179] ---- конец логов ---- Вопросы: что это такое и как так может быть, что простейшая программа так положила всю систему? И почему после прибития ./a.out весь отожранный гигабайт не вернулся ядру? (Заодно вопрос, это xen specific или это ожидаемое поведение ядра?) Xen 3.4, linux-image-2.6.26-2-xen, PV-режим. -- To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1282134348.31205.10.ca...@localhost.localdomain