Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2019-10-05 Thread Thorsten Glaser
Hi Sven,

>That has apparently helped, but I have just re-enabled asm in git[1],
>since the bug is supposed to be fixed since Mesa 17.0.0.
>
>@Thorsten: would be great if you could test that this actually works.

sure, thanks for informing me. Upgrading was a bit of a hassle due to
Multi-Arch but I’ve managed to persuade apt and dpkg ☻

It built fine (log attached) and works in xrdp (I’m currently at home
and could test only remotely).

In xrdp+xorgxrdp, glxgears’ performance shrinks from ~280 fps with
mesa 18.3.6-2 to ~275 fps with git master. That’s less than 2% and
probably partially due to the major version bump so I’d not count
it as a loss.

I can test this on the native nouveau hardware on Monday.

bye,
//mirabilos

PS: Do check the build log, especially lintian at the end… ☻☺
-- 
 den AGP stecker anfeilen, damit er in den slot aufm 440BX board passt…
oder netzteile, an die man auch den monitor angeschlossen hat und die dann für
ein elektrisch aufgeladenes gehäuse gesorgt haben […] für lacher gut auf jeder
LAN party │  damals, als der pizzateig noch auf dem monior "gegangen" ist

mesa_19.2.0-2_x32.build.xz
Description: Binary data


Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2019-10-05 Thread Sven Joachim
On 2016-12-15 18:19 +0100, Andreas Boll wrote:

> Control: tags -1 moreinfo
>
> On Thu, Aug 14, 2014 at 08:19:54AM -0400, Daniel Schepler wrote:
>> On Thu, Aug 14, 2014 at 4:46 AM, Thorsten Glaser  wrote:
>> > Package: libgl1-mesa-glx
>> > Version: 10.2.5-1
>> > Severity: normal
>> >
>> > Hi!
>> >
>> > After crossgrading from i386 to x32, OpenGL applications crash.
>> >
>> > glxgears from mesa-utils:i386 (8.2.0-1) works, but
>> > glxgears from mesa-utils:x32 (8.2.0-1) fails:
>> >
>> > Program received signal SIGSEGV, Segmentation fault.
>> > 0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
>> > (gdb) bt
>> > #0  0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
>> > #1  0x0040146f in ?? ()
>> > #2  0xf6aceeea in __libc_start_main (main=, argc=1, 
>> > argv=,
>> > init=, fini=, rtld_fini=, 
>> > stack_end=0xd448)
>> > at libc-start.c:287
>> > #3  0x00401cfc in ?? ()
>> >
>> > I've first noticed that in "xlock -nolock -mode cage",
>> > which, with debugging information, has:
>> >
>> > Program terminated with signal SIGSEGV, Segmentation fault.
>> > #0  0xf6af524b in glGetBooleanv () from 
>> > /usr/lib/x86_64-linux-gnux32/libGL.so.1
>> > (gdb) bt
>> > #0  0xf6af524b in glGetBooleanv () from 
>> > /usr/lib/x86_64-linux-gnux32/libGL.so.1
>> > #1  0x0040fcfe in init_GL (mi=mi@entry=0x228bde0) at visgl.c:287
>> > #2  0x004dc6d4 in init_cage (mi=) at cage.c:400
>> > #3  0x0040e462 in call_init_hook (ls=0x823340 , 
>> > mi=) at mode.c:1290
>> > #4  0x0040887c in justDisplay (display=0x226e870) at xlock.c:2821
>> > #5  0x0040764f in main (argc=36104304, argv=0x0) at xlock.c:3998
>> >
>> > Bugs occur in (first glxgears, then xlock):
>> >
>> > (gdb) disas
>> > Dump of assembler code for function glLightfv:
>> >0xf76db600 <+0>: movrax,QWORD PTR [rip+0x21b9f1]# 
>> > 0xf78f6ff8
>> >0xf76db607 <+7>: movr11,QWORD PTR fs:[rax]
>> > => 0xf76db60b <+11>:jmpQWORD PTR [r11+0x500]
>> >
>> > (gdb) disas
>> > Dump of assembler code for function glGetBooleanv:
>> >0xf6af5240 <+0>: movrax,QWORD PTR [rip+0x21adb1]# 
>> > 0xf6d0fff8
>> >0xf6af5247 <+7>: movr11,QWORD PTR fs:[rax]
>> > => 0xf6af524b <+11>:jmpQWORD PTR [r11+0x810]
>> >
>> > So this appears to be an indirect function call both times.
>>
>> Always before, when I needed to hand-patch the mesa sources to get a
>> custom build, I would disable the x86_64 assembly altogether.  It
>> would appear that some more porting of the assembly to x32 is needed
>> before it's safe to use.  In this case, my guess would be that the
>> assembly is indexing into an array of function pointers, which on x32
>> would need to be adjusted to jmpl *(4*index, %reg) or maybe addr32 jmp
>> *(4*index, %{reg}d) instead of jmpq *(8*index, %reg).
>> --
>> Daniel Schepler
>
> Could you retest with mesa 13.0.2-3 from sid?
> I've disabled assembly usage on x32.

That has apparently helped, but I have just re-enabled asm in git[1],
since the bug is supposed to be fixed since Mesa 17.0.0.

@Thorsten: would be great if you could test that this actually works.

Cheers,
   Sven


1. 
https://salsa.debian.org/xorg-team/lib/mesa/commit/69d86fe6c8b1c73ddb652e6a404ec87926857939



Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2016-12-15 Thread Andreas Boll
Control: tags -1 moreinfo

On Thu, Aug 14, 2014 at 08:19:54AM -0400, Daniel Schepler wrote:
> On Thu, Aug 14, 2014 at 4:46 AM, Thorsten Glaser  wrote:
> > Package: libgl1-mesa-glx
> > Version: 10.2.5-1
> > Severity: normal
> >
> > Hi!
> >
> > After crossgrading from i386 to x32, OpenGL applications crash.
> >
> > glxgears from mesa-utils:i386 (8.2.0-1) works, but
> > glxgears from mesa-utils:x32 (8.2.0-1) fails:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
> > (gdb) bt
> > #0  0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
> > #1  0x0040146f in ?? ()
> > #2  0xf6aceeea in __libc_start_main (main=, argc=1, 
> > argv=,
> > init=, fini=, rtld_fini=, 
> > stack_end=0xd448)
> > at libc-start.c:287
> > #3  0x00401cfc in ?? ()
> >
> > I've first noticed that in "xlock -nolock -mode cage",
> > which, with debugging information, has:
> >
> > Program terminated with signal SIGSEGV, Segmentation fault.
> > #0  0xf6af524b in glGetBooleanv () from 
> > /usr/lib/x86_64-linux-gnux32/libGL.so.1
> > (gdb) bt
> > #0  0xf6af524b in glGetBooleanv () from 
> > /usr/lib/x86_64-linux-gnux32/libGL.so.1
> > #1  0x0040fcfe in init_GL (mi=mi@entry=0x228bde0) at visgl.c:287
> > #2  0x004dc6d4 in init_cage (mi=) at cage.c:400
> > #3  0x0040e462 in call_init_hook (ls=0x823340 , 
> > mi=) at mode.c:1290
> > #4  0x0040887c in justDisplay (display=0x226e870) at xlock.c:2821
> > #5  0x0040764f in main (argc=36104304, argv=0x0) at xlock.c:3998
> >
> > Bugs occur in (first glxgears, then xlock):
> >
> > (gdb) disas
> > Dump of assembler code for function glLightfv:
> >0xf76db600 <+0>: movrax,QWORD PTR [rip+0x21b9f1]# 
> > 0xf78f6ff8
> >0xf76db607 <+7>: movr11,QWORD PTR fs:[rax]
> > => 0xf76db60b <+11>:jmpQWORD PTR [r11+0x500]
> >
> > (gdb) disas
> > Dump of assembler code for function glGetBooleanv:
> >0xf6af5240 <+0>: movrax,QWORD PTR [rip+0x21adb1]# 
> > 0xf6d0fff8
> >0xf6af5247 <+7>: movr11,QWORD PTR fs:[rax]
> > => 0xf6af524b <+11>:jmpQWORD PTR [r11+0x810]
> >
> > So this appears to be an indirect function call both times.
> 
> Always before, when I needed to hand-patch the mesa sources to get a
> custom build, I would disable the x86_64 assembly altogether.  It
> would appear that some more porting of the assembly to x32 is needed
> before it's safe to use.  In this case, my guess would be that the
> assembly is indexing into an array of function pointers, which on x32
> would need to be adjusted to jmpl *(4*index, %reg) or maybe addr32 jmp
> *(4*index, %{reg}d) instead of jmpq *(8*index, %reg).
> -- 
> Daniel Schepler

Could you retest with mesa 13.0.2-3 from sid?
I've disabled assembly usage on x32.

Thanks,
Andreas


signature.asc
Description: Digital signature


Processed: Re: Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2016-12-15 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 moreinfo
Bug #758094 [libgl1-mesa-glx] libgl1-mesa-glx:x32: SIGSEGV in OpenGL 
applications on x32
Added tag(s) moreinfo.

-- 
758094: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758094
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2016-03-19 Thread EoD
By looking at the bug report, it seems to be identical to the one
reported upstream https://bugs.freedesktop.org/show_bug.cgi?id=94512

Does disabling glx-tls help?



Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2014-08-14 Thread Thorsten Glaser
Package: libgl1-mesa-glx
Version: 10.2.5-1
Severity: normal

Hi!

After crossgrading from i386 to x32, OpenGL applications crash.

glxgears from mesa-utils:i386 (8.2.0-1) works, but
glxgears from mesa-utils:x32 (8.2.0-1) fails:

Program received signal SIGSEGV, Segmentation fault.
0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
(gdb) bt
#0  0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
#1  0x0040146f in ?? ()
#2  0xf6aceeea in __libc_start_main (main=optimized out, argc=1, 
argv=optimized out,
init=optimized out, fini=optimized out, rtld_fini=optimized out, 
stack_end=0xd448)
at libc-start.c:287
#3  0x00401cfc in ?? ()

I’ve first noticed that in “xlock -nolock -mode cage”,
which, with debugging information, has:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf6af524b in glGetBooleanv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
(gdb) bt
#0  0xf6af524b in glGetBooleanv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
#1  0x0040fcfe in init_GL (mi=mi@entry=0x228bde0) at visgl.c:287
#2  0x004dc6d4 in init_cage (mi=optimized out) at cage.c:400
#3  0x0040e462 in call_init_hook (ls=0x823340 LockProcs+1152, mi=optimized 
out) at mode.c:1290
#4  0x0040887c in justDisplay (display=0x226e870) at xlock.c:2821
#5  0x0040764f in main (argc=36104304, argv=0x0) at xlock.c:3998

Bugs occur in (first glxgears, then xlock):

(gdb) disas
Dump of assembler code for function glLightfv:
   0xf76db600 +0: movrax,QWORD PTR [rip+0x21b9f1]# 0xf78f6ff8
   0xf76db607 +7: movr11,QWORD PTR fs:[rax]
= 0xf76db60b +11:jmpQWORD PTR [r11+0x500]

(gdb) disas
Dump of assembler code for function glGetBooleanv:
   0xf6af5240 +0: movrax,QWORD PTR [rip+0x21adb1]# 0xf6d0fff8
   0xf6af5247 +7: movr11,QWORD PTR fs:[rax]
= 0xf6af524b +11:jmpQWORD PTR [r11+0x810]

So this appears to be an indirect function call both times.


-- System Information:
Debian Release: jessie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh

Versions of packages libgl1-mesa-glx:x32 depends on:
ii  libc6  2.19-7
ii  libdrm22.4.56-1
ii  libglapi-mesa  10.2.5-1
ii  libudev1   208-7
ii  libx11-6   2:1.6.2-2
ii  libx11-xcb12:1.6.2-2
ii  libxcb-dri2-0  1.10-3
ii  libxcb-dri3-0  1.10-3
ii  libxcb-glx01.10-3
ii  libxcb-present01.10-3
ii  libxcb-sync1   1.10-3
ii  libxcb11.10-3
ii  libxdamage11:1.1.4-2
ii  libxext6   2:1.3.2-1
ii  libxfixes3 1:5.0.1-2
ii  libxshmfence1  1.1-3
ii  libxxf86vm11:1.1.3-1
ii  multiarch-support  2.19-7

Versions of packages libgl1-mesa-glx:x32 recommends:
ii  libgl1-mesa-dri  10.2.5-1

libgl1-mesa-glx:x32 suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20140814084614.7433.79110.report...@tglase.lan.tarent.de



Bug#758094: libgl1-mesa-glx:x32: SIGSEGV in OpenGL applications on x32

2014-08-14 Thread Daniel Schepler
On Thu, Aug 14, 2014 at 4:46 AM, Thorsten Glaser t...@mirbsd.de wrote:
 Package: libgl1-mesa-glx
 Version: 10.2.5-1
 Severity: normal

 Hi!

 After crossgrading from i386 to x32, OpenGL applications crash.

 glxgears from mesa-utils:i386 (8.2.0-1) works, but
 glxgears from mesa-utils:x32 (8.2.0-1) fails:

 Program received signal SIGSEGV, Segmentation fault.
 0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
 (gdb) bt
 #0  0xf76db60b in glLightfv () from /usr/lib/x86_64-linux-gnux32/libGL.so.1
 #1  0x0040146f in ?? ()
 #2  0xf6aceeea in __libc_start_main (main=optimized out, argc=1, 
 argv=optimized out,
 init=optimized out, fini=optimized out, rtld_fini=optimized out, 
 stack_end=0xd448)
 at libc-start.c:287
 #3  0x00401cfc in ?? ()

 I've first noticed that in xlock -nolock -mode cage,
 which, with debugging information, has:

 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0xf6af524b in glGetBooleanv () from 
 /usr/lib/x86_64-linux-gnux32/libGL.so.1
 (gdb) bt
 #0  0xf6af524b in glGetBooleanv () from 
 /usr/lib/x86_64-linux-gnux32/libGL.so.1
 #1  0x0040fcfe in init_GL (mi=mi@entry=0x228bde0) at visgl.c:287
 #2  0x004dc6d4 in init_cage (mi=optimized out) at cage.c:400
 #3  0x0040e462 in call_init_hook (ls=0x823340 LockProcs+1152, mi=optimized 
 out) at mode.c:1290
 #4  0x0040887c in justDisplay (display=0x226e870) at xlock.c:2821
 #5  0x0040764f in main (argc=36104304, argv=0x0) at xlock.c:3998

 Bugs occur in (first glxgears, then xlock):

 (gdb) disas
 Dump of assembler code for function glLightfv:
0xf76db600 +0: movrax,QWORD PTR [rip+0x21b9f1]# 
 0xf78f6ff8
0xf76db607 +7: movr11,QWORD PTR fs:[rax]
 = 0xf76db60b +11:jmpQWORD PTR [r11+0x500]

 (gdb) disas
 Dump of assembler code for function glGetBooleanv:
0xf6af5240 +0: movrax,QWORD PTR [rip+0x21adb1]# 
 0xf6d0fff8
0xf6af5247 +7: movr11,QWORD PTR fs:[rax]
 = 0xf6af524b +11:jmpQWORD PTR [r11+0x810]

 So this appears to be an indirect function call both times.

Always before, when I needed to hand-patch the mesa sources to get a
custom build, I would disable the x86_64 assembly altogether.  It
would appear that some more porting of the assembly to x32 is needed
before it's safe to use.  In this case, my guess would be that the
assembly is indexing into an array of function pointers, which on x32
would need to be adjusted to jmpl *(4*index, %reg) or maybe addr32 jmp
*(4*index, %{reg}d) instead of jmpq *(8*index, %reg).
-- 
Daniel Schepler


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cadf0c45t28tr5pmpqtshvphhmlo3dfzae1th7sfqtwhwvwa...@mail.gmail.com