- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using a multithreaded application on the following configuration and persistently getting a SEGV in the pthread_exit () system call. (stack below). The SEGV disappears when a lower optimization level "-O1" is used,
but is seen with the default optimization level "-O"
OS : Linux 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux
Compiler : Intel C++ Compiler for applications running on Intel 64, Version 10.0 Build 20070426 Package ID: l_cc_p_10.0.023
Compiler flags used :
icpc -I. -I../h -I../sl -I../om/h -I../sm/h -Ichk/ -O -c -D_REENTRANT -DVS_USE_64_CALLS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fpic -Wp64 -Wall -nolib_inline -gcc-version=343 -fno-fnalias -static-libcxa
Stack :
==========
[New Thread 1074538848 (LWP 14545)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074538848 (zombie)]
0x00000039ea005156 in _Unwind_GetRegionStart () from /lib64/libgcc_s.so.1
(gdb) where
#0 0x00000039ea005156 in _Unwind_GetRegionStart () from /lib64/libgcc_s.so.1
#1 0x00000039ea005c64 in _Unwind_FindEnclosingFunction () from /lib64/libgcc_s.so.1
#2 0x00000039ea006827 in _Unwind_RaiseException () from /lib64/libgcc_s.so.1
#3 0x00000039ea00691c in _Unwind_ForcedUnwind () from /lib64/libgcc_s.so.1
#4 0x00000039e8a0ac70 in __pthread_unwind () from /lib64/tls/libpthread.so.0
#5 0x00000039e8a06e65 in pthread_exit () from /lib64/tls/libpthread.so.0
#6 0x00000000006dadfc in vs_thrExit ()
#7 0x000000000040c889 in obe_thread ()
#8 0x00000039e8a0613a in start_thread () from /lib64/tls/libpthread.so.0
#9 0x00000039e81c52b3 in clone () from /lib64/tls/libc.so.6
#10 0x0000000000000000 in ?? ()
==========
What could be the potential reasons for the SEGV to come in the func. "_Unwind_GetRegionStart"? Are there any compiler flags that could be of use?
Any pointers would be helpful.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the suggestions. We are using pthreads in our code. I gave a shot by :
1. Adding -fno-inline-functions AND
2. Removing -fno-fnalias .. without luck though.
Finally one compiler option worked for us : ie: "-fno-exceptions"
This disables the exception handling in a C code by the compiler. By default this option was getting turned ON in our case becasue of usinga C++ compiler on a C code. However, no exception handling was warranted in the C source code so disabling this option, (which the compiler would have anyways done for a C code) resolved the pthread_unwind SEGV.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page