oom-killer ohne ersichtlichen Grund - Was kann's sein?

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
EdRoxter
Posts: 483
Joined: 2006-01-06 03:23
Location: Neben Bonn
 

oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by EdRoxter »

Servus!

Seit ein paar Tagen verabschiedet sich meine Kiste regelmäßig mit absolut vollem RAM und Swap:

Code: Select all

Oct 23 22:18:08 w4k kernel: oom-killer: gfp_mask=0x201d2, order=0
Oct 23 22:18:24 w4k kernel:  [out_of_memory+151/192] out_of_memory+0x97/0xc0
Oct 23 22:18:29 w4k kernel:  [__alloc_pages+546/688] __alloc_pages+0x222/0x2b0
Oct 23 22:18:30 w4k kernel:  [__do_page_cache_readahead+273/336] __do_page_cache_readahead+0x111/0x150
Oct 23 22:18:30 w4k kernel:  [filemap_nopage+709/896] filemap_nopage+0x2c5/0x380
Oct 23 22:18:30 w4k kernel:  [do_no_page+105/576] do_no_page+0x69/0x240
Oct 23 22:18:30 w4k kernel:  [__pollwait+0/160] __pollwait+0x0/0xa0
Oct 23 22:18:30 w4k kernel:  [__handle_mm_fault+206/448] __handle_mm_fault+0xce/0x1c0
Oct 23 22:18:30 w4k kernel:  [do_page_fault+349/1365] do_page_fault+0x15d/0x555
Oct 23 22:18:30 w4k kernel:  [sys_time+15/48] sys_time+0xf/0x30
Oct 23 22:18:30 w4k kernel:  [do_page_fault+0/1365] do_page_fault+0x0/0x555
Oct 23 22:18:30 w4k kernel:  [error_code+79/96] error_code+0x4f/0x60
Oct 23 22:18:30 w4k kernel: Mem-info:
Oct 23 22:18:30 w4k kernel: DMA per-cpu:
Oct 23 22:18:31 w4k kernel: cpu 0 hot: high 0, batch 1 used:0
Oct 23 22:18:31 w4k kernel: cpu 0 cold: high 0, batch 1 used:0
Oct 23 22:18:31 w4k kernel: DMA32 per-cpu: empty
Oct 23 22:18:31 w4k kernel: Normal per-cpu:
Oct 23 22:18:31 w4k kernel: cpu 0 hot: high 186, batch 31 used:37
Oct 23 22:18:31 w4k kernel: cpu 0 cold: high 62, batch 15 used:19
Oct 23 22:18:31 w4k kernel: HighMem per-cpu: empty
Oct 23 22:18:31 w4k kernel: Free pages:        5336kB (0kB HighMem)
Oct 23 22:18:31 w4k kernel: Active:60639 inactive:60616 dirty:0 writeback:0 unstable:0 free:1334 slab:2428 mapped:121597 pagetables:875
Oct 23 22:18:31 w4k kernel: DMA free:2064kB min:88kB low:108kB high:132kB active:3572kB inactive:3160kB present:16384kB pages_scanned:7530 all_unreclaimable? yes
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 494 494
Oct 23 22:18:31 w4k kernel: DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 494 494
Oct 23 22:18:31 w4k kernel: Normal free:3272kB min:2800kB low:3500kB high:4200kB active:238984kB inactive:239304kB present:506816kB pages_scanned:263451 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 0 0
Oct 23 22:18:31 w4k kernel: HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 0 0
Oct 23 22:18:31 w4k kernel: DMA: 0*4kB 0*8kB 1*16kB 0*32kB 0*64kB 2*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2064kB
Oct 23 22:18:31 w4k kernel: DMA32: empty
Oct 23 22:18:31 w4k kernel: Normal: 136*4kB 11*8kB 11*16kB 15*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 3272kB
Oct 23 22:18:31 w4k kernel: HighMem: empty
Oct 23 22:18:31 w4k kernel: Swap cache: add 2481645, delete 2481644, find 772397/962278, race 3+76
Oct 23 22:18:31 w4k kernel: Free swap  = 0kB
Oct 23 22:18:31 w4k kernel: Total swap = 1000440kB
Oct 23 22:18:31 w4k kernel: Free swap:            0kB
Oct 23 22:18:31 w4k kernel: 130800 pages of RAM
Oct 23 22:18:31 w4k kernel: 0 pages of HIGHMEM
Oct 23 22:18:31 w4k kernel: 3058 reserved pages
Oct 23 22:18:31 w4k kernel: 4002 pages shared
Oct 23 22:18:31 w4k kernel: 1 pages swap cached
Oct 23 22:18:31 w4k kernel: 0 pages dirty
Oct 23 22:18:31 w4k kernel: 0 pages writeback
Oct 23 22:18:31 w4k kernel: 121598 pages mapped
Oct 23 22:18:31 w4k kernel: 2428 pages slab
Oct 23 22:18:31 w4k kernel: 875 pages pagetables
Oct 23 22:18:31 w4k kernel: Out of Memory: Kill process 24705 (apache2) score 39590 and children.
Oct 23 22:18:31 w4k kernel: Out of memory: Killed process 24705 (apache2).
Oct 23 22:18:31 w4k kernel: oom-killer: gfp_mask=0xd0, order=0
Oct 23 22:18:31 w4k kernel:  [out_of_memory+151/192] out_of_memory+0x97/0xc0
Oct 23 22:18:31 w4k kernel:  [__alloc_pages+546/688] __alloc_pages+0x222/0x2b0
Oct 23 22:18:31 w4k kernel:  [__get_free_pages+37/64] __get_free_pages+0x25/0x40
Oct 23 22:18:31 w4k kernel:  [__pollwait+108/160] __pollwait+0x6c/0xa0
Oct 23 22:18:31 w4k kernel:  [pipe_poll+36/144] pipe_poll+0x24/0x90
Oct 23 22:18:31 w4k kernel:  [do_select+741/880] do_select+0x2e5/0x370
Oct 23 22:18:31 w4k kernel:  [__pollwait+0/160] __pollwait+0x0/0xa0
Oct 23 22:18:31 w4k kernel:  [core_sys_select+518/832] core_sys_select+0x206/0x340
Oct 23 22:18:31 w4k kernel:  [copy_from_user+50/96] copy_from_user+0x32/0x60
Oct 23 22:18:31 w4k kernel:  [sys_select+172/368] sys_select+0xac/0x170
Oct 23 22:18:31 w4k kernel:  [syscall_call+7/11] syscall_call+0x7/0xb
Oct 23 22:18:31 w4k kernel: Mem-info:
Oct 23 22:18:31 w4k kernel: DMA per-cpu:
Oct 23 22:18:31 w4k kernel: cpu 0 hot: high 0, batch 1 used:0
Oct 23 22:18:31 w4k kernel: cpu 0 cold: high 0, batch 1 used:0
Oct 23 22:18:31 w4k kernel: DMA32 per-cpu: empty
Oct 23 22:18:31 w4k kernel: Normal per-cpu:
Oct 23 22:18:31 w4k kernel: cpu 0 hot: high 186, batch 31 used:36
Oct 23 22:18:31 w4k kernel: cpu 0 cold: high 62, batch 15 used:13
Oct 23 22:18:31 w4k kernel: HighMem per-cpu: empty
Oct 23 22:18:31 w4k kernel: Free pages:        5336kB (0kB HighMem)
Oct 23 22:18:31 w4k kernel: Active:60639 inactive:60679 dirty:0 writeback:0 unstable:0 free:1334 slab:2429 mapped:121598 pagetables:875
Oct 23 22:18:31 w4k kernel: DMA free:2064kB min:88kB low:108kB high:132kB active:3572kB inactive:3160kB present:16384kB pages_scanned:7530 all_unreclaimable? yes
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 494 494
Oct 23 22:18:31 w4k kernel: DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 494 494
Oct 23 22:18:31 w4k kernel: Normal free:3272kB min:2800kB low:3500kB high:4200kB active:238984kB inactive:239556kB present:506816kB pages_scanned:263484 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 0 0
Oct 23 22:18:31 w4k kernel: HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 0 0
Oct 23 22:18:31 w4k kernel: DMA: 0*4kB 0*8kB 1*16kB 0*32kB 0*64kB 2*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2064kB
Oct 23 22:18:31 w4k kernel: DMA32: empty
Oct 23 22:18:31 w4k kernel: Normal: 136*4kB 11*8kB 11*16kB 15*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 3272kB
Oct 23 22:18:31 w4k kernel: HighMem: empty
Oct 23 22:18:31 w4k kernel: Swap cache: add 2481645, delete 2481644, find 772397/962278, race 3+76
Oct 23 22:18:31 w4k kernel: Free swap  = 0kB
Oct 23 22:18:31 w4k kernel: Total swap = 1000440kB
Oct 23 22:18:31 w4k kernel: Free swap:            0kB
Oct 23 22:18:31 w4k kernel: 130800 pages of RAM
Oct 23 22:18:31 w4k kernel: 0 pages of HIGHMEM
Oct 23 22:18:31 w4k kernel: 3058 reserved pages
Oct 23 22:18:31 w4k kernel: 4003 pages shared
Oct 23 22:18:31 w4k kernel: 1 pages swap cached
Oct 23 22:18:31 w4k kernel: 0 pages dirty
Oct 23 22:18:31 w4k kernel: 0 pages writeback
Oct 23 22:18:31 w4k kernel: 121598 pages mapped
Oct 23 22:18:31 w4k kernel: 2429 pages slab
Oct 23 22:18:31 w4k kernel: 875 pages pagetables
Oct 23 22:18:31 w4k kernel: oom-killer: gfp_mask=0x201d2, order=0
Oct 23 22:18:31 w4k kernel:  [out_of_memory+151/192] out_of_memory+0x97/0xc0
Oct 23 22:18:31 w4k kernel:  [__alloc_pages+546/688] __alloc_pages+0x222/0x2b0
Oct 23 22:18:31 w4k kernel:  [__do_page_cache_readahead+273/336] __do_page_cache_readahead+0x111/0x150
Oct 23 22:18:31 w4k kernel:  [filemap_nopage+709/896] filemap_nopage+0x2c5/0x380
Oct 23 22:18:31 w4k kernel:  [do_no_page+105/576] do_no_page+0x69/0x240
Oct 23 22:18:31 w4k kernel:  [__pollwait+0/160] __pollwait+0x0/0xa0
Oct 23 22:18:31 w4k kernel:  [__handle_mm_fault+206/448] __handle_mm_fault+0xce/0x1c0
Oct 23 22:18:31 w4k kernel:  [do_page_fault+349/1365] do_page_fault+0x15d/0x555
Oct 23 22:18:31 w4k kernel:  [do_page_fault+0/1365] do_page_fault+0x0/0x555
Oct 23 22:18:31 w4k kernel:  [error_code+79/96] error_code+0x4f/0x60
Oct 23 22:18:31 w4k kernel: Mem-info:
Oct 23 22:18:31 w4k kernel: DMA per-cpu:
Oct 23 22:18:31 w4k kernel: cpu 0 hot: high 0, batch 1 used:0
Oct 23 22:18:31 w4k kernel: cpu 0 cold: high 0, batch 1 used:0
Oct 23 22:18:31 w4k kernel: DMA32 per-cpu: empty
Oct 23 22:18:31 w4k kernel: Normal per-cpu:
Oct 23 22:18:31 w4k kernel: cpu 0 hot: high 186, batch 31 used:27
Oct 23 22:18:31 w4k kernel: cpu 0 cold: high 62, batch 15 used:50
Oct 23 22:18:31 w4k kernel: HighMem per-cpu: empty
Oct 23 22:18:31 w4k kernel: Free pages:        5636kB (0kB HighMem)
Oct 23 22:18:31 w4k kernel: Active:60967 inactive:60181 dirty:0 writeback:0 unstable:0 free:1409 slab:2429 mapped:121609 pagetables:875
Oct 23 22:18:31 w4k kernel: DMA free:2064kB min:88kB low:108kB high:132kB active:3572kB inactive:3160kB present:16384kB pages_scanned:7530 all_unreclaimable? yes
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 494 494
Oct 23 22:18:31 w4k kernel: DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 494 494
Oct 23 22:18:31 w4k kernel: Normal free:3572kB min:2800kB low:3500kB high:4200kB active:240296kB inactive:237564kB present:506816kB pages_scanned:208809 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 0 0
Oct 23 22:18:31 w4k kernel: HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Oct 23 22:18:31 w4k kernel: lowmem_reserve[]: 0 0 0 0
Oct 23 22:18:31 w4k kernel: DMA: 0*4kB 0*8kB 1*16kB 0*32kB 0*64kB 2*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2064kB
Oct 23 22:18:31 w4k kernel: DMA32: empty
Oct 23 22:18:31 w4k kernel: Normal: 211*4kB 11*8kB 11*16kB 15*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 3572kB
Oct 23 22:18:31 w4k kernel: HighMem: empty
Oct 23 22:18:31 w4k kernel: Swap cache: add 2481653, delete 2481644, find 772397/962279, race 3+76
Oct 23 22:18:31 w4k kernel: Free swap  = 0kB
Oct 23 22:18:31 w4k kernel: Total swap = 1000440kB
Oct 23 22:18:31 w4k kernel: Free swap:            0kB
Oct 23 22:18:31 w4k kernel: 130800 pages of RAM
Oct 23 22:18:31 w4k kernel: 0 pages of HIGHMEM
Oct 23 22:18:31 w4k kernel: 3058 reserved pages
Oct 23 22:18:31 w4k kernel: 4075 pages shared
Oct 23 22:18:31 w4k kernel: 9 pages swap cached
Oct 23 22:18:31 w4k kernel: 0 pages dirty
Oct 23 22:18:31 w4k kernel: 0 pages writeback
Oct 23 22:18:31 w4k kernel: 121609 pages mapped
Oct 23 22:18:31 w4k kernel: 2429 pages slab
Oct 23 22:18:31 w4k kernel: 875 pages pagetables
Das geht dann irgendwann so weit, dass wirklich komplett alles dicht und absolut Null frei ist und nur noch ein Hardreset hilft, auf den der Rechner auch erst beim vierten oder fünften Mal (per Webinterface vom Provider) reagiert. Ist allein heute zwei Mal passiert, letzten Freitag, letzten Dienstag und davor den Freitag, wird also auch immer häufiger.

In keinem Log lässt sich auch nur irgendein Hinweis auf Angriffe oder dergleichen finden, Apache2 ist auch der aktuellste, den es für Debian Sarge gibt (2.0.54-5Sarge1), in dem ja der letzte Bugfix bzgl. eines Buffer Overflow gefixt ist.
Es hat sich auf dem Rechner auch bzgl. gehosteter Seiten seit über 2 Monaten nichts mehr geändert, es gibt keine potentiell gefährliche Software bei den paar Kunden..
Nach Rootkits sieht's sowohl bei rkhunter als auch bei chkrootkit nicht aus.
Ich bin mit meinem Latein am Ende. Kann's evtl. ein Hardware-Defekt sein?

Bin dankbar für jede Antwort!
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by Joe User »

Hmm, meine Glaskugel vermutet ein 64Bit-Debian auf einem AMD-Athlon mit weniger als 4GB RAM. Richtig?
Ja -> Auf 32Bit-Debian wechseln und beobachten.
Nein -> Hardware prüfen/austauschen lassen.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
EdRoxter
Posts: 483
Joined: 2006-01-06 03:23
Location: Neben Bonn
 

Re: oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by EdRoxter »

Negativ, ist ein 32-Bit auf Celeron 2.4GHz mit 512 MB RAM, was für 10 kleine Webhosting-Kunden völlig ausreichen sollte.

Also ist defekte Hardware durchaus eine Möglichkeit?
knebb
Posts: 91
Joined: 2006-05-30 11:16
Location: M-V
 

Re: oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by knebb »

EdRoxter wrote:Negativ, ist ein 32-Bit auf Celeron 2.4GHz mit 512 MB RAM, was für 10 kleine Webhosting-Kunden völlig ausreichen sollte.
Kommt darauf an, was die Kunden alles machen. Und vor allem, wieviele Zugriffe stattfinden.
Also ist defekte Hardware durchaus eine Möglichkeit?
DAS ist IMMER eine Möglichkeit. sieht mir aber eher nicht danach aus. Wenn HW defekt ist, gibt es unterschiedlichste Effekte, aber selten immer die gleichen.

Überwache Dein System mal regelmäßig. Ich vermute, daß sehr viele Apache-Prozesse aktiv sind und Speicher fressen.

Was sagt free sowohl bei Systemstart als auch dann, wenn der Speicher ausgeht? Was ssagt in diesem Moment top bzw. ps axf?
Wie sieht die apache-config (für SpareServer etc.) aus?
EdRoxter
Posts: 483
Joined: 2006-01-06 03:23
Location: Neben Bonn
 

Re: oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by EdRoxter »

Heidenei. Ich sollte tatsächlich mal etwas an meiner tastaturtechnischen Fahrlässigkeit und Wahrnehmungsgabe tun. Oder mir eine Brille zulegen. ;)

Die Sache ist jedenfalls schon länger passé, nämlich, seitdem ein Hardwarecheck gänzlich ohne Beanstandungen ausgefallen ist.
Ich hab, um möglichst viel Leistung aus dem Apache rauszuholen, mit den ganzen Werten "experimentiert". Dabei ist mir später erst aufgefallen, dass ich die ganze Zeit in <IfModule perchild.c> rumgespielt habe (welches ich gar nicht benutze) und vorher anscheinend bei prefork (jaja, steinigt mich - ich brauch mod_php..) die MaxRequestsPerChild aus mir selber im Nachhinein absolut unersichtlichen Gründen auf 2000 gestellt hab (vielleicht war eine Spinne auf der Tastatur oder so..). Das verträgt so eine kleine Kiste natürlich selbst im Normalbetrieb nicht unbedingt...

Bedanke mich trotzdem für die Hinweise!
danu
Posts: 264
Joined: 2005-02-02 11:15
 

Re: oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by danu »

cool, habe ja nicht gewusst wie das aussieht, wenn man die Kiste mit dieser Methode in die Knie zwingt.
EdRoxter
Posts: 483
Joined: 2006-01-06 03:23
Location: Neben Bonn
 

Re: oom-killer ohne ersichtlichen Grund - Was kann's sein?

Post by EdRoxter »

Du kannst auch die MaxRequestsPerChild mal auf 0 (=unendlich) stellen und dann mit nem ServerStress-Tool das Ding ein wenig unter Druck setzen. Wenn du nicht grad auf der dicksten Kiste hockst, sollte das schon Probleme geben. ;)