This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Need some help on a thread issue - is it application problem or cygthread or my installation


I have been working with an open source flight simulator in Cygwin and they 
changed some of the core graphics from plib and Openal to OpenSceneGraph.  OSG 
uses two other open source products Producer and OpenThreads

http://www.openscenegraph.org/osgwiki/pmwiki.php/KnowledgeBase/OpenThreads

and they are supposed to compile on Cygwin and in fact they do as well as on 
Mingw and others.  However when attempting to run the samples and demos for OSG 
I get the following error:

BrianK@atl-lt-5783 /usr/local/bin
$ gdb osgversion
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found)

(gdb) r
Starting program: /usr/local/bin/osgversion.exe
Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
Loaded symbols for /usr/local/bin/cygosg.dll
Loaded symbols for /usr/bin/cygwin1.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/glu32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/msvcrt.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/opengl32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/gdi32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/user32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/ddraw.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/dciman32.dll
Loaded symbols for /usr/local/bin/cygOpenThreads.dll
      4 [sig] osgversion 300 open_stackdumpfile: Dumping stack trace to 
osgversi
on.exe.stackdump
 989547 [sig] osgversion 300 C:\cygwin\usr\local\bin\osgversion.exe: *** fatal 
e
rror - called with threadlist_ix -1

Program exited with code 0400.
(gdb)

Now I saw a thread on the threadlist_ix -1 error in the archives that was 
reported in 4thQtr 2005 

http://sources.redhat.com/ml/cygwin/2005-10/msg00110.html

and I didn't seem to be able to find that a fix had been applied but.... I also 
couldn't find a final conclusion (or I overlooked - likely) as to was it app or 
cygthread and I am not sure it is relevant to this issue.  I did find where 
Pavel posted a test case and I compiled and ran it and it failed with the 
Threadlist_ix -1 error as well.

At any rate on this problem I saw it was using the OpenThreads so I compiled 
themin debug mode and they have to test examples and the first simplethreader 
works but the second called workcrew fails with the following gdb output:

BrianK@atl-lt-5783 /usr/src/OpenThreads/examples_src/workcrew/cygwin32.opt
$ gdb workcrew
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found)

(gdb) r 3
Starting program: 
/usr/src/OpenThreads/examples_src/workcrew/cygwin32.opt/workcr
ew.exe 3
Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
Loaded symbols for /usr/local/bin/cygOpenThreads.dll
Loaded symbols for /usr/bin/cygwin1.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll
FINAL RESULT: 40.000000
Error: Thread 0x10064d80 still running in destructor

Program received signal SIGILL, Illegal instruction.
[Switching to thread 1576.0xc7c]
0x61147ffc in _gm_ () from /usr/bin/cygwin1.dll
(gdb) bt
#0  0x61147ffc in _gm_ () from /usr/bin/cygwin1.dll
#1  0xffffffff in ?? ()
#2  0x00000001 in ?? ()
#3  0x10064e00 in ?? ()
#4  0x610af250 in pthread_key::_fixup_after_fork () from /usr/bin/cygwin1.dll
#5  0x5b580000 in ?? ()
#6  0x9066c35d in ?? ()
#7  0xffffb855 in ?? ()
#8  0xe589ffff in ?? ()
#9  0xb68dc35d in ?? ()
#10 0x00000000 in ?? ()
(gdb) c
Continuing.
Error: Thread 0x10064e88 still running in destructor

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 1576.0xd50]
0x10064f96 in ?? ()
(gdb) bt
#0  0x10064f96 in ?? ()
#1  0x10001014 in thread_cleanup_handler ()
   from /usr/local/bin/cygOpenThreads.dll
#2  0x610ae248 in pthread::pop_cleanup_handler () from /usr/bin/cygwin1.dll
#3  0x610ad691 in pthread::pop_all_cleanup_handlers ()
   from /usr/bin/cygwin1.dll
#4  0x610add1e in pthread::exit () from /usr/bin/cygwin1.dll
#5  0x610ad6ba in pthread::cancel_self () from /usr/bin/cygwin1.dll
#6  0x610ad713 in pthread::static_cancel_self () from /usr/bin/cygwin1.dll
#7  0x610ae7d5 in pthread_cond::wait () from /usr/bin/cygwin1.dll
#8  0x610b6280 in __pthread_cond_dowait () from /usr/bin/cygwin1.dll
#9  0x61092aa8 in _sigfe () from /usr/bin/cygwin1.dll
#10 0x10064b98 in ?? ()
#11 0x00000000 in ?? ()
(gdb) c
Continuing.
assertion "status == 0" failed: file "../PThreadCondition.c++", line 110
16584640 [unknown (0xC7C)] workcrew 1576 _cygtls::handle_exceptions: Exception:
STATUS_PRIVILEGED_INSTRUCTION
16596250 [unknown (0xC7C)] workcrew 1576 open_stackdumpfile: Dumping stack 
trace
 to workcrew.exe.stackdump
16584640 [unknown (0xC7C)] workcrew 1576 _cygtls::handle_exceptions: Exception:
STATUS_PRIVILEGED_INSTRUCTION
16584489 [unknown (0xD50)] workcrew 1576 _cygtls::handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
16723128 [unknown (0xD50)] workcrew 1576 _cygtls::handle_exceptions: Error 
while
 dumping state (probably corrupted stack)

Program received signal SIGSEGV, Segmentation fault.
0x10064f96 in ?? ()
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x10064f96 in ?? ()
(gdb) bt
#0  0x10064f96 in ?? ()
#1  0x10001014 in thread_cleanup_handler ()
   from /usr/local/bin/cygOpenThreads.dll
#2  0x610ae248 in pthread::pop_cleanup_handler () from /usr/bin/cygwin1.dll
#3  0x610ad691 in pthread::pop_all_cleanup_handlers ()
   from /usr/bin/cygwin1.dll
#4  0x610add1e in pthread::exit () from /usr/bin/cygwin1.dll
#5  0x610ad6ba in pthread::cancel_self () from /usr/bin/cygwin1.dll
#6  0x610ad713 in pthread::static_cancel_self () from /usr/bin/cygwin1.dll
#7  0x610ae7d5 in pthread_cond::wait () from /usr/bin/cygwin1.dll
#8  0x610b6280 in __pthread_cond_dowait () from /usr/bin/cygwin1.dll
#9  0x61092aa8 in _sigfe () from /usr/bin/cygwin1.dll
#10 0x10064b98 in ?? ()
#11 0x00000000 in ?? ()
(gdb) c
Continuing.
16945102 [sig] workcrew 1576 
C:\cygwin\usr\src\OpenThreads\examples_src\workcrew
\cygwin32.opt\workcrew.exe: *** fatal error - called with threadlist_ix -1
16933896 [unknown (0xC7C)] workcrew 1576 _cygtls::handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION

Program exited with code 0400.
(gdb) bt
No stack.
(gdb)

Is this enough to identify if it is a cygthread issue or an OpenThreads issue.  
My cygcheck output is attached and any and all assistance, advice or 
suggestions will be greatly appreciated.

bk


Attachment: cygcheck.log
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]