Freeze if boss-key (Shift-Esc) pressed while busy doing network stuff and game engine not running

Bug #568230 reported by Luke-Jr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Armagetron Advanced
New
High
Unassigned
Nominated for 0.4 by Luke-Jr
Mesa
Won't Fix
High
libsdl
Invalid
High

Bug Description

If I press Shift-Esc while Armagetron Advanced is in a network-only state (fetching server list, between rounds, etc), the game locks up until I manually kill it (SIGINT works)

--- Backtrace ---
#0 0x00007ffb139827c4 in __lll_lock_wait () from /lib/libpthread.so.0
#1 0x00007ffb1397e029 in _L_lock_534 () from /lib/libpthread.so.0
#2 0x00007ffb1397de3e in pthread_mutex_lock () from /lib/libpthread.so.0
#3 0x00007ffb12e029dd in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#4 0x00007ffb12e030b3 in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#5 0x00007ffb12e01825 in glXMakeCurrentReadSGI ()
   from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#6 0x00007ffb12996f04 in ?? () from /usr/lib/libSDL-1.2.so.0
#7 0x00007ffb1299acfe in ?? () from /usr/lib/libSDL-1.2.so.0
#8 0x00007ffb1299af17 in ?? () from /usr/lib/libSDL-1.2.so.0
#9 0x00007ffb1298b902 in SDL_VideoQuit () from /usr/lib/libSDL-1.2.so.0
#10 0x00007ffb1296516d in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#11 0x00007ffb129651ee in SDL_Quit () from /usr/lib/libSDL-1.2.so.0
#12 0x00007ffb12965a0f in ?? () from /usr/lib/libSDL-1.2.so.0
#13 <signal handler called>
#14 0x00007ffb0dc18540 in radeonFlush () from /usr/lib64/dri/r300_dri.so
#15 0x00007ffb0dc0e028 in ?? () from /usr/lib64/dri/r300_dri.so
#16 0x00007ffb0dc91cc4 in _mesa_reference_texobj ()
   from /usr/lib64/dri/r300_dri.so
#17 0x00007ffb0dc947eb in _mesa_free_texture_data ()
   from /usr/lib64/dri/r300_dri.so
#18 0x00007ffb0dc31938 in _mesa_free_context_data ()
   from /usr/lib64/dri/r300_dri.so
#19 0x00007ffb0dc31a5e in _mesa_destroy_context ()
   from /usr/lib64/dri/r300_dri.so
#20 0x00007ffb0dc175fd in radeonDestroyContext ()
   from /usr/lib64/dri/r300_dri.so
#21 0x00007ffb0dbf40f0 in ?? () from /usr/lib64/dri/r300_dri.so
#22 0x00007ffb12e2429f in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#23 0x00007ffb12e001a8 in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#24 0x00007ffb12996f22 in ?? () from /usr/lib/libSDL-1.2.so.0
#25 0x00007ffb1299acfe in ?? () from /usr/lib/libSDL-1.2.so.0
#26 0x00007ffb1299af17 in ?? () from /usr/lib/libSDL-1.2.so.0
#27 0x00007ffb1298b902 in SDL_VideoQuit () from /usr/lib/libSDL-1.2.so.0
#28 0x00007ffb1296516d in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#29 0x000000000042a1e9 in main ()

Video card: ATi Radeon X850 AGP

--- Software versions (Gentoo) ---
Armagetron Advanced trunk: bzr co lp:armagetronad -r 968
sys-libs/glibc-2.10.1-r1 (libpthread)
media-libs/mesa-7.7.1 (libGL, r300_dri)
media-libs/libsdl-1.2.13-r1 (libSDL)
x11-base/xorg-server-1.7.6

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Looks like Armagetron Advanced or SDL is doing crazy stuff from a signal handler...

Revision history for this message
Luke-Jr (luke-jr) wrote :

If I press Shift-Esc while Armagetron Advanced is in a network-only state (fetching server list, between rounds, etc), the game locks up until I manually kill it (SIGINT works)

--- Backtrace ---
#0 0x00007ffb139827c4 in __lll_lock_wait () from /lib/libpthread.so.0
#1 0x00007ffb1397e029 in _L_lock_534 () from /lib/libpthread.so.0
#2 0x00007ffb1397de3e in pthread_mutex_lock () from /lib/libpthread.so.0
#3 0x00007ffb12e029dd in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#4 0x00007ffb12e030b3 in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#5 0x00007ffb12e01825 in glXMakeCurrentReadSGI ()
   from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#6 0x00007ffb12996f04 in ?? () from /usr/lib/libSDL-1.2.so.0
#7 0x00007ffb1299acfe in ?? () from /usr/lib/libSDL-1.2.so.0
#8 0x00007ffb1299af17 in ?? () from /usr/lib/libSDL-1.2.so.0
#9 0x00007ffb1298b902 in SDL_VideoQuit () from /usr/lib/libSDL-1.2.so.0
#10 0x00007ffb1296516d in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#11 0x00007ffb129651ee in SDL_Quit () from /usr/lib/libSDL-1.2.so.0
#12 0x00007ffb12965a0f in ?? () from /usr/lib/libSDL-1.2.so.0
#13 <signal handler called>
#14 0x00007ffb0dc18540 in radeonFlush () from /usr/lib64/dri/r300_dri.so
#15 0x00007ffb0dc0e028 in ?? () from /usr/lib64/dri/r300_dri.so
#16 0x00007ffb0dc91cc4 in _mesa_reference_texobj ()
   from /usr/lib64/dri/r300_dri.so
#17 0x00007ffb0dc947eb in _mesa_free_texture_data ()
   from /usr/lib64/dri/r300_dri.so
#18 0x00007ffb0dc31938 in _mesa_free_context_data ()
   from /usr/lib64/dri/r300_dri.so
#19 0x00007ffb0dc31a5e in _mesa_destroy_context ()
   from /usr/lib64/dri/r300_dri.so
#20 0x00007ffb0dc175fd in radeonDestroyContext ()
   from /usr/lib64/dri/r300_dri.so
#21 0x00007ffb0dbf40f0 in ?? () from /usr/lib64/dri/r300_dri.so
#22 0x00007ffb12e2429f in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#23 0x00007ffb12e001a8 in ?? () from //usr/lib64/opengl/xorg-x11/lib/libGL.so.1
#24 0x00007ffb12996f22 in ?? () from /usr/lib/libSDL-1.2.so.0
#25 0x00007ffb1299acfe in ?? () from /usr/lib/libSDL-1.2.so.0
#26 0x00007ffb1299af17 in ?? () from /usr/lib/libSDL-1.2.so.0
#27 0x00007ffb1298b902 in SDL_VideoQuit () from /usr/lib/libSDL-1.2.so.0
#28 0x00007ffb1296516d in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#29 0x000000000042a1e9 in main ()

Video card: ATi Radeon X850 AGP

--- Software versions (Gentoo) ---
Armagetron Advanced trunk: bzr co lp:armagetronad -r 968
sys-libs/glibc-2.10.1-r1 (libpthread)
media-libs/mesa-7.7.1 (libGL, r300_dri)
media-libs/libsdl-1.2.13-r1 (libSDL)
x11-base/xorg-server-1.7.6

Revision history for this message
Luke-Jr (luke-jr) wrote :
Revision history for this message
In , Luke-jr+freedesktop (luke-jr+freedesktop) wrote :

My uneducated guess is that radeonFlush is triggering a SIGSEGV and libSDL is trying to shutdown sanely as a result, which creates a loop since the radeonFlush is already in the shutdown procedure.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Can you get another backtrace showing what signal it is, with debugging symbols for at least r300_dri.so?

Revision history for this message
In , Luke-jr+freedesktop (luke-jr+freedesktop) wrote :

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1d2fd79 in radeonFlush (ctx=0xbe72e0) at radeon_common.c:1107
1107 if ((ctx->DrawBuffer->Name == 0) && radeon->front_buffer_dirty) {
(gdb) bt
#0 0x00007ffff1d2fd79 in radeonFlush (ctx=0xbe72e0) at radeon_common.c:1107
#1 0x00007ffff1d20ae5 in radeon_firevertices (radeon=0xbe0a60) at radeon_cmdbuf.h:118
#2 0x00007ffff1d20a10 in r300DeleteTexture (ctx=0xbe72e0, texObj=0x12404d0)
    at r300_tex.c:262
#3 0x00007ffff1de3559 in _mesa_reference_texobj (ptr=0xbf2930, tex=0x0)
    at main/texobj.c:345
#4 0x00007ffff1de8963 in _mesa_free_texture_data (ctx=0xbe72e0) at main/texstate.c:788
#5 0x00007ffff1d511c5 in _mesa_free_context_data (ctx=0xbe72e0) at main/context.c:972
#6 0x00007ffff1d5137c in _mesa_destroy_context (ctx=0xbe72e0) at main/context.c:1028
#7 0x00007ffff1d2c0d7 in radeonDestroyContext (driContextPriv=0xbd6450)
    at radeon_common_context.c:328
#8 0x00007ffff1cfcf1d in driDestroyContext (pcp=0xbd6450) at ../common/dri_util.c:546
#9 0x00007ffff703f8c6 in driDestroyContext (context=0xb83290, psc=0xbd5fc0,
    dpy=0xa8ac10) at dri_glx.c:482
#10 0x00007ffff7007810 in DestroyContext (dpy=0xa8ac10, gc=0xbe08b0) at glxcmds.c:556
#11 0x00007ffff70079b0 in glXDestroyContext (dpy=0xa8ac10, gc=0xbe08b0) at glxcmds.c:592
#12 0x00007ffff6b9df22 in ?? () from /usr/lib/libSDL-1.2.so.0
#13 0x00007ffff6ba1cfe in ?? () from /usr/lib/libSDL-1.2.so.0
#14 0x00007ffff6ba1f17 in ?? () from /usr/lib/libSDL-1.2.so.0
#15 0x00007ffff6b92902 in SDL_VideoQuit () from /usr/lib/libSDL-1.2.so.0
#16 0x00007ffff6b6c16d in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#17 0x000000000042a1e9 in main ()

Revision history for this message
In , Luke-jr+freedesktop (luke-jr+freedesktop) wrote :

       1107 if ((ctx->DrawBuffer->Name == 0) && radeon->front_buffer_dirty) {
- 0x7f3f1063ad6e <radeonFlush+217>: mov -0x28(%rbp),%rax
- 0x7f3f1063ad72 <radeonFlush+221>: mov 0xf8(%rax),%rax
SEGV>- 0x7f3f1063ad79 <radeonFlush+228>: mov 0x28(%rax),%eax
- 0x7f3f1063ad7c <radeonFlush+231>: test %eax,%eax
- 0x7f3f1063ad7e <radeonFlush+233>: jne 0x7f3f1063ae25 <radeonFlush+400>
- 0x7f3f1063ad84 <radeonFlush+239>: mov -0x18(%rbp),%rax
- 0x7f3f1063ad88 <radeonFlush+243>: movzbl 0x552(%rax),%eax
- 0x7f3f1063ad8f <radeonFlush+250>: test %al,%al
- 0x7f3f1063ad91 <radeonFlush+252>: je 0x7f3f1063ae25 <radeonFlush+400>

Revision history for this message
In , Luke-jr+freedesktop (luke-jr+freedesktop) wrote :

ctx->DrawBuffer is a NULL pointer

Revision history for this message
Manuel Moos (z-man) wrote :

Looks like a bug from within MESA or the driver to me; the only mutexes we use are for the sound, and I think a global one here and there which would have locked up earlier. The recording doesn't freeze for me.

Changed in mesa:
importance: Unknown → High
status: Unknown → Confirmed
Changed in mesa:
importance: High → Unknown
Changed in mesa:
importance: Unknown → High
Changed in libsdl:
importance: Unknown → High
status: Unknown → Invalid
Revision history for this message
In , Andreas-boll-dev (andreas-boll-dev) wrote :

The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component Drivers/Gallium/r300

Thanks.

Changed in mesa:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.