OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by dissent1 - 13.09.2016
Last edited by Ted Hess - 05.10.2016

FS#175 - Kernel bug: Bad page state in processes

Netgear R7800, ipq806x router.
There is a bug appearing during the boot time and uptime

Tue Sep 13 11:39:29 2016 kern.alert kernel: [    3.878645] BUG: Bad page state in process kmodloader  pfn:5f9ee
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    3.878675] page:ddfecdc0 count:0 mapcount:0 mapping:0100006d index:0x1
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    3.883812] flags: 0x6f630365(locked|referenced|lru|active|owner_priv_1|arch_1|mappedtodisk|reclaim)
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    3.898895] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    3.899251] bad because of flags:
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    3.905539] flags: 0x30365(locked|referenced|lru|active|owner_priv_1|arch_1|mappedtodisk|reclaim)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.917211] Modules linked in: usb_common
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.921381] CPU: 0 PID: 56 Comm: kmodloader Not tainted 4.4.19 #0
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.921646] Hardware name: Generic DT based system
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.927744] [<c02217a0>] (unwind_backtrace) from [<c021e040>] (show_stack+0x14/0x20)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.932430] [<c021e040>] (show_stack) from [<c03c45a0>] (dump_stack+0x88/0x9c)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.940327] [<c03c45a0>] (dump_stack) from [<c02ac7f0>] (bad_page+0x12c/0x158)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.947350] [<c02ac7f0>] (bad_page) from [<c02afa98>] (get_page_from_freelist+0x5bc/0x8b4)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.954555] [<c02afa98>] (get_page_from_freelist) from [<c02afff0>] (__alloc_pages_nodemask+0xd4/0x8c0)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.962810] [<c02afff0>] (__alloc_pages_nodemask) from [<c02cd724>] (handle_mm_fault+0x22c/0xd70)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.972093] [<c02cd724>] (handle_mm_fault) from [<c02237d0>] (do_page_fault+0x13c/0x2d0)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.981118] [<c02237d0>] (do_page_fault) from [<c02092e8>] (do_DataAbort+0x44/0xcc)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.989278] [<c02092e8>] (do_DataAbort) from [<c020a8fc>] (__dabt_usr+0x3c/0x40)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    3.996651] Exception stack(0xdcde9fb0 to 0xdcde9ff8)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.004294] 9fa0:                                     006a2008 00002000 006a4008 00004ff0
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.009248] 9fc0: 006a4000 006a2008 00000006 0001248c 00001fec b6ff32c8 b6ff32c8 b6ff51c8
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.017406] 9fe0: 00002001 bebe6cc8 b6fa8f08 b6fa8ab4 20000010 ffffffff
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.025625] Disabling lock debugging due to kernel taint
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    4.031977] BUG: Bad page state in process kmodloader  pfn:5f9ed
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    4.037615] page:ddfecda0 count:0 mapcount:0 mapping:28003500 index:0x1
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    4.043579] flags: 0x84eb0101(locked|owner_priv_1|mappedtodisk|reclaim|unevictable)
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    4.057227] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    4.057585] bad because of flags:
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    4.063792] flags: 0xb0101(locked|owner_priv_1|mappedtodisk|reclaim|unevictable)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.074068] Modules linked in: usb_common
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.078238] CPU: 0 PID: 56 Comm: kmodloader Tainted: G    B           4.4.19 #0
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.078506] Hardware name: Generic DT based system
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.085628] [<c02217a0>] (unwind_backtrace) from [<c021e040>] (show_stack+0x14/0x20)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.090493] [<c021e040>] (show_stack) from [<c03c45a0>] (dump_stack+0x88/0x9c)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.098390] [<c03c45a0>] (dump_stack) from [<c02ac7f0>] (bad_page+0x12c/0x158)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.105420] [<c02ac7f0>] (bad_page) from [<c02afa98>] (get_page_from_freelist+0x5bc/0x8b4)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.112624] [<c02afa98>] (get_page_from_freelist) from [<c02afff0>] (__alloc_pages_nodemask+0xd4/0x8c0)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.120878] [<c02afff0>] (__alloc_pages_nodemask) from [<c02cd724>] (handle_mm_fault+0x22c/0xd70)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.130161] [<c02cd724>] (handle_mm_fault) from [<c02237d0>] (do_page_fault+0x13c/0x2d0)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.139189] [<c02237d0>] (do_page_fault) from [<c02092e8>] (do_DataAbort+0x44/0xcc)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.147347] [<c02092e8>] (do_DataAbort) from [<c020a8fc>] (__dabt_usr+0x3c/0x40)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.154722] Exception stack(0xdcde9fb0 to 0xdcde9ff8)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.162363] 9fa0:                                     006a2008 00002000 006a4008 00004ff0
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.167322] 9fc0: 006a4000 006a2008 00000006 0001248c 00001fec b6ff32c8 b6ff32c8 b6ff51c8
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.175477] 9fe0: 00002001 bebe6cc8 b6fa8f08 b6fa8ab4 20000010 ffffffff
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    4.183696] BUG: Bad page state in process kmodloader  pfn:5f9ec
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    4.190053] page:ddfecd80 count:1708604416 mapcount:0 mapping:f190e77d index:0x1
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    4.196374] flags: 0xf209efdc(referenced|uptodate|dirty|active|slab|owner_priv_1|arch_1|reserved|private|writeback|head|swapcache|mappedtodisk|unevictable)
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    4.217037] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
Tue Sep 13 11:39:29 2016 kern.alert kernel: [    4.217394] bad because of flags:
Tue Sep 13 11:39:29 2016 kern.emerg kernel: [    4.223616] flags: 0x9efdc(referenced|uptodate|dirty|active|slab|owner_priv_1|arch_1|reserved|private|writeback|head|swapcache|mappedtodisk|unevictable)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.240126] Modules linked in: usb_common
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.244296] CPU: 0 PID: 56 Comm: kmodloader Tainted: G    B           4.4.19 #0
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.244565] Hardware name: Generic DT based system
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.251687] [<c02217a0>] (unwind_backtrace) from [<c021e040>] (show_stack+0x14/0x20)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.256551] [<c021e040>] (show_stack) from [<c03c45a0>] (dump_stack+0x88/0x9c)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.264451] [<c03c45a0>] (dump_stack) from [<c02ac7f0>] (bad_page+0x12c/0x158)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.271480] [<c02ac7f0>] (bad_page) from [<c02afa98>] (get_page_from_freelist+0x5bc/0x8b4)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.278684] [<c02afa98>] (get_page_from_freelist) from [<c02afff0>] (__alloc_pages_nodemask+0xd4/0x8c0)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.286936] [<c02afff0>] (__alloc_pages_nodemask) from [<c02cd724>] (handle_mm_fault+0x22c/0xd70)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.296221] [<c02cd724>] (handle_mm_fault) from [<c02237d0>] (do_page_fault+0x13c/0x2d0)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.305247] [<c02237d0>] (do_page_fault) from [<c02092e8>] (do_DataAbort+0x44/0xcc)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.313406] [<c02092e8>] (do_DataAbort) from [<c020a8fc>] (__dabt_usr+0x3c/0x40)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.320781] Exception stack(0xdcde9fb0 to 0xdcde9ff8)
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.328422] 9fa0:                                     006a2008 00002000 006a4008 00004ff0
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.333379] 9fc0: 006a4000 006a2008 00000006 0001248c 00001fec b6ff32c8 b6ff32c8 b6ff51c8
Tue Sep 13 11:39:29 2016 kern.warn kernel: [    4.341538] 9fe0: 00002001 bebe6cc8 b6fa8f08 b6fa8ab4 20000010 ffffffff

The same bug can be met in ddwrt on 3.18.y kernel.
Fortunately it doesn’t do any noticeable harm.

Closed by  Ted Hess
05.10.2016 13:38
Reason for closing:  Fixed
dissent1 commented on 04.10.2016 09:43

I've found the issue
It's the watchdog timer mistakenly set to 25mhz that caused bad page state bug. PXO and CXO clocks are mistakenly set to 25ghz on all ipq806x boards as well.
Correct: CXO - 19,2 MHz, PXO - 27 MHz, WDT - 27 MHz - 32,768 kHz!

Admin
john commented on 04.10.2016 09:53

can you send a patch and/or open a dedicated ticket for this please ?

dissent1 commented on 04.10.2016 10:26

It's in my cumulative pull request https://github.com/lede-project/source/pull/341

dissent1 commented on 04.10.2016 18:17

Update: no it doesn't solve the issue, it's just a coincidence of not appearing for some time after flashing the test build.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing