linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* BUG: Bad page map
@ 2018-12-10 14:05 Andreas Schwab
  2018-12-11  8:34 ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2018-12-10 14:05 UTC (permalink / raw)
  To: linux-riscv

This looks like a serious bug, especially without any swap defined.

swap_info_get: Bad swap file entry 4000000000ec9611
BUG: Bad page map in process struct-ret-3.ex  pte:764b08c0 pmd:6e2fac01
addr:00000000aa2a0c10 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffe4
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Not tainted 4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
Disabling lock debugging due to kernel taint
swap_info_get: Bad swap file entry 4000000000d38671
BUG: Bad page map in process struct-ret-3.ex  pte:69c338c0 pmd:6e2fac01
addr:00000000368d7802 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffe5
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 4000000000f82139
BUG: Bad page map in process struct-ret-3.ex  pte:7c109cc0 pmd:6e2fac01
addr:000000005d95fff2 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffe6
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 4000000000fef7d9
BUG: Bad page map in process struct-ret-3.ex  pte:7f7becc0 pmd:6e2fac01
addr:000000001eee406f vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffe7
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 40000000012cd199
BUG: Bad page map in process struct-ret-3.ex  pte:9668ccc0 pmd:6e2fac01
addr:000000007af7568b vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffec
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 400000000122f109
BUG: Bad page map in process struct-ret-3.ex  pte:917884c0 pmd:6e2fac01
addr:00000000fb140cbb vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffed
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 400000000126d2e1
BUG: Bad page map in process struct-ret-3.ex  pte:936970c0 pmd:6e2fac01
addr:0000000096011bef vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffee
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 4000000000f23849
BUG: Bad page map in process struct-ret-3.ex  pte:791c24c0 pmd:6e2fac01
addr:000000006948a5ce vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffef
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 400000000134adf9
BUG: Bad page map in process struct-ret-3.ex  pte:9a56fcc0 pmd:6e2fac01
addr:00000000667b031e vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3fffff4
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 4000000000fc0fe9
BUG: Bad page map in process struct-ret-3.ex  pte:7e07f4c0 pmd:6e2fac01
addr:000000006fc86206 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3fffff5
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 4000000000f484b1
BUG: Bad page map in process struct-ret-3.ex  pte:7a4258c0 pmd:6e2fac01
addr:00000000807001b4 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3fffff6
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
swap_info_get: Bad swap file entry 4000000000fcdfd1
BUG: Bad page map in process struct-ret-3.ex  pte:7e6fe8c0 pmd:6e2fac01
addr:000000000ac58442 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3fffff7
file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
CPU: 2 PID: 13693 Comm: struct-ret-3.ex Tainted: G    B             4.20.0-rc5-00011-g3b8e7421e0 #44
Call Trace:
[<ffffffe000f2ac9c>] walk_stackframe+0x0/0xa4
[<ffffffe000f2ae9c>] show_stack+0x2a/0x34
[<ffffffe00146541e>] dump_stack+0x62/0x7c
[<ffffffe000ffe97a>] print_bad_pte+0x146/0x18e
[<ffffffe000fff6d4>] unmap_page_range+0x2d2/0x5ea
[<ffffffe000fffa1a>] unmap_single_vma+0x2e/0x40
[<ffffffe000fffb50>] unmap_vmas+0x42/0x7a
[<ffffffe001005a9e>] exit_mmap+0x7e/0x106
[<ffffffe000f2d8c8>] mmput.part.3+0x26/0xa4
[<ffffffe000f2d966>] mmput+0x20/0x28
[<ffffffe000f32232>] do_exit+0x23c/0x826
[<ffffffe000f32876>] do_group_exit+0x2a/0x82
[<ffffffe000f328e6>] __wake_up_parent+0x0/0x22
[<ffffffe000f29bd6>] ret_from_syscall+0x0/0xe
BUG: Bad rss-counter state mm:00000000e8bbd9eb idx:1 val:12
BUG: Bad rss-counter state mm:00000000e8bbd9eb idx:2 val:-12

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG: Bad page map
  2018-12-10 14:05 BUG: Bad page map Andreas Schwab
@ 2018-12-11  8:34 ` Paul Walmsley
  2018-12-11 10:04   ` Andreas Schwab
  2018-12-11 10:33   ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Walmsley @ 2018-12-11  8:34 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linux-riscv

Hello Andreas 

On Mon, 10 Dec 2018, Andreas Schwab wrote:

> This looks like a serious bug, especially without any swap defined.
> 
> swap_info_get: Bad swap file entry 4000000000ec9611
> BUG: Bad page map in process struct-ret-3.ex  pte:764b08c0 pmd:6e2fac01
> addr:00000000aa2a0c10 vm_flags:00100173 anon_vma:00000000dc561e1a mapping:          (null) index:3ffffe4
> file:          (null) fault:          (null) mmap:          (null) readpage:          (null)
> CPU: 2 PID: 13693 Comm: struct-ret-3.ex Not tainted 4.20.0-rc5-00011-g3b8e7421e0 #44

Can you give us some guidance on how to reproduce this?  Was this on 
hardware or software (QEMU)?  Could you post the kernel tree that you were 
using?


- Paul

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG: Bad page map
  2018-12-11  8:34 ` Paul Walmsley
@ 2018-12-11 10:04   ` Andreas Schwab
  2018-12-11 10:33   ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2018-12-11 10:04 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: Stef O'Rear, linux-riscv

Stef O'Rear <sorear2@gmail.com> has a patch for this issue.  Stef,
please post it here.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG: Bad page map
  2018-12-11  8:34 ` Paul Walmsley
  2018-12-11 10:04   ` Andreas Schwab
@ 2018-12-11 10:33   ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2018-12-11 10:33 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-riscv

This is the reproducer:

#include <sys/mman.h>

int
main (void)
{
  char *a = mmap (0, 4096, PROT_READ | PROT_WRITE,
		  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
  ++*a;
  mprotect (a, 4096, PROT_NONE);
}

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-11 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 14:05 BUG: Bad page map Andreas Schwab
2018-12-11  8:34 ` Paul Walmsley
2018-12-11 10:04   ` Andreas Schwab
2018-12-11 10:33   ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).