X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Mark Geisert Subject: Re: Strange crash for application linked to cygwin libraries. Date: Wed, 15 Oct 2008 03:50:03 +0000 (UTC) Lines: 66 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: 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 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 > 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/