delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/17/03:29:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Mark Geisert <mark AT maxrnd DOT com>
Subject: Re: Strange crash for application linked to cygwin libraries.
Date: Fri, 17 Oct 2008 07:28:56 +0000 (UTC)
Lines: 68
Message-ID: <loom.20081017T071219-618@post.gmane.org>
References: <d9da72020810141611k334a0b1ds50acbef8183e00dc AT mail DOT gmail DOT com> <loom DOT 20081015T010321-540 AT post DOT gmane DOT org> <d9da72020810141922g26347e7m2678110321f0f810 AT mail DOT gmail DOT com> <loom DOT 20081015T033334-847 AT post DOT gmane DOT org> <d9da72020810142122x42cb7cc3g7813ad05632e39b1 AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019