Skip to contentSkip to conversation

Kernel bug

DISCUSSION Vympel 2 participants 2 messages Nov 26, 2005 – Nov 27, 2005

Subsystems (3)
lore
Share & tools
lore

Vympel

author
#0 lore raw

Hi, I receive this error and must reboot my server,

Nov 23 15:35:09 mail kernel: ------------[ cut here ]------------
Nov 23 15:35:09 mail kernel: kernel BUG at mm/rmap.c:487!
Nov 23 15:35:09 mail kernel: invalid operand: 0000 [#1]
Nov 23 15:35:09 mail kernel: Modules linked in: snd_cmipci gameport snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_opl3_lib snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore loop ipt_MASQUERADE iptable_nat ip_nat ipt_state ip_conntrack nfnetlink iptable_filter ip_tables dm_mod hw_random i2c_i801 i2c_core fealnx ne2k_pci 8390 8139too mii floppy ext3 jbd aic7xxx scsi_transport_spi sd_mod scsi_mod
Nov 23 15:35:09 mail kernel: CPU: 0
Nov 23 15:35:09 mail kernel: EIP: 0060:[<c014f97b>] Not tainted VLI
Nov 23 15:35:09 mail kernel: EFLAGS: 00010286 (2.6.14-1.1637_FC4)
Nov 23 15:35:09 mail kernel: EIP is at page_remove_rmap+0x37/0x41
Nov 23 15:35:09 mail kernel: eax: ffffffff ebx: c60e11b0 ecx: 04ff1025 edx: c109fe20
Nov 23 15:35:09 mail kernel: esi: c109fe20 edi: 0806c000 ebp: c03f7a7c esp: cc480de8
Nov 23 15:35:09 mail kernel: ds: 007b es: 007b ss: 0068
Nov 23 15:35:09 mail kernel: Process pipe (pid: 18858, threadinfo=cc480000 task=c956c030)
Nov 23 15:35:09 mail kernel: Stack: c0149137 00000000 0807a000 c03f7a7c c9ac0080 0807a000 0807a000 08079fff
Nov 23 15:35:09 mail kernel: c01492ca 0807a000 00000000 c03f7a7c 00033000 0807a000 c5c5e17c 0807a000
Nov 23 15:35:09 mail kernel: c0149401 0807a000 00000000 cc480000 c9194ba0 cc480e78 002dc000 00000000

After some minutes server crash again with following error:

Nov 23 16:33:20 mail kernel: Backtrace:
Nov 23 16:33:20 mail kernel: [<c013f38d>] bad_page+0x8c/0xc3
Nov 23 16:33:20 mail kernel: [<c013fbf7>] free_hot_cold_page+0x47/0xca
Nov 23 16:33:20 mail kernel: [<c01403a5>] __pagevec_free+0x1f/0x2e
Nov 23 16:33:20 mail kernel: [<c0145123>] __pagevec_release_nonlru+0x29/0x8a
Nov 23 16:33:20 mail kernel: [<c01460fd>] shrink_list+0x207/0x47b
Nov 23 16:33:20 mail kernel: [<c014651e>] shrink_cache+0xe7/0x29a
Nov 23 16:33:20 mail kernel: [<c0146b41>] shrink_zone+0x88/0xd6
Nov 23 16:33:20 mail kernel: [<c0146f95>] balance_pgdat+0x20d/0x3e7
Nov 23 16:33:20 mail kernel: [<c014723a>] kswapd+0xcb/0x109
Nov 23 16:33:20 mail kernel: [<c012db56>] autoremove_wake_function+0x0/0x37
Nov 23 16:33:20 mail kernel: [<c014716f>] kswapd+0x0/0x109
Nov 23 16:33:20 mail kernel: [<c0101301>] kernel_thread_helper+0x5/0xb
Nov 23 16:33:20 mail kernel: Trying to fix it up, but a reboot is needed

Best Regards

#1 lore raw
Quoted 5 lines · Vympel

Hi, I receive this error and must reboot my server,

Nov 23 15:35:09 mail kernel: kernel BUG at mm/rmap.c:487!
Nov 23 15:35:09 mail kernel: EFLAGS: 00010286 (2.6.14-1.1637_FC4)
Nov 23 15:35:09 mail kernel: EIP is at page_remove_rmap+0x37/0x41

I'm not very comfortable dealing with Fedora Core kernels: safer to pursue it on their list rather than kernel.org. But the problem, whatever it is, is probably not specific to FC, and below is the 2.6.14 version of the debug patch I usually send out for this (I haven't tried it on FC, but believe it will suit there).

The patch has the (generally welcome) side-effect of letting the system run on longer, despite the errors observed.

Please let me know of any "Bad rmap" and "Bad page state" messages you get after rebuilding and rebooting your kernel with this patch, in case they can shed light on what the problem is in your case.

Most cases either remain unresolved, or are resolved as bad memory, overheating etc. Try memtest86 overnight to check your RAM.

Hugh

arch/ia64/lib/swiotlb.c +2 -0
@@ -449,6 +449,7 @@ swiotlb_map_single(struct device *hwdev,
 static void
 mark_clean(void *addr, size_t size)
 {
+#ifndef CONFIG_X86_64	/* Yes, arch/x86_64 builds this too */
 	unsigned long pg_addr, end;
 
 	pg_addr = PAGE_ALIGN((unsigned long) addr);
@@ -458,6 +459,7 @@ mark_clean(void *addr, size_t size)
 		set_bit(PG_arch_1, &page->flags);
 		pg_addr += PAGE_SIZE;
 	}
+#endif
 }
 
 /*
arch/x86_64/ia32/syscall32.c +1 -1
@@ -25,7 +25,7 @@ static struct page *
 syscall32_nopage(struct vm_area_struct *vma, unsigned long adr, int *type)
 {
 	struct page *p = virt_to_page(adr - vma->vm_start + syscall32_page);
-	get_page(p);
+	SetPageReserved(p);
 	return p;
 }
 
include/linux/rmap.h +1 -1
@@ -72,7 +72,7 @@ void __anon_vma_link(struct vm_area_stru
  */
 void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long);
 void page_add_file_rmap(struct page *);
-void page_remove_rmap(struct page *);
+void page_remove_rmap(struct page *, struct vm_area_struct *, unsigned long);
 
 /**
  * page_dup_rmap - duplicate pte mapping to a page
mm/fremap.c +1 -1
@@ -37,7 +37,7 @@ static inline void zap_pte(struct mm_str
 			if (!PageReserved(page)) {
 				if (pte_dirty(pte))
 					set_page_dirty(page);
-				page_remove_rmap(page);
+				page_remove_rmap(page, vma, addr);
 				page_cache_release(page);
 				dec_mm_counter(mm, rss);
 			}
mm/memory.c +8 -5
@@ -526,6 +526,7 @@ int copy_page_range(struct mm_struct *ds
 }
 
 static void zap_pte_range(struct mmu_gather *tlb, pmd_t *pmd,
+				struct vm_area_struct *vma,
 				unsigned long addr, unsigned long end,
 				struct zap_details *details)
 {
@@ -579,7 +580,7 @@ static void zap_pte_range(struct mmu_gat
 			else if (pte_young(ptent))
 				mark_page_accessed(page);
 			tlb->freed++;
-			page_remove_rmap(page);
+			page_remove_rmap(page, vma, addr);
 			tlb_remove_page(tlb, page);
 			continue;
 		}
@@ -597,6 +598,7 @@ static void zap_pte_range(struct mmu_gat
 }
 
 static inline void zap_pmd_range(struct mmu_gather *tlb, pud_t *pud,
+				struct vm_area_struct *vma,
 				unsigned long addr, unsigned long end,
 				struct zap_details *details)
 {
@@ -608,11 +610,12 @@ static inline void zap_pmd_range(struct 
 		next = pmd_addr_end(addr, end);
 		if (pmd_none_or_clear_bad(pmd))
 			continue;
-		zap_pte_range(tlb, pmd, addr, next, details);
+		zap_pte_range(tlb, pmd, vma, addr, next, details);
 	} while (pmd++, addr = next, addr != end);
 }
 
 static inline void zap_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
+				struct vm_area_struct *vma,
 				unsigned long addr, unsigned long end,
 				struct zap_details *details)
 {
@@ -624,7 +627,7 @@ static inline void zap_pud_range(struct 
 		next = pud_addr_end(addr, end);
 		if (pud_none_or_clear_bad(pud))
 			continue;
-		zap_pmd_range(tlb, pud, addr, next, details);
+		zap_pmd_range(tlb, pud, vma, addr, next, details);
 	} while (pud++, addr = next, addr != end);
 }
 
@@ -645,7 +648,7 @@ static void unmap_page_range(struct mmu_
 		next = pgd_addr_end(addr, end);
 		if (pgd_none_or_clear_bad(pgd))
 			continue;
-		zap_pud_range(tlb, pgd, addr, next, details);
+		zap_pud_range(tlb, pgd, vma, addr, next, details);
 	} while (pgd++, addr = next, addr != end);
 	tlb_end_vma(tlb, vma);
 }
@@ -1313,7 +1316,7 @@ static int do_wp_page(struct mm_struct *
 		if (PageReserved(old_page))
 			inc_mm_counter(mm, rss);
 		else
-			page_remove_rmap(old_page);
+			page_remove_rmap(old_page, vma, address);
 		flush_cache_page(vma, address, pfn);
 		break_cow(vma, new_page, address, page_table);
 		lru_cache_add_active(new_page);
mm/rmap.c +40 -5

74 lines not on this page · raw message