[Top][All Lists]

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

Re: [Qemu-discuss] [Qemu-devel] Qemu usermode fork problem !

From: Peter Maydell
Subject: Re: [Qemu-discuss] [Qemu-devel] Qemu usermode fork problem !
Date: Mon, 22 Apr 2013 13:53:55 +0100

On 22 April 2013 13:31, Muhammad Nouman <address@hidden> wrote:
> Hi ! I am trying to emulate cavium octeon's mips64 linux kernel on Qemu.When
> the fork system call is generated from usermode (i.e from init code), after
> creating a new thread, the kernel gets a fatal signal from the new thread
> and then the new thread never runs.
> I have tried to debug this new thread but the gdb is always showing a single
> thread when the "info threads" command is run.It is not showing the other
> threads.

When you connect a gdb to QEMU's system emulation, you should not
expect to be able to see different user mode processes or threads:
you just see the state of the physical CPU (which may be running
kernel code or user code, depending). This is similar to the view
you get if you connect a debugger to a JTAG port on real hardware.

Note that "the kernel gets a fatal signal from the new thread" is
backwards -- the kernel sends signals to threads, not the other
way around. You should probably try to identify why the kernel
thinks it should be sending a signal to this new thread (probably
provoked by a hardware exception) and work backwards to figure
out why the hardware exception has occurred.

PS: the fork system call creates new processes, not new threads
(the latter is done via clone).

-- PMM

reply via email to

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