Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230953 - media-libs/mesa-7.1_rc1 causes bus error on sparc
Summary: media-libs/mesa-7.1_rc1 causes bus error on sparc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: High normal
Assignee: Gentoo X packagers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access 214156
  Show dependency tree
 
Reported: 2008-07-06 16:52 UTC by Friedrich Oslage (RETIRED)
Modified: 2023-05-08 17:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich Oslage (RETIRED) gentoo-dev 2008-07-06 16:52:55 UTC
With Load "glx" in xorg.conf, X dies silently on startup without giving an error message.

A gdb backtrace shows:

Program received signal SIGBUS, Bus error.
0xf64adf64 in driGetConfigAttribIndex (config=0x22c060, 
    index=<value optimized out>, value=0xffa76d78) at ../common/utils.c:840
840		*value = *(unsigned int *)

which means it tries to do an unaligned memory access(which isn't possible on sparc cpus) in src/mesa/drivers/dri/common/utils.c line 840 which is:

    default:
    *value = *(unsigned int *)
        ((char *) &config->modes + attribMap[index].offset);

    break;

Using Disable "glx" makes X work again
Comment 1 Ferris McCormick (RETIRED) gentoo-dev 2008-07-06 18:08:56 UTC
At one time, I had to force my CFLAGS to look like this for mesa:
 CFLAGS="-O2 -mcpu=ultrasparc3 -pipe -D__GLX_ALIGN64"
but for mesa-7.0.3, for example, this was no longer required.  I think that mesa has problems sometimes figuring out that it is on a system which requires alignment, however.  Try building it with
-D__GLX_ALIGN64
in the CFLAGS, and if that works, please report back here.  It is a regression in that case, and unfortunately in that case it's one which just won't seem to go away.
Comment 2 Friedrich Oslage (RETIRED) gentoo-dev 2008-07-06 19:01:12 UTC
> Try building it with -D__GLX_ALIGN64 in the CFLAGS

Didn't help, same error
Comment 3 Ferris McCormick (RETIRED) gentoo-dev 2008-07-06 20:45:43 UTC
(In reply to comment #2)
> > Try building it with -D__GLX_ALIGN64 in the CFLAGS
> 
> Didn't help, same error
> 

So mesa has found another way to inject data alignment problems into its code.  Nice.
Comment 4 Friedrich Oslage (RETIRED) gentoo-dev 2008-07-06 20:54:40 UTC
yeah, fortunately we still have some time left before they release 7.1 final :)

x11-team: should I report this upstream or will you do that?
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2008-07-06 22:11:11 UTC
(In reply to comment #4)
> yeah, fortunately we still have some time left before they release 7.1 final :)
> 
> x11-team: should I report this upstream or will you do that?

If you could, that would be great. I don't know anything about sparcs. Here's the place: https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa. I'm going to mark the bug upstream, so please post the URL here once you file a bug.
Comment 6 Friedrich Oslage (RETIRED) gentoo-dev 2008-07-06 23:02:49 UTC
adding upstream report for tracking
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2008-09-14 18:40:43 UTC
Someone just reported on bug #237648 that I had the logic reversed for assembly code on sparc. This could produce the problem you saw. Please try 7.2_rc1.
Comment 8 Friedrich Oslage (RETIRED) gentoo-dev 2008-09-14 19:19:45 UTC
It didn't cause the problem, the configure script ignores --enable-asm unless arch is ppc/x86/x86_64

If it's configured with --enable-asm on sparc the configure script says:
checking whether to enable assembly... no, platform not supported

But upstream fixed this bug in 7.1 final, so =media-libs/mesa-7.1 and =media-libs/mesa-7.2_rc1(just tested) are both fine :)
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2008-09-14 20:01:20 UTC
Cool.
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2008-09-14 20:01:31 UTC
Fixed in 7.1.