NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-xen/53863: panic: xen_failsafe_handler called! while running 32-bit binary on 64-bit.

>Number:         53863
>Category:       port-xen
>Synopsis:       panic: xen_failsafe_handler called! while running 32-bit binary on 64-bit.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-xen-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 13 03:15:00 +0000 2019
>Originator:     Brian Marcotte
>Release:        8.0
Public Access Networks, Corp.
NetBSD 8.0 NetBSD 8.0 (PANIX-XEN-WEB) #5: Sat Jan 12 20:28:06 EST 2019 amd64

NetBSD/xen 64-bit domU.

When running an old 32-bit perl binary which loads modules, I sometimes get this:

  panic: xen_failsafe_handler called!

  cpu0: Begin traceback...
  vpanic() at netbsd:vpanic+0x140
  snprintf() at netbsd:snprintf
  xpq_flush_queue() at netbsd:xpq_flush_queue
  failsafe_callback() at netbsd:failsafe_callback+0xa1
  x86_64_tls_switch() at netbsd:x86_64_tls_switch+0x8a
  cpu_switchto() at netbsd:cpu_switchto+0x88
  preempt() at netbsd:preempt+0x4d
  trap() at netbsd:trap+0x747
  --- trap (number 3) ---
  cpu0: End traceback...

The binary is an old 32-bit perl which when loading certain modules, changes the text section to read/write. By default this should fail in NetBSD-8 because of mprotect, but it shoudn't panic the kernel. Turning off mprotect allows the program to run, but it sometimes still panics the kernel on startup.

I wasn't able to make a simple program to cause the panic, but I can reproduce it pretty reliably here.

Don't know what the fix is, but I tracked it down to this change:

  src/sys/arch/amd64/amd64/machdep.c ->

That's a pullup of version 1.267.

When I revert that, I no longer get the panic.

Home | Main Index | Thread Index | Old Index