Bug#815409: qemu-img create -f qcow2 ... segfaults on mips

2016-11-09 Thread James Cowgill
Hi,

For the record, this bug is now fixed by linux 4.8[1] in unstable which
now emulates FPU branch delay slots using a per-thread page so the stack
is never executed.

Thanks,
James

[1] commit 432c6bacbd0c (MIPS: Use per-mm page to execute branch delay
slot instructions)



signature.asc
Description: OpenPGP digital signature


Bug#815409: qemu-img create -f qcow2 ... segfaults on mips

2016-02-22 Thread Hilko Bengen
Dear qemu maintainers,

gdb on mips/unstable does not seem to like me, but I think that I may
have traced the source of this segfault to somewhere inside
qemu_coroutine_create (the second breakpoint is at the end of
qemu_coroutine_create). See below for what I tried.

Cheers,
-Hilko

,
| $ gdb --args ./qemu-img create -f qcow2 blank-disk-1s.qcow2 10
| GNU gdb (Debian 7.10-1+b1) 7.10
| Copyright (C) 2015 Free Software Foundation, Inc.
| License GPLv3+: GNU GPL version 3 or later 
| This is free software: you are free to change and redistribute it.
| There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
| and "show warranty" for details.
| This GDB was configured as "mips-linux-gnu".
| Type "show configuration" for configuration details.
| For bug reporting instructions, please see:
| .
| Find the GDB manual and other documentation resources online at:
| .
| For help, type "help".
| Type "apropos word" to search for commands related to "word"...
| Reading symbols from ./qemu-img...done.
| (gdb) b qemu_coroutine_create
| Breakpoint 1 at 0x4e2088: file 
/home/bengen/qemu-2.5+dfsg/util/qemu-coroutine.c, line 45.
| (gdb) r 
| Starting program: /home/bengen/qemu-2.5+dfsg/qemu-build/qemu-img create -f 
qcow2 blank-disk-1s.qcow2 10
| warning: GDB can't find the start of the function at 0x77fc6c30.
| 
| GDB is unable to find the start of the function at 0x77fc6c30
| and thus can't determine the size of that function's stack frame.
| This means that GDB may be unable to access that stack frame, or
| the frames below it.
| This problem is most likely caused by an invalid program counter or
| stack pointer.
| However, if you think GDB should simply search farther back
| from 0x77fc6c30 for code which looks like the beginning of a
| function, you can increase the range of the search using the `set
| heuristic-fence-post' command.
| [Thread debugging using libthread_db enabled]
| Using host libthread_db library "/lib/mips-linux-gnu/libthread_db.so.1".
| warning: GDB can't find the start of the function at 0x77fc75e4.
| Formatting 'blank-disk-1s.qcow2', fmt=qcow2 size=10 encryption=off 
cluster_size=65536 lazy_refcounts=off refcount_bits=16
| 
| Breakpoint 1, qemu_coroutine_create (entry=0x41e048 )
| at /home/bengen/qemu-2.5+dfsg/util/qemu-coroutine.c:45
| 45  {
| (gdb) b 79
| Breakpoint 2 at 0x4e20f8: file 
/home/bengen/qemu-2.5+dfsg/util/qemu-coroutine.c, line 79.
| (gdb) c
| Continuing.
| warning: GDB can't find the start of the function at 0x76405e10.
| 
| Program received signal SIGSEGV, Segmentation fault.
| 0x76405e10 in ?? ()
`