Linux MIPS Architecture development
 help / color / mirror / Atom feed
* BUG: BUS error while returning from read() in /dev/oprofile/buffer
@ 2008-01-04  1:18 Anirban Sinha
  2008-01-04  1:18 ` Anirban Sinha
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Anirban Sinha @ 2008-01-04  1:18 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle

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

Hi:

 

I have been trying to hunt down this bug for several days now. What
mainly happens is that when oprofiled wakes up from read() in
/dev/oprofile/buffer on receiving a signal USR1 (i.e, when someone does
opcontrol -start after doing opcontrol-start-daemon), it somehow gets
SIGBUS within glibc read().  We are using a mips machine with Sybyte SB1
processor. On intel, this error does not show up. Interestingly, when I
tried running a small test program that simply reads
/dev/oprofile/buffer, the error can't be reproduced! 

 

Ralf and others, any insights, suggestions or useful comments from
experience will be really really appreciated. I am spending a lot of
time trying to fix this bug.

 

Cheers,

 

Ani

 


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

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

* BUG: BUS error while returning from read() in /dev/oprofile/buffer
  2008-01-04  1:18 BUG: BUS error while returning from read() in /dev/oprofile/buffer Anirban Sinha
@ 2008-01-04  1:18 ` Anirban Sinha
  2008-01-04  1:27 ` David Daney
  2008-01-04 17:56 ` Anirban Sinha
  2 siblings, 0 replies; 5+ messages in thread
From: Anirban Sinha @ 2008-01-04  1:18 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle

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

Hi:

 

I have been trying to hunt down this bug for several days now. What
mainly happens is that when oprofiled wakes up from read() in
/dev/oprofile/buffer on receiving a signal USR1 (i.e, when someone does
opcontrol -start after doing opcontrol-start-daemon), it somehow gets
SIGBUS within glibc read().  We are using a mips machine with Sybyte SB1
processor. On intel, this error does not show up. Interestingly, when I
tried running a small test program that simply reads
/dev/oprofile/buffer, the error can't be reproduced! 

 

Ralf and others, any insights, suggestions or useful comments from
experience will be really really appreciated. I am spending a lot of
time trying to fix this bug.

 

Cheers,

 

Ani

 


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

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

* Re: BUG: BUS error while returning from read() in /dev/oprofile/buffer
  2008-01-04  1:18 BUG: BUS error while returning from read() in /dev/oprofile/buffer Anirban Sinha
  2008-01-04  1:18 ` Anirban Sinha
@ 2008-01-04  1:27 ` David Daney
  2008-01-04 17:56 ` Anirban Sinha
  2 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2008-01-04  1:27 UTC (permalink / raw)
  To: Anirban Sinha; +Cc: linux-mips, Ralf Baechle

Anirban Sinha wrote:
> Hi:
> 
>  
> 
> I have been trying to hunt down this bug for several days now. What 
> mainly happens is that when oprofiled wakes up from read() in 
> /dev/oprofile/buffer on receiving a signal USR1 (i.e, when someone does 
> opcontrol –start after doing opcontrol—start-daemon), it somehow gets 
> SIGBUS within glibc read().  We are using a mips machine with Sybyte SB1 
> processor. On intel, this error does not show up. Interestingly, when I 
> tried running a small test program that simply reads 
> /dev/oprofile/buffer, the error can’t be reproduced!
> 
>  
> 
> Ralf and others, any insights, suggestions or useful comments from 
> experience will be really really appreciated. I am spending a lot of 
> time trying to fix this bug.
> 

Likely you did a cross build of bash and your signal numbers are incorrect.

On the system where you built bash, SIGUSR1 is 10.

On the mips-linux target signal 10 is SIGBUS so when the bash kill 
builtin thinks it is sending SIGUSR1 it is really sending SIGBUS.

David Daney

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

* RE: BUS error while returning from read() in /dev/oprofile/buffer
  2008-01-04  1:18 BUG: BUS error while returning from read() in /dev/oprofile/buffer Anirban Sinha
  2008-01-04  1:18 ` Anirban Sinha
  2008-01-04  1:27 ` David Daney
@ 2008-01-04 17:56 ` Anirban Sinha
  2008-01-04 17:56   ` Anirban Sinha
  2 siblings, 1 reply; 5+ messages in thread
From: Anirban Sinha @ 2008-01-04 17:56 UTC (permalink / raw)
  To: linux-mips

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

First a correction. My test program does terminate with a bus error on
receiving signal USR1. Just in case anyone is interested - It turned out
that the BUS error results from the fact that when coreutils was built,
it used the signal numbers from the devel machine (x86). These numbers
are different from our mips kernel on which we want to use oprofile
(mips has slightly different signal numbers from x86). Many thanks to
David Daney for drawing my attention to this.

 

Cheers,

 

Ani

 

 

From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Anirban Sinha
Sent: Thursday, January 03, 2008 5:18 PM
To: linux-mips@linux-mips.org; Ralf Baechle
Subject: BUG: BUS error while returning from read() in
/dev/oprofile/buffer

 

Hi:

 

I have been trying to hunt down this bug for several days now. What
mainly happens is that when oprofiled wakes up from read() in
/dev/oprofile/buffer on receiving a signal USR1 (i.e, when someone does
opcontrol -start after doing opcontrol-start-daemon), it somehow gets
SIGBUS within glibc read().  We are using a mips machine with Sybyte SB1
processor. On intel, this error does not show up. Interestingly, when I
tried running a small test program that simply reads
/dev/oprofile/buffer, the error can't be reproduced! 

 

Ralf and others, any insights, suggestions or useful comments from
experience will be really really appreciated. I am spending a lot of
time trying to fix this bug.

 

Cheers,

 

Ani

 


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

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

* RE: BUS error while returning from read() in /dev/oprofile/buffer
  2008-01-04 17:56 ` Anirban Sinha
@ 2008-01-04 17:56   ` Anirban Sinha
  0 siblings, 0 replies; 5+ messages in thread
From: Anirban Sinha @ 2008-01-04 17:56 UTC (permalink / raw)
  To: linux-mips

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

First a correction. My test program does terminate with a bus error on
receiving signal USR1. Just in case anyone is interested - It turned out
that the BUS error results from the fact that when coreutils was built,
it used the signal numbers from the devel machine (x86). These numbers
are different from our mips kernel on which we want to use oprofile
(mips has slightly different signal numbers from x86). Many thanks to
David Daney for drawing my attention to this.

 

Cheers,

 

Ani

 

 

From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Anirban Sinha
Sent: Thursday, January 03, 2008 5:18 PM
To: linux-mips@linux-mips.org; Ralf Baechle
Subject: BUG: BUS error while returning from read() in
/dev/oprofile/buffer

 

Hi:

 

I have been trying to hunt down this bug for several days now. What
mainly happens is that when oprofiled wakes up from read() in
/dev/oprofile/buffer on receiving a signal USR1 (i.e, when someone does
opcontrol -start after doing opcontrol-start-daemon), it somehow gets
SIGBUS within glibc read().  We are using a mips machine with Sybyte SB1
processor. On intel, this error does not show up. Interestingly, when I
tried running a small test program that simply reads
/dev/oprofile/buffer, the error can't be reproduced! 

 

Ralf and others, any insights, suggestions or useful comments from
experience will be really really appreciated. I am spending a lot of
time trying to fix this bug.

 

Cheers,

 

Ani

 


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

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

end of thread, other threads:[~2008-01-04 17:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04  1:18 BUG: BUS error while returning from read() in /dev/oprofile/buffer Anirban Sinha
2008-01-04  1:18 ` Anirban Sinha
2008-01-04  1:27 ` David Daney
2008-01-04 17:56 ` Anirban Sinha
2008-01-04 17:56   ` Anirban Sinha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox