Skip to contentSkip to conversation

Kernel bug: mm/rmap.c:483

DISCUSSION Jay Roplekar 2 participants 2 messages Jan 23, 2005 – Jan 24, 2005

lore
Share & tools
lore
#0 lore raw

I am not sure this is a fixed problem in 2.6.11-rc2 based on my read of the changelog, hence this email. Here is the summary:

1. I started with vanilla 2.6.10 where I replaced ieee1394 drivers from trunk rev 1251 patched in. My kernel is tainted due to ndiswrapper that loads windows drivers for my wireless PCI card. One out of 4 times I actually booted 2.6.10 and manually brought up wlan0 I got 'reboot needed etc messages' . Please note that using similar approach in 2.6.8 does not cause
this issue. Following is the error in /var/log/messages ( I did not paste
everything to be brief):

Jan 22 08:26:58 localhost kernel: Bad page state at prep_new_page (in process 
'net_applet', page c1323a00)
Jan 22 08:26:58 localhost kernel: flags:0x20000004 mapping:00000000 mapcount:1 
count:1
Jan 22 08:26:58 localhost kernel: Backtrace:
Jan 22 08:26:58 localhost kernel:  [dump_stack+30/32] dump_stack+0x1e/0x20
Jan 22 08:26:58 localhost kernel:  [<c0103cde>] dump_stack+0x1e/0x20
Jan 22 08:26:58 localhost kernel:  [bad_page+117/176] bad_page+0x75/0xb0
Jan 22 08:26:58 localhost kernel:  [<c013c1b5>] bad_page+0x75/0xb0
Jan 22 08:26:58 localhost kernel:  [prep_new_page+40/112] 
prep_new_page+0x28/0x70
Jan 22 08:26:58 localhost kernel:  [<c013c4d8>] prep_new_page+0x28/0x70
#####
Jan 22 08:26:58 localhost kernel: ------------[ cut here ]------------
Jan 22 08:26:58 localhost kernel: kernel BUG at mm/rmap.c:483!
Jan 22 08:26:58 localhost kernel: invalid operand: 0000 [#1]
Jan 22 08:26:58 localhost kernel: Modules linked in: mga md5 ipv6 snd_pcm_oss 

snd_mixer_oss snd_via82xx snd_ac97_codec snd_pcm snd_timer snd_page_alloc gameport snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore af_packet fealnx mii eth1394 ide_cd cdrom ohci1394 ieee1394 loop ntfs nls_iso8859_1 nls_cp437 vfat fat ndiswrapper via_agp agpgart uhci_hcd usbcore genrtc ext3 jbd

Jan 22 08:26:58 localhost kernel: CPU:    0
Jan 22 08:26:58 localhost kernel: EIP:    0060:[page_remove_rmap+53/64]    
Tainted: P    B VLI 
Jan 22 08:26:58 localhost kernel: EIP:    0060:[<c014bec5>]    Tainted: P    B 
VLI
Jan 22 08:26:58 localhost kernel: EFLAGS: 00010286   (2.6.10jry)
Jan 22 08:26:58 localhost kernel: EIP is at page_remove_rmap+0x35/0x40
Jan 22 08:26:58 localhost kernel: eax: ffffffff   ebx: 00389000   ecx: 
c0399d54   edx: c1323a00
Jan 22 08:26:58 localhost kernel: esi: d3b06f44   edi: 003b8000   ebp: 
d39ebd2c   esp: d39ebd2c
Jan 22 08:26:58 localhost kernel: ds: 007b   es: 007b   ss: 0068
Jan 22 08:26:58 localhost kernel: Process net_applet (pid: 9326, 
threadinfo=d39ea000 task=d6a8d060)
Jan 22 08:26:58 localhost kernel: Stack: d39ebd58 c0145a67 c1323a00 c0139256 
dffccabc d5a1af08 191d0045 c1323a00
Jan 22 08:26:58 localhost kernel:        08848000 d3b5b088 08800000 d39ebd88 

c0145c10 c0399d54 d3b5b084 08448000

2. I patched in Hugh's patch to 2.6.10 and recompiled. At reboot I ran memtest86 v 1.26, 3 times without any error. Then rebooting in 2.6.10 and doing ifup wlan0 gave me system freeze and unfortunately nothing in the log. Since then I have not seen the same error again after 3 reboots and 2-3 cold boots followed by ifup. I also tried cycles of ifdown and ifup without any errors.

3. I am not sure if I should post my whole config here hence I just pasting DRM related entries here in reference to your original email to Jose`. I have VIA motherboard and a matrox agp card, [FWIW most of the config is same as for 2.6.8 kernel that did not show the rmap sympton]

CONFIG_AGP_VIA=m
CONFIG_DRM=y
CONFIG_DRM_MGA=m

I will be glad to provide any other info needed. You may bcc to my email if this is better discussed off the list. [Although I will anxiously check lkml.org everyday or use RSS feed]. I am not subsribed as We are not worthy :-)

Thanks,

Jay

#1 lore raw
Quoted 6 lines · Jay Roplekar

I am not sure this is a fixed problem in 2.6.11-rc2 based on my read of the changelog, hence this email. Here is the summary:

1. I started with vanilla 2.6.10 where I replaced ieee1394 drivers from trunk rev 1251 patched in. My kernel is tainted due to ndiswrapper that loads windows drivers for my wireless PCI card.

Thanks for identifying that.

Quoted 10 lines

One out of 4 times I actually
booted 2.6.10 and manually brought up wlan0 I got 'reboot needed etc messages' . Please note that using similar approach in 2.6.8 does not cause
this issue. Following is the error in /var/log/messages ( I did not paste
everything to be brief):

Jan 22 08:26:58 localhost kernel: Bad page state at prep_new_page (in process 
'net_applet', page c1323a00)
Jan 22 08:26:58 localhost kernel: flags:0x20000004 mapping:00000000 mapcount:1 

count:1

This is a different case from any I've seen reported before: we've seen several "mapcount:1 count:0" reports, but here you have "mapcount:1 count:1" which is evidence plus confirmation that the page is really in use.

Yet prep_new_page is being called while (re!)allocating this page that's already in use. Sounds like a disagreement between page counts and the buddy system. But the most obvious cause of that, misuse of a high-order page by freeing a lower-order page from within it, should hit the BUG_ON in put_page_testzero before ever getting this far.

So, sorry, I've no idea.

Quoted 8 lines
Jan 22 08:26:58 localhost kernel: Backtrace:
Jan 22 08:26:58 localhost kernel:  [dump_stack+30/32] dump_stack+0x1e/0x20
Jan 22 08:26:58 localhost kernel:  [<c0103cde>] dump_stack+0x1e/0x20
Jan 22 08:26:58 localhost kernel:  [bad_page+117/176] bad_page+0x75/0xb0
Jan 22 08:26:58 localhost kernel:  [<c013c1b5>] bad_page+0x75/0xb0
Jan 22 08:26:58 localhost kernel:  [prep_new_page+40/112] 
prep_new_page+0x28/0x70
Jan 22 08:26:58 localhost kernel:  [<c013c4d8>] prep_new_page+0x28/0x70

You've edited out the full stacktrace for brevity; and were probably quite right to do so, the state of this page is not likely to have anything to do with the process it's now being allocated to.

Quoted 3 lines

#####

Jan 22 08:26:58 localhost kernel: ------------[ cut here ]------------
Jan 22 08:26:58 localhost kernel: kernel BUG at mm/rmap.c:483!

And this is just a consequence of bad_page resetting mapcount from 1 to 0 (well, from 0 to -1 if you delve into how those counts are implemented):
just further confirmation that the reallocated page was really in use.

Quoted 6 lines

2. I patched in Hugh's patch to 2.6.10 and recompiled. At reboot I ran memtest86 v 1.26, 3 times without any error. Then rebooting in 2.6.10 and doing ifup wlan0 gave me system freeze and unfortunately nothing in the log. Since then I have not seen the same error again after 3 reboots and 2-3 cold boots followed by ifup. I also tried cycles of ifdown and ifup without any errors.

Both that patch and memtest86 are good responses, though I doubt my patch will actually help us much in your case.

Quoted 8 lines

3. I am not sure if I should post my whole config here hence I just pasting DRM related entries here in reference to your original email to Jose`. I have VIA motherboard and a matrox agp card, [FWIW most of the config is same as for 2.6.8 kernel that did not show the rmap sympton]

CONFIG_AGP_VIA=m
CONFIG_DRM=y
CONFIG_DRM_MGA=m

DRM again, hmm, thanks, yes, useful info.

Quoted 4 lines

I will be glad to provide any other info needed. You may bcc to my email if this is better discussed off the list. [Although I will anxiously check lkml.org everyday or use RSS feed]. I am not subsribed as We are not worthy :-)

Your worthiness is manifest, in all you've said, and left unsaid.

All I can say for now is, please let us know if you get more such traces.

Thanks,
Hugh