NetBSD-Bugs archive

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

Re: kern/49603: Single-stepping into syscall reboots -current/amd64 under qemu

The following reply was made to PR kern/49603; it has been noted by GNATS.

From: Andreas Gustafsson <>
To: David Laight <>
Subject: Re: kern/49603: Single-stepping into syscall reboots -current/amd64 under qemu
Date: Mon, 26 Jan 2015 10:54:58 +0200

 David Laight wrote:
 >  That file looks unlikely.
 >  Sounds more like a qemu bug to do with faulting on the system
 >  call entry/exit instruction when 'single step' is enabled.
 I agree that it looks like a qemu bug, but I'm still wondering if
 Christos' commit might have caused some subtle change to the behvior
 of either gdb or the kernel to make it trigger the bug when it didn't
 >  Which instructions are being stepped over?
   (gdb) break sync
   Breakpoint 1 at 0x4007b0
   (gdb) run
   Starting program: /bin/sync 
   Breakpoint 1, 0x00007f7ff743c360 in sync () from /lib/
   (gdb) x/4i $pc
   => 0x7f7ff743c360 <sync>:       mov    $0x24,%eax
      0x7f7ff743c365 <sync+5>:     mov    %rcx,%r10
      0x7f7ff743c368 <sync+8>:     syscall 
      0x7f7ff743c36a <sync+10>:    retq   
   (gdb) stepi
   0x00007f7ff743c365 in sync () from /lib/
   (gdb) stepi
   0x00007f7ff743c368 in sync () from /lib/
   (gdb) stepi
   >> NetBSD/x86 BIOS Boot, Revision 5.10 (from NetBSD 7.99.4)
   >> Memory: 639/129920 k
 >  Do you know if the syscall happens - ie is the
 >  error on the syscall entry, syscall exit or the
 >  following instruction.
 On entry.  I just confirmed this by running "gdb /bin/cat" and setting
 a breakpoint in read().  When I executed the syscall instruction with
 "stepi", the VM rebooted immediately rather than waiting for a line of
 input from stdin first.
 Andreas Gustafsson,

Home | Main Index | Thread Index | Old Index