From: Charl P. B. <c.p...@it...> - 2003-02-20 23:25:59
|
Dear lists, I have attached a slightly modified glthreads.c: I have modified it so that selecting one of its windows and pressing any key will destroy the associated glx context and subsequently that X window. This destruction yields, in a very random fashion, one of the three following symptoms on my Radeon M7 (7500 Mobility) laptop running 4.2.99.902: 1. The longstanding "radeon_vtxfmt.c:1057: radeonVtxfmtUnbindContext: Assertion vb.context == ctx' failed." assertion error. 2. The infamous drmRadeonCmdBuffer: -22 and then program exit. I am more concerned about this symptom, because I'm seeing it with a real application that I'm developing when destroying one of its multiple glx contexts. This is why I modified glthreads.c in the first place. 3. A good old segfault: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1026 (LWP 712)] 0x404dd042 in _swrast_InvalidateState () from /usr/X11R6/lib/modules/dri/radeon_dri.so (gdb) bt #0 0x404dd042 in _swrast_InvalidateState () from /usr/X11R6/lib/modules/dri/radeon_dri.so #1 0x4058b6ac in radeonInvalidateState () from /usr/X11R6/lib/modules/dri/radeon_dri.so #2 0x404a6edd in _mesa_update_state () from /usr/X11R6/lib/modules/dri/radeon_dri.so #3 0x4045e0e0 in _mesa_Clear () from /usr/X11R6/lib/modules/dri/radeon_dri.so #4 0x401132f5 in _ts_Clear () from /usr/X11R6/lib/libGL.so.1 #5 0x08049275 in draw_loop () #6 0x0804995a in thread_function () #7 0x40337fa5 in pthread_start_thread () from /lib/libpthread.so.0 #8 0x40337fed in pthread_start_thread_event () from /lib/libpthread.so.0 4. X lockup: the mouse moves but can't interact with anything onscreen. The keyboard is dead. If you keep on running glthreads with e.g. glthreads -n 3 and destroying a single context, you should see each of these 4 symptoms at some or other stage. It would be wonderful if someone with deeper knowledge of the dark Radeon driver interior could have a look at this. Compile the attached code with: gcc -I../include -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE \ -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include glthreads.c \ -L/usr/X11R6/lib -lglut -lGLU -lGL -lm -o glthreads Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ |