Skip to contentSkip to conversation

view qemu output/console

Qemu-devel Clemens Kolbitsch 4 participants 6 messages Sep 24, 2007 – Sep 29, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

hi!
i'm having a problem that could have a very easy answer:

my i386 linx system crashes due to a module error and i have to find out where it crashes exactly.... i have the module source code.

when the kernel crashes, it displayes the message, however as it is way much more information that can be displayed in the qemu window, i only see the last 20-something lines. as the crash is fatal, no entries are made to the log-files and i have not succeeded redirecting output to my console (using the -nographic option) as my linux does not boot correctly then.

i have also tried attaching a debugger, however i neither have a unzipped image of my kernel nor are the breakpoints hit correctly as the crash happens inside a module that is loaded on system-startup (i.e. is not part of the kernel).

can someone give me a hint on how i am able to read the whole output of the "kernel-oops"?

thanks!!

#2 lore raw

Hi,

Quoted 6 lines · Clemens Kolbitsch

when the kernel crashes, it displayes the message, however as it is way much more information that can be displayed in the qemu window, i only see the last 20-something lines. as the crash is fatal, no entries are made to the log-files and i have not succeeded redirecting output to my console (using the -nographic option) as my linux does not boot correctly then.

If your host is not windows, you can use the "-monitor stdio" option to output monitor information on the console you start QEmu in.

Hth,
Dscho

#3 lore raw
Quoted 11 lines · Johannes Schindelin
Quoted 6 lines · Clemens Kolbitsch

when the kernel crashes, it displayes the message, however as it is way much more information that can be displayed in the qemu window, i only see the last 20-something lines. as the crash is fatal, no entries are made to the log-files and i have not succeeded redirecting output to my console (using the -nographic option) as my linux does not boot correctly then.

If your host is not windows, you can use the "-monitor stdio" option to output monitor information on the console you start QEmu in.

AIUI Clemens wants to redirect the VGA console output, not QEmu monitor. One idea is to dig out my ncurses interface patch (I believe debian has a version that applies to post-9.0 qemu, and if you're on debian just use the "-curses" switch), then GNU screen would let you log all VGA console output to a file. Another idea is to set a breakpoint at the guest printk() address.

Regards

#4 lore raw
Quoted 9 lines · On Monday 24 September 2007 18:11:04 andrzej zaborowski wrote:
Quoted 8 lines · Johannes Schindelin
Quoted 6 lines · Clemens Kolbitsch

when the kernel crashes, it displayes the message, however as it is way much more information that can be displayed in the qemu window, i only see the last 20-something lines. as the crash is fatal, no entries are made to the log-files and i have not succeeded redirecting output to my console (using the -nographic option) as my linux does not boot correctly then.

Quoted 5 lines
Quoted 2 lines

If your host is not windows, you can use the "-monitor stdio" option to output monitor information on the console you start QEmu in.

AIUI Clemens wants to redirect the VGA console output, not QEmu monitor.

exactly...

Quoted 4 lines

One idea is to dig out my ncurses interface patch (I believe debian has a version that applies to post-9.0 qemu, and if you're on debian just use the "-curses" switch), then GNU screen would let you log all VGA console output to a file.

ok... i'll give it a try!! thanks :-)

Quoted 2 lines

Another idea is to set a
breakpoint at the guest printk() address.

that was my first approach.. however as I don't have the uncompressed linux image, i don't know what to connect gdb to :-(

can i simply uncompress the kernel-file??

#5 lore raw

[Qemu-devel] qcow2 vs. image file format --> pci device

In reply to a message not in the archive

hi everyone!
i have a strange problem (at least to me it seems strange :-) ):

i have implemented a pci device (Network IC) and it works just fine when using a standard image. however i now want to support snapshotting...

i started to convert my image into the qcow2 format and suddenly my code does not work any more... even if i uncomment everything that has to do with snapshotting in my code, it still blocks during qemu startup.

the thing that could cause this: i use 2 additional threads in my NIC code ... each is working with semaphores that might cause problems.

is there something in particular i have to be careful of when using qcow2 file format?

thanks!!

#6 lore raw

Re: [Qemu-devel] qcow2 vs. image file format --> pci device

Quoted 5 lines · Clemens Kolbitsch

hi everyone!
i have a strange problem (at least to me it seems strange :-) ):

i have implemented a pci device (Network IC) and it works just fine when using a standard image. however i now want to support snapshotting...

Quoted 10 lines

i started to convert my image into the qcow2 format and suddenly my code does not work any more... even if i uncomment everything that has to do with snapshotting in my code, it still blocks during qemu startup.

the thing that could cause this: i use 2 additional threads in my NIC code ... each is working with semaphores that might cause problems.

is there something in particular i have to be careful of when using qcow2 file format?

thanks!!

Qcow2 uses async io which triggers io completion with SIGIO signal. If you use threads you must mask this (and also SIGALARM, ..) so your thread won't take over the main threads handling.
Anyway, using threads is not the standard qemu guideline.
Dor.