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

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <d9da72020810141922g26347e7m2678110321f0f810@mail.gmail.com>
Date: Wed, 15 Oct 2008 13:22:37 +1100
From: "Peter Ross" <pro AT missioncriticalit DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Strange crash for application linked to cygwin libraries.
In-Reply-To: <loom.20081015T010321-540@post.gmane.org>
MIME-Version: 1.0
References: <d9da72020810141611k334a0b1ds50acbef8183e00dc AT mail DOT gmail DOT com> <loom DOT 20081015T010321-540 AT post DOT gmane DOT org>
X-Google-Sender-Auth: b19acead24eaffac
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Wed, Oct 15, 2008 at 12:18 PM, Mark Geisert <mark AT maxrnd DOT com> wrote:
> 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
>
> You haven't supplied the canonical problem report info as requested in...
>
>> Problem reports:       <http://cygwin.com/problems.html>
>
> ...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.

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


> Most helpful of all for debugging this would probably be a <http://cygwin.com/
> acronyms/#STC>.
>
Yes, I agree, I was just hoping that there was something else I could
try before I tried to reduce my 1132 file application down to a simple
test case.  Using strace seems to be an idea, but I can't get paste
how to connect to the process to see where the seg fault is.

Anyway thanks for your help.

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