-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
let us stay on the list - others might be interested in your problems as well.
Thank you very much, I tried what you said, But met a problem. In my test case, I have multiple threads within the same task, but running on different cores, doing capability mapping to itself. Each thread runs in a tight loop, which are 1,000,000 iterations.
How does this look like in code?
The problem is after some while, the program did not make any progress. And this only happens when I have more than 5 threads. If I only have 2 or 3 threads, they work well. I have no idea how to debug this. Could you give me some hints?
Fiasco has a kernel debugger which you can enter by pressing <ESC> at runtime. Pressing <h> will give you a list of commands.
Some interesting ones:
lp -> lists all present threads. It will show you thread IDs, on which CPU they are running, what address space they belong to and which state they are in.
t<id> -> gives you information about a specific thread with a given debug ID (the one from the lp list). Here you will see at which user or kernel EIP the thread is right now. This may help you figuring out where in the code your threads get stuck.
Q -> gives you a list of all known kernel objects. Use this for instance to find the task your program is running in.
dt<id> <addr> -> dump the address space of a given task starting at address <addr>
Good luck! Bjoern
Hi,
Am 20.08.2014 um 22:15 schrieb Björn Döbel:
Fiasco has a kernel debugger which you can enter by pressing <ESC> at runtime. Pressing <h> will give you a list of commands.
the invocation of jdb by pressing <ESC> is IMHO not the very best choice since it makes l4linux virtually impossible to use. So I patched the debug-key into pressing <ESC> twice quickly.
Martin
--- src/kernel/fiasco/src/kern/vkey.cpp 2014-05-31 11:17:09.000000000 +0200 +++ src/kernel/fiasco/src/kern/vkey.cpp 2014-08-21 18:25:44.583864015 +0200 @@ -31,6 +31,7 @@ IMPLEMENTATION [debug && serial && !ux]: #include "globals.h" #include "kernel_console.h" #include "keycodes.h" +#include "delayloop.h"
static Vkey::Echo_type vkey_echo; static char vkey_buffer[256]; @@ -113,8 +114,21 @@ Vkey::check_()
if (c == KEY_ESC) { - ret = 0; // break into kernel debugger - break; + int timeout=250; + while ((c = Kconsole::console()->getchar(false)) == -1 && timeout--) + Delay::delay(1); + if (c != -1) + { + if (c == KEY_ESC) // ESC pressed twice + { + ret = 0; // break into kernel debugger + break; + } + else + hit |= add(27); + } + else + c = KEY_ESC; }
switch (c)
On Thu Aug 21, 2014 at 18:57:47 +0200, Martin Schröder wrote:
Hi,
Am 20.08.2014 um 22:15 schrieb Björn Döbel:
Fiasco has a kernel debugger which you can enter by pressing <ESC> at runtime. Pressing <h> will give you a list of commands.
the invocation of jdb by pressing <ESC> is IMHO not the very best choice since it makes l4linux virtually impossible to use. So I patched the debug-key into pressing <ESC> twice quickly.
Just some side note: Ctrl-C also works for leaving insert mode...
Adam
On Fri, Aug 22, 2014 at 01:37:24PM +0200, Martin Schröder wrote:
Am 21.08.2014 um 23:50 schrieb Adam Lackorzynski:
Just some side note: Ctrl-C also works for leaving insert mode...
... at the cost of Qemu terminating ;-)
You can use "-serial telnet:localhost:$PORT,server"
Matthias.
Am 22.08.2014 um 18:05 schrieb Matthias Lange:
On Fri, Aug 22, 2014 at 01:37:24PM +0200, Martin Schröder wrote:
Am 21.08.2014 um 23:50 schrieb Adam Lackorzynski:
Just some side note: Ctrl-C also works for leaving insert mode...
... at the cost of Qemu terminating ;-)
You can use "-serial telnet:localhost:$PORT,server"
Ok, the ^C is printed in the console but a "sleep 10" cannot be interrupted. But I suppose this might be an issue of the ramdisk-arm.rd.
Martin.
l4-hackers@os.inf.tu-dresden.de