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]

Re: Strange crash for application linked to cygwin libraries.


Peter Ross writes:
> >> >> I've written an application which does some initialization and then
> >> >> does a tcp accept.  5 minutes and 20 seconds give or take after doing
> >> >> the tcp.accept the application aborts with exit code 0.  If I
> >> >> continually send tcp data to this application then the crash doesn't
> >> >> occur, it is only after 5 minutes and 20 seconds of waiting for I/O.
> >> > [...]
> >> >> Here is the complete list of libraries that I use  -lodbc32 -lole32
> >> >> -lraptor -lxslt -lcurl -lz -lxml2 -ldb -lssl -lcrypto -lexpat
> >> >> -lwsock32
[...]
> Find attached.

Thank you.  I don't see anything obvious in the cygcheck -svr output that's out 
of the ordinary.  Rats.

> > Are all of those libraries you're linking with compiled for Cygwin?  Mixing
> > Cygwin libs with non-Cygwin libs won't work.
> >
> Yes they are all cygwin libraries.
[...]
> $ cygcheck.exe ./wos_server.exe
> .\wos_server.exe
>   C:\cygwin\bin\cygcrypto-0.9.8.dll
>     C:\cygwin\bin\cygwin1.dll
>       C:\WINDOWS\system32\ADVAPI32.DLL
>         C:\WINDOWS\system32\ntdll.dll
>         C:\WINDOWS\system32\KERNEL32.dll
>         C:\WINDOWS\system32\RPCRT4.dll
>           C:\WINDOWS\system32\Secur32.dll
>   C:\cygwin\bin\cygcurl-4.dll
>     C:\cygwin\bin\cygssh2-1.dll
>       C:\cygwin\bin\cygz.dll
>     C:\cygwin\bin\cygssl-0.9.8.dll
>   C:\cygwin\bin\cygdb-4.5.dll
>   C:\cygwin\bin\cygexpat-1.dll
>   C:\cygwin\bin\cygxml2-2.dll
>     C:\cygwin\bin\cygiconv-2.dll
>   C:\cygwin\bin\cygxslt-1.dll
>   C:\WINDOWS\system32\ODBC32.dll
>     C:\WINDOWS\system32\msvcrt.dll
>     C:\WINDOWS\system32\COMCTL32.dll
>       C:\WINDOWS\system32\GDI32.dll
>         C:\WINDOWS\system32\USER32.dll
>     C:\WINDOWS\system32\SHELL32.dll
>       C:\WINDOWS\system32\SHLWAPI.dll
>     C:\WINDOWS\system32\comdlg32.dll
>   C:\WINDOWS\system32\OLE32.dll
> 
> So I am using the ODBC and OLE32 for access to CreateGUID, I don't
> think these are a problem, but I could be wrong.

I can't reconcile your comment earlier that all the libraries you're linking 
against were compiled for Cygwin with the output of cygcheck ./wos_server.exe.  
There are clearly system libraries being mentioned in the linker options, 
libraries that weren't compiled for Cygwin.

I'm at the very limit of my meager knowledge on this subject, but I know it's 
bad practice to have both cygwin1.dll and msvcrt.dll associated at the same 
time.  They have contradictory implementations of the same kinds of things.

Not being able to run strace on the app successfully is also very suspicious.

I suspect there's something simple about how you've linked your app that I'm 
just not seeing here and I welcome any knowledgeable lurkers to chime in with 
help.

..mark


--
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]