delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/14/23:51:29

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: Wed, 15 Oct 2008 03:50:03 +0000 (UTC)
Lines: 66
Message-ID: <loom.20081015T033334-847@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>
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:
> On Wed, Oct 15, 2008 at 12:18 PM, Mark Geisert <XXXXXXXXXXXXXXXX> wrote:

Please don't quote raw email addresses in your emails to the list.

> >> 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
> >
> > You haven't supplied the canonical problem report info as requested in...
> >
> >> Problem reports:       <http://cygwin.com/problems.html>

That was a hint :-).  Please supply that info, specifically the output of
    cygcheck -s -v -r
but *as an attachment* to your next email.

> > ...so only WAGs come to mind:  Try it without using wsock32.  Cygwin has its
> > own implementation of the TCP/IP networking functions and there might be
> > unpleasant mixing of semantics when wsock32 is explicitly linked in.
> >
> Thanks for the WAG, unfortunately it didn't work.

Are all of those libraries you're linking with compiled for Cygwin?  Mixing 
Cygwin libs with non-Cygwin libs won't work.

Another thing that might prove informative is running cygcheck on the 
executable to see its tree of library dependencies.  Maybe wsock32 snuck back 
in somehow.

> > Something else you could try is running the app under strace to see if 
anything
> > obviously erroneous sticks out.
> >
> Now I get a seg-fault when running under strace (it doesn't even get
> to the tcp accept), but when I try and attach to the process using
> gdb.  I get the following error.
>
> $ ps aux | grep wos
>      1740       1    1740       1740  con  500 04:15:28 /cygdrive/e/wos_fpz/
syst
> em/build/wos_server
> 
> Administrator <at> spare ~/wos_fpz/system/build
> $ gdb ./wos_server
> GNU gdb 6.8.0.20080328-cvs (cygwin-special)
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-cygwin"...
> (gdb) attach 1740
> Can't attach to process.
> (gdb)

I don't have any further insight on this; strace has always worked for me.

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