Skip to contentSkip to conversation

Eeek! page_mapcount(page) went negative! (-1)

DISCUSSION Daniel Drake 6 participants 9 messages Jul 1, 2006

lore
Share & tools
lore
#0 lore raw

A user at http://bugs.gentoo.org/138366 reported a one-off crash on x86 with 2.6.16.19. Here's hoping it might be useful to somebody:

Eeek! page_mapcount(page) went negative! (-1)
page->flags = 8001003c
page->count = 1
page->mapping = f6ad2418

------------[ cut here ]------------
kernel BUG at mm/rmap.c:560!

invalid opcode: 0000 [#1]
PREEMPT
CPU: 0
EIP is at page_remove_rmap+0x93/0xa0
eax: ffffffff ebx: c1234040 ecx: 0000827e edx: c0374d01
esi: b2570000 edi: c1234040 ebp: cdf8bf2c esp: cdf8be84
ds: 007b es: 007b ss: 0068
Process X (pid: 27937, threadinfo=cdf8a000 task=dc73da90)

Stack: <0>c0327022 f6ad2418 dc6fd5c0 c014592f c1234040 b2570000
11a0 2067 11a02067
       fffffffc ffffffff d6c562e0 b26ab000 e465fb28 b26ab000
cdf8bf2 c c0145ac5
       c03dbbec f0cd96fc e465fb24 b256c000 b26ab000 cdf8bf2c
0000000 0 b26aafff
Call Trace:
 [zap_pte_range+351/576] zap_pte_range+0x15f/0x240
 [<c014592f>] zap_pte_range+0x15f/0x240
 [unmap_page_range+181/320] unmap_page_range+0xb5/0x140
 [<c0145ac5>] unmap_page_range+0xb5/0x140
 [unmap_vmas+239/496] unmap_vmas+0xef/0x1f0
 [<c0145c3f>] unmap_vmas+0xef/0x1f0
 [unmap_region+149/304] unmap_region+0x95/0x130
 [<c014a255>] unmap_region+0x95/0x130
 [do_munmap+275/384] do_munmap+0x113/0x180
 [<c014a5d3>] do_munmap+0x113/0x180
 [sys_munmap+68/112] sys_munmap+0x44/0x70
 [<c014a684>] sys_munmap+0x44/0x70
 [sysenter_past_esp+84/117] sysenter_past_esp+0x54/0x75
 [<c0102ddb>] sysenter_past_esp+0x54/0x75
Code: 53 0c 8b 42 04 c7 04 24 0b 70 32 c0 40 89 44 24 04 e8 c2 b0

fc ff 8b 43 10 c7 04 24 22 70 32 c0 89 44 24 04 e8 af b0 fc ff eb 86 <0f> 0b 30 02 e0 6f 32 c0 eb 82 8d 76 00 83 ec 2c 89 5c 24 1c 8b

#1 lore raw
Quoted 2 lines · Daniel Drake

A user at http://bugs.gentoo.org/138366 reported a one-off crash on x86 with 2.6.16.19. Here's hoping it might be useful to somebody:

does this happen too when the user stops using the binary nvidia driver?

#6 lore raw
In reply to Daniel Drake
Quoted 4 lines · Daniel Drake

A user at http://bugs.gentoo.org/138366 reported a one-off crash on x86 with 2.6.16.19. Here's hoping it might be useful to somebody:

Eeek! page_mapcount(page) went negative! (-1)
page->flags = 8001003c

They are PG_s referenced|uptodate|dirty|lru|mappedtodisk

So it is a regular pagecache page. Even though X is involved, I'd be surprised if there is a kernel bug there, but it does look like more than a simple single-bit flip.

Quoted 2 lines

page->count = 1
page->mapping = f6ad2418

If it is a pagecache page, page->mapping != NULL should add 1 to page->count. Then there should be another reference taken for this mapping, and not decremented until after page_remove_rmap.

So both page_mapcount is wrong (was 0, should be at least 1) and either page_count is wrong (was 1, should be at least 2).

If the page was truncated, dirty, mappedtodisk, and ->mapping should have been cleared AFAIKS.

Oh. I see Arjan's pointed out it is using the nvidia driver (how did he figure that out?). That couldn't be helping. If the reporter can reproduce without any binary modules loaded, and after surviving memtest overnight, it would be very interesting.

Thanks

Signature · 2 lines
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 
#2 lore raw
In reply to Arjan van de Ven
Quoted 6 lines · Arjan van de Ven
Quoted 2 lines · Daniel Drake

A user at http://bugs.gentoo.org/138366 reported a one-off crash on x86 with 2.6.16.19. Here's hoping it might be useful to somebody:

does this happen too when the user stops using the binary nvidia driver?

Shouldn't all BUGs include the state of the tainted flags?

Lee

#3 lore raw
Quoted 9 lines · Lee Revell
Quoted 6 lines · Arjan van de Ven
Quoted 2 lines · Daniel Drake

A user at http://bugs.gentoo.org/138366 reported a one-off crash on x86 with 2.6.16.19. Here's hoping it might be useful to somebody:

does this happen too when the user stops using the binary nvidia driver?

Shouldn't all BUGs include the state of the tainted flags?

unless the reporter edits those away ;)
(same for the module list)

#7 lore raw
In reply to Nick Piggin
Quoted 2 lines · Nick Piggin

Oh. I see Arjan's pointed out it is using the nvidia driver (how did he figure that out?).

intuition. The process was X, and there have been reports of the nvidia driver triggering this in Fedora bugzilla as well as other places.

Dave

Signature · 1 line
http://www.codemonkey.org.uk
#4 lore raw
In reply to Arjan van de Ven
Quoted 6 lines · Arjan van de Ven
Quoted 5 lines · Lee Revell
Quoted 4 lines · Arjan van de Ven
Quoted 2 lines · Daniel Drake

A user at http://bugs.gentoo.org/138366 reported a one-off crash on x86 with 2.6.16.19. Here's hoping it might be useful to somebody:

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

does this happen too when the user stops using the binary nvidia driver?

Shouldn't all BUGs include the state of the tainted flags?

unless the reporter edits those away ;)
(same for the module list)

Wow. It boggles my mind that people try to get away with this.

Lee

#8 lore raw
In reply to Dave Jones
Quoted 7 lines · Dave Jones
Quoted 2 lines · Nick Piggin

Oh. I see Arjan's pointed out it is using the nvidia driver (how did he figure that out?).

intuition. The process was X, and there have been reports of the nvidia driver triggering this in Fedora bugzilla as well as other places.

Also if you check the original bug report, there's video_cards_nvidia in the USE flags, which I think includes nvidia-glx (proprietary code).

Signature · 5 lines
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
#5 lore raw
In reply to Lee Revell
Quoted 1 line · Lee Revell

Wow. It boggles my mind that people try to get away with this.

Sorry for the noise.. it appears likely that this is a nvidia driver issue.

Daniel