CTSRD-CHERI / cheribsd

FreeBSD adapted for CHERI-RISC-V and Arm Morello.
http://cheribsd.org
Other
169 stars 60 forks source link

Panic: vm_fault failed on high memory pressure #1510

Closed tom-kuchler closed 2 years ago

tom-kuchler commented 2 years ago

When running memory benchmarks on Morello I ran into the following:

Fatal data abort:
  x0: 0xffffa0002df2d510
  x1: 0x0000000000000000 [,0x0000000000000000-0xffffffffffffffff]
  x2: 0x0000000000000000
  x3: 0x0000000000000000 [rwxRW,0x0000000000000000-0xffffffffffffffff]
  x4: 0xffff0000ea61d510 (__bss_end + e9637750)
  x5: 0xffffa0820f712470
  x6: 0x0000000000000000
  x7: 0x0000000000000405
  x8: 0x0000000000000000
  x9: 0x8000000000000000
 x10: 0xffffa08380000000
 x11: 0x000000000000003f
 x12: 0x0000000000000040
 x13: 0xffffa08380000000
 x14: 0x0000000000000000
 x15: 0x0000000000000000
 x16: 0x0000000000000000
 x17: 0x0000000000000003
 x18: 0xffff0000ea61d3f0 (__bss_end + e9637630)
 x19: 0xffff00014d68bbc0
 x20: 0xffffa08023947770
 x21: 0xffffa08023947838
 x22: 0xffffa0837457a030
 x23: 0xffff000000c77000 (vop_vptocnp_desc + 10)
 x24: 0x0000000000000000
 x25: 0x0000000000000200
 x26: 0x00000000000000f5
 x27: 0xffffa0819cc76000
 x28: 0xffff000000f6c000 (softdepmounts + 0)
 x29: 0xffff0000ea61d3f0 (__bss_end + e9637630)
 ddc: 0x0000000000000000
  sp: 0xffff0000ea61d3f0
  lr: 0xffff000000783830 (swp_pager_async_iodone + 1cc)
 elr: 0xffff000000783988 [rwxRW,0x0000000000000000-0xffffffffffffffff] (swp_page                                                                                                                                                             r_async_iodone + 324)
spsr:         60400045
 far: 0xffffa083800003f0
 esr:         96000005
panic: vm_fault failed: ffff000000783988 error 1
cpuid = 1
time = 1665408082
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x174
panic() at panic+0x60
data_abort() at data_abort+0x22c
handle_el1h_sync() at handle_el1h_sync+0x10
--- exception, esr 0x96000005
swp_pager_async_iodone() at swp_pager_async_iodone+0x324
bufdone() at bufdone+0xa8
swapgeom_done() at swapgeom_done+0x50
g_io_deliver() at g_io_deliver+0x24c
g_io_deliver() at g_io_deliver+0x24c
g_disk_done() at g_disk_done+0x114
xpt_done_process() at xpt_done_process+0x6ac
xpt_done_direct() at xpt_done_direct+0x48
ahci_ch_intr_direct() at ahci_ch_intr_direct+0xe0
ahci_intr() at ahci_intr+0xc8
ithread_loop() at ithread_loop+0x3a0
fork_exit() at fork_exit+0x78
fork_trampoline() at fork_trampoline+0x10
KDB: enter: panic
[ thread pid 12 tid 100049 ]
Stopped at      kdb_enter+0x44: undefined       f905c11f

I'm running a memory benchmark and an additional application that is iterating through a 16GiB memory allocation, by touching a range of it and then yielding and waiting before doing it again. (I am also monitoring the machine status with top over a separate ssh connection that is running top) The output above is from a slightly modified kernel, but I could reproduce the crash on a stock version of the kernel. If more information would help you let me know what you need.

jrtc27 commented 2 years ago

Fixed via #1510