qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] "BUG: soft lockup detected on CPU#0!"
@ 2007-05-17 20:18 Shashidhar Mysore
  2007-05-17 20:27 ` Atif Hashmi
  0 siblings, 1 reply; 4+ messages in thread
From: Shashidhar Mysore @ 2007-05-17 20:18 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]

Hi,

I want to instrument all store instructions, and for this I wrote a helper
function (in helper.c) which prints out some information every time a store
is executed. I call this helper function from within every store OPROTO in
ops_mem.h

for example:
void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void)
{
    glue(stl, MEMSUFFIX)(A0, T0);
    helper_print_info(A0); // MY HELPER FUNCTION
    FORCE_RET();
}


This works just fine for me for some time, but after a while when the
frequency of calls to helper_print_info increases, QEMU just hangs throwing
out some information on the QEMU console. I have typed in the error message
in parts below - (If you need more information, please let me know - I
included  a subset just because I do not yet know how to copy-paste text
from QEMU console to the host machine console)

*******************************************
BUG: soft lockup detected on CPU#0!

Pid: 0, comm: swapper
EIP: 0060:[<c027adfb>] CPU: 0
EIP is at serio_interrupt+0x7f/0x18f
EFLAGS: 00000286
...
[c02c1b2d>] cdrom_pc_intr+0x90/0x21a
...
[<c0105b1d>] do_IRQ+0x4a/0x82
=======================
...
[<c04242fe>] unknown_bootoption+0x0/0x1cd
****************************************

QEMU hangs after throwing out the above error. However, if I switch to the
Monitor and disable  my helper function, QEMU resumes back and works fine.
Can somebody tell me -
1. Am I instrumenting all stores if I instrument the OPROTOs in ops_mem.h?
2. From my above example, am I instrumenting the stores with my helper
function in the right way?
3. Can you please tell me why "BUG: soft lockup detected..." error shows up
freezing QEMU?

Looking forward to your help.
Thanks in advance.
-Shashi.

[-- Attachment #2: Type: text/html, Size: 1977 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] "BUG: soft lockup detected on CPU#0!"
  2007-05-17 20:18 [Qemu-devel] "BUG: soft lockup detected on CPU#0!" Shashidhar Mysore
@ 2007-05-17 20:27 ` Atif Hashmi
  2007-05-17 20:54   ` Shashidhar Mysore
  0 siblings, 1 reply; 4+ messages in thread
From: Atif Hashmi @ 2007-05-17 20:27 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]

Hi,

Answering "1. Am I instrumenting all stores if I instrument the OPROTOs in
ops_mem.h? "

Do you consider all updates to memory as stores? e.g. add %ebx, (%eax), will
also write to the memory and
void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void) or one of its
variant will be called.

If you are interested in all the memory updates, then your approach is
correct. If you are only interested in store instructions then your approach
is not correct.

Atif

On 5/17/07, Shashidhar Mysore <shashimc@gmail.com> wrote:
>
> Hi,
>
> I want to instrument all store instructions, and for this I wrote a helper
> function (in helper.c) which prints out some information every time a
> store is executed. I call this helper function from within every store
> OPROTO in ops_mem.h
>
> for example:
> void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void)
> {
>     glue(stl, MEMSUFFIX)(A0, T0);
>     helper_print_info(A0); // MY HELPER FUNCTION
>     FORCE_RET();
> }
>
>
> This works just fine for me for some time, but after a while when the
> frequency of calls to helper_print_info increases, QEMU just hangs throwing
> out some information on the QEMU console. I have typed in the error message
> in parts below - (If you need more information, please let me know - I
> included  a subset just because I do not yet know how to copy-paste text
> from QEMU console to the host machine console)
>
> *******************************************
> BUG: soft lockup detected on CPU#0!
>
> Pid: 0, comm: swapper
> EIP: 0060:[<c027adfb>] CPU: 0
> EIP is at serio_interrupt+0x7f/0x18f
> EFLAGS: 00000286
> ...
> [c02c1b2d>] cdrom_pc_intr+0x90/0x21a
> ...
> [<c0105b1d>] do_IRQ+0x4a/0x82
> =======================
> ...
> [<c04242fe>] unknown_bootoption+0x0/0x1cd
> ****************************************
>
> QEMU hangs after throwing out the above error. However, if I switch to the
> Monitor and disable  my helper function, QEMU resumes back and works fine.
> Can somebody tell me -
> 1. Am I instrumenting all stores if I instrument the OPROTOs in ops_mem.h?
>
> 2. From my above example, am I instrumenting the stores with my helper
> function in the right way?
> 3. Can you please tell me why "BUG: soft lockup detected..." error shows
> up freezing QEMU?
>
> Looking forward to your help.
> Thanks in advance.
> -Shashi.
>

[-- Attachment #2: Type: text/html, Size: 2799 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] "BUG: soft lockup detected on CPU#0!"
  2007-05-17 20:27 ` Atif Hashmi
@ 2007-05-17 20:54   ` Shashidhar Mysore
  2007-05-17 21:22     ` Atif Hashmi
  0 siblings, 1 reply; 4+ messages in thread
From: Shashidhar Mysore @ 2007-05-17 20:54 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2861 bytes --]

Hi Atif,

Thanks for the quick reply. Yes, you are right, I want to consider all
updates to memory. Can you tell me if it is sufficient enough to instrument
just those in ops_mem.h?  I want to make sure I am not missing any form of
write to the memory (even it is from IO devices, which I think is taken care
of).

Thanks,
-Shashi.

On 5/17/07, Atif Hashmi <atifhashmi@gmail.com> wrote:
>
> Hi,
>
> Answering "1. Am I instrumenting all stores if I instrument the OPROTOs in
> ops_mem.h? "
>
> Do you consider all updates to memory as stores? e.g. add %ebx, (%eax),
> will also write to the memory and
> void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void) or one of its
> variant will be called.
>
> If you are interested in all the memory updates, then your approach is
> correct. If you are only interested in store instructions then your approach
> is not correct.
>
> Atif
>
> On 5/17/07, Shashidhar Mysore <shashimc@gmail.com> wrote:
> >
> > Hi,
> >
> > I want to instrument all store instructions, and for this I wrote a
> > helper function (in helper.c) which prints out some information every
> > time a store is executed. I call this helper function from within every
> > store OPROTO in ops_mem.h
> >
> > for example:
> > void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void)
> > {
> >     glue(stl, MEMSUFFIX)(A0, T0);
> >     helper_print_info(A0); // MY HELPER FUNCTION
> >     FORCE_RET();
> > }
> >
> >
> > This works just fine for me for some time, but after a while when the
> > frequency of calls to helper_print_info increases, QEMU just hangs throwing
> > out some information on the QEMU console. I have typed in the error message
> > in parts below - (If you need more information, please let me know - I
> > included  a subset just because I do not yet know how to copy-paste text
> > from QEMU console to the host machine console)
> >
> > *******************************************
> > BUG: soft lockup detected on CPU#0!
> >
> > Pid: 0, comm: swapper
> > EIP: 0060:[<c027adfb>] CPU: 0
> > EIP is at serio_interrupt+0x7f/0x18f
> > EFLAGS: 00000286
> > ...
> > [c02c1b2d>] cdrom_pc_intr+0x90/0x21a
> > ...
> > [<c0105b1d>] do_IRQ+0x4a/0x82
> > =======================
> > ...
> > [<c04242fe>] unknown_bootoption+0x0/0x1cd
> > ****************************************
> >
> > QEMU hangs after throwing out the above error. However, if I switch to
> > the Monitor and disable  my helper function, QEMU resumes back and works
> > fine.
> > Can somebody tell me -
> > 1. Am I instrumenting all stores if I instrument the OPROTOs in
> > ops_mem.h?
> > 2. From my above example, am I instrumenting the stores with my helper
> > function in the right way?
> > 3. Can you please tell me why "BUG: soft lockup detected..." error shows
> > up freezing QEMU?
> >
> > Looking forward to your help.
> > Thanks in advance.
> > -Shashi.
> >
>
>

[-- Attachment #2: Type: text/html, Size: 3642 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] "BUG: soft lockup detected on CPU#0!"
  2007-05-17 20:54   ` Shashidhar Mysore
@ 2007-05-17 21:22     ` Atif Hashmi
  0 siblings, 0 replies; 4+ messages in thread
From: Atif Hashmi @ 2007-05-17 21:22 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3240 bytes --]

Hi Shashi,

I think it is sufficient to add your intercept code in ops_mem.h. I am not
sure about the writes from the I/O though.

Regards,
Atif

On 5/17/07, Shashidhar Mysore <shashimc@gmail.com> wrote:
>
> Hi Atif,
>
> Thanks for the quick reply. Yes, you are right, I want to consider all
> updates to memory. Can you tell me if it is sufficient enough to instrument
> just those in ops_mem.h?  I want to make sure I am not missing any form of
> write to the memory (even it is from IO devices, which I think is taken care
> of).
>
> Thanks,
> -Shashi.
>
> On 5/17/07, Atif Hashmi <atifhashmi@gmail.com> wrote:
> >
> > Hi,
> >
> > Answering "1. Am I instrumenting all stores if I instrument the OPROTOs
> > in ops_mem.h? "
> >
> > Do you consider all updates to memory as stores? e.g. add %ebx, (%eax),
> > will also write to the memory and
> > void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void) or one of its
> > variant will be called.
> >
> > If you are interested in all the memory updates, then your approach is
> > correct. If you are only interested in store instructions then your approach
> > is not correct.
> >
> > Atif
> >
> > On 5/17/07, Shashidhar Mysore <shashimc@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I want to instrument all store instructions, and for this I wrote a
> > > helper function (in helper.c) which prints out some information every
> > > time a store is executed. I call this helper function from within every
> > > store OPROTO in ops_mem.h
> > >
> > > for example:
> > > void OPPROTO glue(glue(op_stl, MEMSUFFIX), _T0_A0)(void)
> > > {
> > >     glue(stl, MEMSUFFIX)(A0, T0);
> > >     helper_print_info(A0); // MY HELPER FUNCTION
> > >     FORCE_RET();
> > > }
> > >
> > >
> > > This works just fine for me for some time, but after a while when the
> > > frequency of calls to helper_print_info increases, QEMU just hangs throwing
> > > out some information on the QEMU console. I have typed in the error message
> > > in parts below - (If you need more information, please let me know - I
> > > included  a subset just because I do not yet know how to copy-paste text
> > > from QEMU console to the host machine console)
> > >
> > > *******************************************
> > > BUG: soft lockup detected on CPU#0!
> > >
> > > Pid: 0, comm: swapper
> > > EIP: 0060:[<c027adfb>] CPU: 0
> > > EIP is at serio_interrupt+0x7f/0x18f
> > > EFLAGS: 00000286
> > > ...
> > > [c02c1b2d>] cdrom_pc_intr+0x90/0x21a
> > > ...
> > > [<c0105b1d>] do_IRQ+0x4a/0x82
> > > =======================
> > > ...
> > > [<c04242fe>] unknown_bootoption+0x0/0x1cd
> > > ****************************************
> > >
> > > QEMU hangs after throwing out the above error. However, if I switch to
> > > the Monitor and disable  my helper function, QEMU resumes back and works
> > > fine.
> > > Can somebody tell me -
> > > 1. Am I instrumenting all stores if I instrument the OPROTOs in
> > > ops_mem.h?
> > > 2. From my above example, am I instrumenting the stores with my helper
> > > function in the right way?
> > > 3. Can you please tell me why "BUG: soft lockup detected..." error
> > > shows up freezing QEMU?
> > >
> > > Looking forward to your help.
> > > Thanks in advance.
> > > -Shashi.
> > >
> >
> >
>

[-- Attachment #2: Type: text/html, Size: 4224 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-17 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-17 20:18 [Qemu-devel] "BUG: soft lockup detected on CPU#0!" Shashidhar Mysore
2007-05-17 20:27 ` Atif Hashmi
2007-05-17 20:54   ` Shashidhar Mysore
2007-05-17 21:22     ` Atif Hashmi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).