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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]