NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: 11.0_BETA: glxinfo crashes with Segmentation fault
Using breakpoint on "atexit" I was able to find that it was really mesa
attaching callback:
$ gdb glxinfo
break main
Breakpoint 1 at 0x77c0: file
/usr/xsrc/external/mit/mesa-demos/dist/src/xdemos/glxinfo.c, line 1233.
+run
Starting program: /usr/X11R7/bin/glxinfo
Breakpoint 1, main (argc=1, argv=0x7f7fffa8d948) at
/usr/xsrc/external/mit/mesa-demos/dist/src/xdemos/glxinfo.c:1233
1233 {
+break atexit
Breakpoint 2 at 0x7e39c9673a30: file /usr/src/lib/libc/stdlib/atexit.c,
line 265.
+c
Continuing.
Breakpoint 2, atexit (func=func@entry=0x7e39c4901eb3 <one_time_fini>) at
/usr/src/lib/libc/stdlib/atexit.c:265
265 return (__cxa_atexit_internal((void (*)(void *))func, NULL, NULL));
+bt
#0 atexit (func=func@entry=0x7e39c4901eb3 <one_time_fini>) at
/usr/src/lib/libc/stdlib/atexit.c:265
#1 0x00007e39c40e49a3 in one_time_init () at
/usr/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c:295
#2 0x00007e39c9977711 in pthread_once
(once_control=once_control@entry=0x7e39c8414460 <init_once>,
routine=routine@entry=0x7e39c40e4940 <one_time_init>) at
/usr/src/lib/libpthread/pthread_once.c:66
#3 0x00007e39c40e4b54 in call_once (func=0x7e39c40e4940
<one_time_init>, flag=0x7e39c8414460 <init_once>) at
/usr/xsrc/external/mit/MesaLib/dist/include/c11/threads_posix.h:96
#4 0x00007e39c3eed98d in st_api_create_context (stapi=<optimized out>,
smapi=0x7e39c8ecd000, attribs=0x7f7fffa8d1c0, error=0x7f7fffa8d1bc,
shared_stctxi=0x0) at
/usr/xsrc/external/mit/MesaLib/dist/src/mesa/state_tracker/st_manager.c:904
#5 0x00007e39c3d2bf4b in dri_create_context (api=<optimized out>,
visual=0x7e39c8eb2b90, cPriv=0x7e39c8ef9d10, ctx_config=<optimized out>,
error=0x7f7fffa8d3cc, sharedContextPrivate=0x0) at
/usr/xsrc/external/mit/MesaLib/dist/src/gallium/frontends/dri/dri_context.c:163
#6 0x00007e39c3d361be in driCreateContextAttribs
(screen=0x7e39c90b1480, api=<optimized out>, config=0x7e39c8eb2b90,
shared=<optimized out>, num_attribs=<optimized out>, attribs=<optimized
out>, error=0x7f7fffa8d3cc, data=0x7e39c8fe01c0) at
/usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/common/dri_util.c:480
#7 0x00007e39c9af60a4 in drisw_create_context_attribs
(base=0x7e39c9072000, config_base=<optimized out>, shareList=<optimized
out>, num_attribs=<optimized out>, attribs=<optimized out>,
error=0x7f7fffa8d3cc) at
/usr/xsrc/external/mit/MesaLib/dist/src/glx/drisw_glx.c:576
#8 0x00007e39c9b0b686 in glXCreateContextAttribsARB
(dpy=0x7e39c90ee000, config=0x7e39c8e95e00, share_context=0x0, direct=1,
attrib_list=0x7f7fffa8d420) at
/usr/xsrc/external/mit/MesaLib/dist/src/glx/create_context.c:100
#9 0x00000000008211e9 in create_context_flags
(dpy=dpy@entry=0x7e39c90ee000, fbconfig=fbconfig@entry=0x7e39c8e95e00,
major=<optimized out>, minor=<optimized out>,
profileMask=profileMask@entry=1, direct=direct@entry=1, contextFlags=0)
at /usr/xsrc/external/mit/mesa-demos/dist/src/xdemos/glxinfo.c:232
#10 0x000000000082130c in create_context_with_config
(dpy=dpy@entry=0x7e39c90ee000, config=0x7e39c8e95e00,
coreProfile=coreProfile@entry=1, es2Profile=es2Profile@entry=0,
direct=1) at /usr/xsrc/external/mit/mesa-demos/dist/src/xdemos/glxinfo.c:277
#11 0x0000000000821a1f in print_screen_info
(dpy=dpy@entry=0x7e39c90ee000, scrnum=scrnum@entry=0,
opts=opts@entry=0x7f7fffa8d7c0, coreProfile=coreProfile@entry=1,
es2Profile=es2Profile@entry=0, limits=0, coreWorked=coreWorked@entry=0)
at /usr/xsrc/external/mit/mesa-demos/dist/src/xdemos/glxinfo.c:417
#12 0x0000000000822893 in main (argc=<optimized out>, argv=<optimized
out>) at /usr/xsrc/external/mit/mesa-demos/dist/src/xdemos/glxinfo.c:1259
+c
Continuing.
[New LWP 7528 of process 25527]
[New LWP 6688 of process 25527]
[New LWP 15735 of process 25527]
[New LWP 17184 of process 25527]
[New LWP 16615 of process 25527]
[New LWP 21922 of process 25527]
[New LWP 14682 of process 25527]
[New LWP 12563 of process 25527]
[New LWP 5603 of process 25527]
[New LWP 26192 of process 25527]
[New LWP 8473 of process 25527]
[New LWP 25176 of process 25527]
[New LWP 13168 of process 25527]
[New LWP 9353 of process 25527]
[New LWP 1480 of process 25527]
[New LWP 3116 of process 25527]
[New LWP 1440 of process 25527]
[LWP 13168 of process 25527 exited]
[LWP 3116 of process 25527 exited]
[LWP 9353 of process 25527 exited]
[LWP 8473 of process 25527 exited]
[LWP 25176 of process 25527 exited]
[LWP 5603 of process 25527 exited]
[LWP 1480 of process 25527 exited]
[LWP 26192 of process 25527 exited]
[LWP 6688 of process 25527 exited]
[LWP 7528 of process 25527 exited]
[LWP 17184 of process 25527 exited]
[LWP 15735 of process 25527 exited]
[LWP 16615 of process 25527 exited]
[LWP 21922 of process 25527 exited]
[LWP 12563 of process 25527 exited]
[LWP 14682 of process 25527 exited]
[LWP 1440 of process 25527 exited]
Thread 1 "" received signal SIGSEGV, Segmentation fault.
0x00007e39c4901eb3 in ?? ()
+q
Note that later invalid func address 0x00007e39c4901eb3 matches that one
from atexit(3) call: func=func@entry=0x7e39c4901eb3.
So I suspect that dynamically loaded mesa registers callback but it is
freed from memory on glxinfo exit time causing SIGSEGV
Regards
--Henryk Paluch
On 12/18/25 07:54, Henryk Paluch wrote:
Hello!
When I run just "glxinfo" on any machine (both virtual and bare metal)
on 11.0_BETA - it appears to work but crashes on exit with Signal 11:
$ uname -a
NetBSD nbsd-sgate350.example.com 11.0_BETA NetBSD 11.0_BETA (GENERIC)
#0: Sun Dec 14 14:19:17 UTC 2025 mkrepro@mkrepro.
NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
$ glxinfo
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
(lot of output)
0x388 32 tc 0 32 0 r y . 8 8 8 8 . s 0 32 0 0 0 0 0 0 0
None
[1] Segmentation fault (core dumped) glxinfo
What is even more puzzling that I'm unable to get decent stack-trace
(have installed all sets including debug).
$ gdb glxinfo glxinfo.core
Reading symbols from glxinfo...
Reading symbols from /usr/libdata/debug//usr/X11R7/bin/glxinfo.debug...
[New process 1979]
Core was generated by `glxinfo'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007b60f1d01eb3 in ?? ()
+bt
#0 0x00007b60f1d01eb3 in ?? ()
#1 0x00007b60f6b1795f in __cxa_finalize (dso=dso@entry=0x0) at /usr/
src/lib/libc/stdlib/atexit.c:222
#2 0x00007b60f6b1753b in exit (status=0) at /usr/src/lib/libc/stdlib/
exit.c:60
#3 0x0000000000b696d2 in ___start (cleanup=<optimized out>,
ps_strings=0x7f7fff6dcfe0) at /usr/src/lib/csu/common/crt0-common.c:375
#4 0x00007f7ff77f08a8 in ?? () from /usr/libexec/ld.elf_so
#5 0x0000000000000001 in ?? ()
#6 0x00007f7fff6dc120 in ?? ()
#7 0x0000000000000000 in ?? ()
+q
Exactly using this NetBSD release: https://nycdn.netbsd.org/pub/NetBSD-
daily/netbsd-11/20251214141917Z/images/NetBSD-11.0_BETA-amd64-dvd.iso
My questions:
1. anybody else experiencing same crash on 11.0_BETA? (Just run
"glxinfo" on your X11 session to test).
2. are there any hints how to get annotated stack trace from that crash?
Intuitively I suspect that this crash relates to Mesa libraries (because
plain X11 commands work without problem), but I'm currently out of ideas
how to find root cause.
Regards
--Henryk Paluch
Home |
Main Index |
Thread Index |
Old Index