qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [Bug 1098729] Re: qemu-user-static for armhf: segfault in t


From: Erik de Castro Lopo
Subject: [Qemu-devel] [Bug 1098729] Re: qemu-user-static for armhf: segfault in threaded code
Date: Sat, 12 Jan 2013 04:06:44 -0000

What's the best way to debug the qemu user space emulation? I read this:

    http://wiki.qemu.org/Documentation/Debugging

but that seems to mainly refer to the qemu machine emulation.

I added -ggdb to QEMU_CFLAGS in config-host.mak so it builds with debug
symbols but gdb still doesn't provide any useful information beyond the
following:

    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    [New Thread 0x7ffefdb6b700 (LWP 11210)]
    [New Thread 0x7ffefdaf5700 (LWP 11211)]
    [New Thread 0x7ffefda7f700 (LWP 11212)]
    [New Thread 0x7ffefda09700 (LWP 11213)]
    [New Thread 0x7ffefd993700 (LWP 11214)]

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffefdaf5700 (LWP 11211)]
    0x0000000060363b58 in static_code_gen_buffer ()
    (gdb) bt
    #0  0x0000000060363b58 in static_code_gen_buffer ()
    #1  0x00000000f50ba518 in ?? ()
    #2  0x00000000624a9360 in ?? ()
    #3  0x00007ffefdaf4b80 in ?? ()
    #4  0x326cebdf4a8e4700 in ?? ()
    #5  0x00007ffe00000000 in ?? ()
    #6  0x0000000000000000 in ?? ()

and valgrind doesn't help either.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1098729

Title:
  qemu-user-static for armhf: segfault in threaded code

Status in QEMU:
  New

Bug description:
  
  Currently running QEMU from git (fedf2de31023) and running the armhf version 
of qemu-user-static which I have renamed qemu-armhf-static to follow the naming 
convention used in Debian.

  The host systems is a Debian testing x86_64-linux and I have an Debian
  testing armhf chroot which I invoke using schroot.

  Majority of program in the armhf chroot run fine, but I'm getting qemu
  segfaults in multi-threaded programs.

  As an example, I've grabbed the threads demo program here:

  https://computing.llnl.gov/tutorials/pthreads/samples/dotprod_mutex.c

  and changed NUMTHRDS from 4 to 10. I compile it as (same compile
  command on both x86_64 host and armhf guest):

      gcc -Wall -lpthread dotprod_mutex.c -o dotprod_mutex

  When compiled for x86_64 host it runs perfectly and even under
  Valgrind displays no errors whatsoever.

  However, when I compile the program in my armhs chroot and run it it
  usually (but not always) segaults or hangs or crashes. Example output:

  
      (armhf) $ ./dotprod_mutex
      Thread 1 did 100000 to 200000:  mysum=100000.000000 global 
sum=100000.000000
      Thread 0 did 0 to 100000:  mysum=100000.000000 global sum=200000.000000
      TCG temporary leak before f6731ca0
      qemu-arm-static: 
/home/erikd/Git/qemu-posix-timer-hacking/Upstream/tcg/tcg-op.h:2371:
      tcg_gen_goto_tb: Assertion `(tcg_ctx.goto_tb_issue_mask & (1 << idx)) == 
0' failed.

  
      (armhf) $ ./dotprod_mutex
      qemu: uncaught target signal 11 (Segmentation fault) - core dumped
      Segmentation fault

      (armhf) $ ./dotprod_mutex
      qemu-arm-static: 
/home/erikd/Git/qemu-posix-timer-hacking/Upstream/tcg/tcg.c:519:
      tcg_temp_free_internal: Assertion `idx >= s->nb_globals && idx < 
s->nb_temps' failed.

  
      (armhf) $ ./dotprod_mutex
      Thread 1 did 100000 to 200000:  mysum=100000.000000 global 
sum=100000.000000
      qemu: uncaught target signal 11 (Segmentation fault) - core dumped
      Segmentation fault

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1098729/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]