What information could be usefull to debug a segfault in RtlTryEnterCriticalSection ? Since March beginning I have segfaults into programs that used to run before.
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 8192 (LWP 8925)] 0x400ba904 in RtlTryEnterCriticalSection (crit=0x40240570) at ../../include/winbase.h:1918 1918 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) ); (gdb) bt #0 0x400ba904 in RtlTryEnterCriticalSection (crit=0x40240570) at ../../include/winbase.h:1918 #1 0x4009355c in TryEnterCriticalSection (crit=0x40240570) at ../../memory/heap.c:814 #2 0x400b15f3 in __pthread_mutex_trylock (mutex=0x4212b180) at ../../scheduler/pthread.c:320 #3 0x42073999 in calloc () from /lib/i686/libc.so.6 #4 0x410c69e7 in s8790 () from /usr/X11R6/lib/modules/dri/fglrx_dri.so
(gdb) list - 1908 { 1909 DWORD ret; 1910 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) ); 1911 return ret; 1912 } 1913 1914 extern inline DWORD WINAPI GetCurrentThreadId(void); 1915 extern inline DWORD WINAPI GetCurrentThreadId(void) 1916 { 1917 DWORD ret; gdb) disass $pc-32 $pc+32 Dump of assembler code from 0x400ba8e4 to 0x400ba924: 0x400ba8e4 <RtlTryEnterCriticalSection+32>: or $0x74,%al 0x400ba8e6 <RtlTryEnterCriticalSection+34>: or %ecx,0x24348bc8(%ecx) 0x400ba8ec <RtlTryEnterCriticalSection+40>: leave 0x400ba8ed <RtlTryEnterCriticalSection+41>: ret $0x4 0x400ba8f0 <RtlTryEnterCriticalSection+44>: mov $0x1,%eax 0x400ba8f5 <RtlTryEnterCriticalSection+49>: lock xadd %eax,(%edx) 0x400ba8f9 <RtlTryEnterCriticalSection+53>: incl 0x8(%esi) 0x400ba8fc <RtlTryEnterCriticalSection+56>: mov $0x1,%ecx 0x400ba901 <RtlTryEnterCriticalSection+61>: jmp 0x400ba8e7 <RtlTryEnterCriticalSection+35> 0x400ba903 <RtlTryEnterCriticalSection+63>: nop 0x400ba904 <RtlTryEnterCriticalSection+64>: mov %fs:0x24,%eax 0x400ba90a <RtlTryEnterCriticalSection+70>: mov %eax,0xc(%esi) 0x400ba90d <RtlTryEnterCriticalSection+73>: movl $0x1,0x8(%esi) 0x400ba914 <RtlTryEnterCriticalSection+80>: jmp 0x400ba8fc <RtlTryEnterCriticalSection+56> 0x400ba916 <RtlTryEnterCriticalSection+82>: mov %esi,%esi 0x400ba918 <RtlLeaveCriticalSection>: push %ebp 0x400ba919 <RtlLeaveCriticalSection+1>: mov %esp,%ebp 0x400ba91b <RtlLeaveCriticalSection+3>: mov 0x8(%ebp),%ecx 0x400ba91e <RtlLeaveCriticalSection+6>: push %ebx 0x400ba91f <RtlLeaveCriticalSection+7>: mov 0x8(%ecx),%eax 0x400ba922 <RtlLeaveCriticalSection+10>: dec %eax 0x400ba923 <RtlLeaveCriticalSection+11>: call 0x400ba928 <RtlLeaveCriticalSection+16> End of assembler dump.
===== Sylvain Petreolle spetreolle@users.sourceforge.net Fight Spam ! EuroCauce: http://www.euro.cauce.org/en/index.html ICQ #170597259
"Don't think you are. Know you are." Morpheus, in "Matrix".
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Sylvain Petreolle wrote:
What information could be usefull to debug a segfault in RtlTryEnterCriticalSection ? Since March beginning I have segfaults into programs that used to run before.
could you check whether %fs is still a valid value ? (ie the one the thread got upon startup) A+
After doing tests, it seems fs is always set as fs 0xffff 65535 when it crashes. of course its a wrong/unitialized value ?
--- Eric Pouech eric.pouech@wanadoo.fr a écrit : > Sylvain Petreolle wrote:
What information could be usefull to debug a segfault in RtlTryEnterCriticalSection ? Since March beginning I have segfaults into programs that used to
run
before.
could you check whether %fs is still a valid value ? (ie the one the thread got upon startup) A+
-- Eric Pouech
===== Sylvain Petreolle spetreolle@users.sourceforge.net Fight Spam ! EuroCauce: http://www.euro.cauce.org/en/index.html ICQ #170597259
"Don't think you are. Know you are." Morpheus, in "Matrix".
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
fre, 2003-03-14 kl. 16:37 skrev Sylvain Petreolle:
After doing tests, it seems fs is always set as fs 0xffff 65535 when it crashes. of course its a wrong/unitialized value ?
No, it's an LDT entry used by the ATI FireGL drivers (see the backtrace in your original post). TransGaming has already tried to notify ATI about the problem and get them to not do this in their next driver release.