You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stefan Fritsch <sf...@sfritsch.de> on 2008/07/21 23:50:58 UTC

[PATCH] SIGBUS when compiled with gcc 4.3

Hi,

[I am resending this because the first mail did not get through. Sorry 
if anyone gets this twice. Are non-subscriber addresses blocked from 
posting?]

when compiled with gcc 4.3 on Sparc under Linux, Apache 2.2.9 
sometimes crashes with SIGBUS in the ssl shmcb code.

Adding __attribute__((__noinline__)) (which is already present in
ssl_scache_shmcb.c for the memset call) to the memcpy calls seems to 
fix the problem.

This patch should be applied to 2.2.x and maybe 2.0.x. The code in 
trunk is different.

Cheers,
Stefan

Re: [PATCH] SIGBUS when compiled with gcc 4.3

Posted by Stefan Fritsch <sf...@sfritsch.de>.
Hi,

On Wednesday 23 July 2008, Joe Orton wrote:
> > when compiled with gcc 4.3 on Sparc under Linux, Apache 2.2.9
> > sometimes crashes with SIGBUS in the ssl shmcb code.
> >
> > Adding __attribute__((__noinline__)) (which is already present in
> > ssl_scache_shmcb.c for the memset call) to the memcpy calls seems
> > to fix the problem.
>
> Blech, thanks for tracking this down.  There is an outstanding PR
> that this happens with some Solaris compiler too, for which nobody
> has worked out a way to prevent inlining.
>
> So I'd be inclined to bite the bullet and backport the rewritten
> shmcb from the trunk, which should avoid these alignment issues
> forever more.
>
> Can you try the attached?

The new shmcb code works for me without SIGBUS, too. But I only have a 
test setup with no real users, and I haven't tested too much.

If you chose to backport the code, will you do it for 2.0, too? See
https://issues.apache.org/bugzilla/show_bug.cgi?id=43943
If not, you should at least add the __attribute__((__noinline__)) to 
2.0, IMHO.


Cheers,
Stefan

Re: [PATCH] SIGBUS when compiled with gcc 4.3

Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jul 21, 2008 at 11:50:58PM +0200, Stefan Fritsch wrote:
> Hi,
> 
> [I am resending this because the first mail did not get through. Sorry 
> if anyone gets this twice. Are non-subscriber addresses blocked from 
> posting?]

I believe they go into the moderator queue.

> when compiled with gcc 4.3 on Sparc under Linux, Apache 2.2.9 
> sometimes crashes with SIGBUS in the ssl shmcb code.
> 
> Adding __attribute__((__noinline__)) (which is already present in
> ssl_scache_shmcb.c for the memset call) to the memcpy calls seems to 
> fix the problem.

Blech, thanks for tracking this down.  There is an outstanding PR that 
this happens with some Solaris compiler too, for which nobody has worked 
out a way to prevent inlining.

So I'd be inclined to bite the bullet and backport the rewritten shmcb 
from the trunk, which should avoid these alignment issues forever more.

Can you try the attached?

Regards, Joe