public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: ftp bug report
@ 2004-02-19 14:03 Thomas Mellman
  2004-02-19 16:13 ` Corinna Vinschen
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Mellman @ 2004-02-19 14:03 UTC (permalink / raw)
  To: cygwin

Corinna  wrote:

>> Did you try to use the mapping feature of nmap?  I transfer from a VMS
>
>What's nmap?  I never used it.  I don't see that we have a nmap package
>in the distro.
>
>> machine, and I need to nmap to get rid of the version number.  I also
>> use the case command to convert from uppercase to lowercase.
>
>I'd need *specific* instructions to reproduce the crash.  What commands
>with which options do I have to use how?  Can I do this at all or do I
>need non-Cygwin commands to reproduce it?  Do I have to have a VMS machine?


Okay, like this:

$ ftp somehost
Connected to somehost.com.
220 somehost.3 FTP Server (Version 5.0) Ready.
Remote system type is VMS.
ftp> user mellman
331 Username mellman requires a Password
Password: 
230 User logged in.
ftp> cd somewhere
250-CWD command successful.
250 New default directory is somewhere
ftp> nmap $1;$2 $1
ftp> case
Case mapping on.
ftp> get mspp_i_seq.h
200 PORT command successful.
150 Opening data connection for somewhere:MSPP_I_SEQ.H;1 (x.x.x.x,y)
Segmentation fault (core dumped)


Do you need to have an VMS machine?  Let's see ...

>ftp unixhost
Connected to unixhost.
220 unixhost FTP server (Compaq Tru64 UNIX Version 5.60) ready.
Name (unixhost:tmellman): mellman
331 Password required for mellman. 
Password:
230 User mellman logged in.
ftp> cd somewhere
250 CWD command successful.
ftp> get MSPP_I_SAS00.INI;1
local: mspp_i_sas00.ini remote: MSPP_I_SAS00.INI;1
200 PORT command successful.
150 Opening BINARY mode data connection for MSPP_I_SAS00.INI;1 (x.x.x.x, y) (2494 bytes).
Segmentation fault (core dumped)
139v/tmp/mellman/0219>




__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-19 14:03 ftp bug report Thomas Mellman
@ 2004-02-19 16:13 ` Corinna Vinschen
  2004-02-19 17:52   ` Corinna Vinschen
  2004-02-19 23:23   ` Christopher Faylor
  0 siblings, 2 replies; 16+ messages in thread
From: Corinna Vinschen @ 2004-02-19 16:13 UTC (permalink / raw)
  To: cygwin

On Feb 19 05:31, Thomas Mellman wrote:
> Corinna  wrote:
> 
> >> Did you try to use the mapping feature of nmap?  I transfer from a VMS
> >
> >What's nmap?  I never used it.  I don't see that we have a nmap package
> >in the distro.
> >
> >> machine, and I need to nmap to get rid of the version number.  I also
> >> use the case command to convert from uppercase to lowercase.
> >
> >I'd need *specific* instructions to reproduce the crash.  What commands
> >with which options do I have to use how?  Can I do this at all or do I
> >need non-Cygwin commands to reproduce it?  Do I have to have a VMS machine?
> 
> Okay, like this:
> 
> $ ftp somehost
> Connected to somehost.com.
> 220 somehost.3 FTP Server (Version 5.0) Ready.
> Remote system type is VMS.
> ftp> user mellman
> 331 Username mellman requires a Password
> Password: 
> 230 User logged in.
> ftp> cd somewhere
> 250-CWD command successful.
> 250 New default directory is somewhere
> ftp> nmap $1;$2 $1
> ftp> case
> Case mapping on.
> ftp> get mspp_i_seq.h
> 200 PORT command successful.
> 150 Opening data connection for somewhere:MSPP_I_SEQ.H;1 (x.x.x.x,y)
> Segmentation fault (core dumped)

FYI, I can reproduce it now.  I really didn't know about that nmap
command, I never used it before.

However, it would still be nice if somebody would try to track that
down, too.  When starting ftp under GDB, it doesn't hang, it just
doesn't print anything, so you must type in everything blind.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-19 16:13 ` Corinna Vinschen
@ 2004-02-19 17:52   ` Corinna Vinschen
  2004-02-19 18:30     ` Larry Hall
  2004-02-19 23:23   ` Christopher Faylor
  1 sibling, 1 reply; 16+ messages in thread
From: Corinna Vinschen @ 2004-02-19 17:52 UTC (permalink / raw)
  To: cygwin

On Feb 19 17:02, Corinna Vinschen wrote:
> On Feb 19 05:31, Thomas Mellman wrote:
> > ftp> nmap $1;$2 $1
> > ftp> case
> > Case mapping on.
> > ftp> get mspp_i_seq.h
> > 200 PORT command successful.
> > 150 Opening data connection for somewhere:MSPP_I_SEQ.H;1 (x.x.x.x,y)
> > Segmentation fault (core dumped)
> 
> FYI, I can reproduce it now.  I really didn't know about that nmap
> command, I never used it before.

I fixed the bug (which could only show up when using nmap) and uploaded
a new version of inetutils.

As an exercise for the reader:

  buf = (char *) malloc (size);
  to = buf;
  [...]
  if (newsize > size)
    buf = realloc (buf, newsize);
  while (newsize--)
    *to++ = *src++;

What's wrong with this picture?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-19 17:52   ` Corinna Vinschen
@ 2004-02-19 18:30     ` Larry Hall
  0 siblings, 0 replies; 16+ messages in thread
From: Larry Hall @ 2004-02-19 18:30 UTC (permalink / raw)
  To: cygwin

At 12:37 PM 2/19/2004, Corinna Vinschen you wrote:
>On Feb 19 17:02, Corinna Vinschen wrote:
>> On Feb 19 05:31, Thomas Mellman wrote:
>> > ftp> nmap $1;$2 $1
>> > ftp> case
>> > Case mapping on.
>> > ftp> get mspp_i_seq.h
>> > 200 PORT command successful.
>> > 150 Opening data connection for somewhere:MSPP_I_SEQ.H;1 (x.x.x.x,y)
>> > Segmentation fault (core dumped)
>> 
>> FYI, I can reproduce it now.  I really didn't know about that nmap
>> command, I never used it before.
>
>I fixed the bug (which could only show up when using nmap) and uploaded
>a new version of inetutils.
>
>As an exercise for the reader:
>
>  buf = (char *) malloc (size);
>  to = buf;
>  [...]
>  if (newsize > size)
>    buf = realloc (buf, newsize);
>  while (newsize--)
>    *to++ = *src++;
>
>What's wrong with this picture?


<as he raises his hand...>
I know, I know.  Pick me, pick me!  Oo!  OOO!   ;-)


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-19 16:13 ` Corinna Vinschen
  2004-02-19 17:52   ` Corinna Vinschen
@ 2004-02-19 23:23   ` Christopher Faylor
  1 sibling, 0 replies; 16+ messages in thread
From: Christopher Faylor @ 2004-02-19 23:23 UTC (permalink / raw)
  To: cygwin

On Thu, Feb 19, 2004 at 05:02:36PM +0100, Corinna Vinschen wrote:
>On Feb 19 05:31, Thomas Mellman wrote:
>> Corinna  wrote:
>> 
>> >> Did you try to use the mapping feature of nmap?  I transfer from a VMS
>> >
>> >What's nmap?  I never used it.  I don't see that we have a nmap package
>> >in the distro.
>> >
>> >> machine, and I need to nmap to get rid of the version number.  I also
>> >> use the case command to convert from uppercase to lowercase.
>> >
>> >I'd need *specific* instructions to reproduce the crash.  What commands
>> >with which options do I have to use how?  Can I do this at all or do I
>> >need non-Cygwin commands to reproduce it?  Do I have to have a VMS machine?
>> 
>> Okay, like this:
>> 
>> $ ftp somehost
>> Connected to somehost.com.
>> 220 somehost.3 FTP Server (Version 5.0) Ready.
>> Remote system type is VMS.
>> ftp> user mellman
>> 331 Username mellman requires a Password
>> Password: 
>> 230 User logged in.
>> ftp> cd somewhere
>> 250-CWD command successful.
>> 250 New default directory is somewhere
>> ftp> nmap $1;$2 $1
>> ftp> case
>> Case mapping on.
>> ftp> get mspp_i_seq.h
>> 200 PORT command successful.
>> 150 Opening data connection for somewhere:MSPP_I_SEQ.H;1 (x.x.x.x,y)
>> Segmentation fault (core dumped)
>
>FYI, I can reproduce it now.  I really didn't know about that nmap
>command, I never used it before.
>
>However, it would still be nice if somebody would try to track that
>down, too.  When starting ftp under GDB, it doesn't hang, it just
>doesn't print anything, so you must type in everything blind.

You could start ftp in one console window and attach to it with gdb
in another...

cgf

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
@ 2004-02-19 21:37 Thomas Mellman
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Mellman @ 2004-02-19 21:37 UTC (permalink / raw)
  To: cygwin

Brian Ford wrote:
>> Oh, I hope there's an answer section in the back
>> of the book.
>>
>Hint: realloc can move the data, returning a different base address.


Oh.  I guess I read the man page wrong:

 The realloc() function changes the size of the block of memory pointed to
  by the pointer parameter to the number of bytes specified by the size
  parameter, and returns a pointer to the block. The contents of the block
                                      ^^^ 
  remain unchanged up to the lesser of the old and new sizes, and the con-
  tents of any memory added beyond the limit of the old size is undefined.


Admittedly, that was from a certain Unix-box manufacturer.  Thanks to your hint,
I checked the cygwin man page, and it was much clearer!



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-19 19:16 Thomas Mellman
@ 2004-02-19 19:27 ` Brian Ford
  0 siblings, 0 replies; 16+ messages in thread
From: Brian Ford @ 2004-02-19 19:27 UTC (permalink / raw)
  To: Thomas Mellman; +Cc: cygwin

On Thu, 19 Feb 2004, Thomas Mellman wrote:

> Corinna Vinschen wrote:
>
> >As an exercise for the reader:
> >
> >  buf = (char *) malloc (size);
> >  to = buf;
> >  [...]
> >  if (newsize > size)
> >    buf = realloc (buf, newsize);
> >  while (newsize--)
> >    *to++ = *src++;
> >
> >What's wrong with this picture?
> >
>
> Oh, I hope there's an answer section in the back
> of the book.
>
Hint: realloc can move the data, returning a different base address.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
@ 2004-02-19 19:16 Thomas Mellman
  2004-02-19 19:27 ` Brian Ford
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Mellman @ 2004-02-19 19:16 UTC (permalink / raw)
  To: cygwin

>I fixed the bug (which could only show up when using nmap) and uploaded
>a new version of inetutils.


Wow!  I'm impressed.  Thank you!


>As an exercise for the reader:
>
>  buf = (char *) malloc (size);
>  to = buf;
>  [...]
>  if (newsize > size)
>    buf = realloc (buf, newsize);
>  while (newsize--)
>    *to++ = *src++;
>
>What's wrong with this picture?


Oh, I hope there's an answer section in the back
of the book.

Proving my ignorance once again ...

0v~/eg/c>cat malmalloc.c
main ()
{
    char *buf, *to, *src = "hello world";
    int size = 8, newsize;

    newsize = strlen (src) + 1;
    buf = (char *) malloc (size);
    to = buf;

    if (newsize > size)
        buf = (char *)realloc (buf, newsize);
    while (newsize--)
        *to++ = *src++;

    printf ("%s\n", buf);
}
0v~/eg/c>./malmalloc.exe 
hello world
12v~/eg/c>



(assumes newsize is initialized).


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: ftp bug report
@ 2004-02-19 14:51 Hughes, Bill
  0 siblings, 0 replies; 16+ messages in thread
From: Hughes, Bill @ 2004-02-19 14:51 UTC (permalink / raw)
  To: cygwin

> Sent: 19 February 2004 13:32  From: Thomas Mellman
..snip.. 
> $ ftp somehost
> Connected to somehost.com.
> 220 somehost.3 FTP Server (Version 5.0) Ready.
> Remote system type is VMS.
> ftp> user mellman
> 331 Username mellman requires a Password
> Password: 
> 230 User logged in.
> ftp> cd somewhere
> 250-CWD command successful.
> 250 New default directory is somewhere
> ftp> nmap $1;$2 $1
> ftp> case
> Case mapping on.
> ftp> get mspp_i_seq.h
> 200 PORT command successful.
> 150 Opening data connection for somewhere:MSPP_I_SEQ.H;1 (x.x.x.x,y)
> Segmentation fault (core dumped)

fwiw I can reproduce the above, I'm running 1.5.7, not a snapshot.
The culprit may be nmap as using case alone transfer ok.
This is intended as a data point. If I get the time later I'll try the
latest safe snapshot but I can't say when.

This e-mail transmission is strictly confidential and intended solely
for the person or organisation to whom it is addressed. It may contain
privileged and confidential information and if you are not the intended
recipient, you must not copy, distribute or take any action in reliance
on it. If you have received this email in error, please reply to the
sender as soon as possible and delete the message. Please note that we
are able to, and reserve the right to, monitor e-mail communications
passing through our network.

The views expressed in this email are not that of the company unless
specified within the message.

The inclusion of this footnote indicates that the mail message and any
attachments have been checked for the presence of known viruses.

If you have any comments regarding our policy please direct them to
postmaster@cox.co.uk
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-19 12:53 Thomas Mellman
@ 2004-02-19 13:32 ` Corinna Vinschen
  0 siblings, 0 replies; 16+ messages in thread
From: Corinna Vinschen @ 2004-02-19 13:32 UTC (permalink / raw)
  To: cygwin

On Feb 19 03:39, Thomas Mellman wrote:
> Corinna wrote:
> >On Feb 18 02:21, Thomas Mellman wrote:
> >> Re: ftp crash
> >> 
> >>   ftp crashes intermittently (but reliably) when getting files.
> >
> >Hmm, I tried to get various files between 1 Meg and 22 Megs, multiple
> >times, and I didn't have any crash.  Do you encounter the same problem
> >with a recent Cygwin snapshot?
> >
> >Corinna
> 
> Do you mean more recent than
> 
> CYGWIN_NT-5.0 venedig 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown unknown Cygwin
> 
> I mean, I update regularly.  What do you recommend?

A snapshot.  http://cygwin.com/snapshots/

> Did you try to use the mapping feature of nmap?  I transfer from a VMS

What's nmap?  I never used it.  I don't see that we have a nmap package
in the distro.

> machine, and I need to nmap to get rid of the version number.  I also
> use the case command to convert from uppercase to lowercase.

I'd need *specific* instructions to reproduce the crash.  What commands
with which options do I have to use how?  Can I do this at all or do I
need non-Cygwin commands to reproduce it?  Do I have to have a VMS machine?

Otherwise it would be much more efficient if you'd track down the bug.
You have the inetutils sources, so you can build a debugging version
of ftp with all symbols in it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
@ 2004-02-19 12:53 Thomas Mellman
  2004-02-19 13:32 ` Corinna Vinschen
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Mellman @ 2004-02-19 12:53 UTC (permalink / raw)
  To: cygwin

Corinna wrote:

>On Feb 18 02:21, Thomas Mellman wrote:
>> Re: ftp crash
>> 
>>   ftp crashes intermittently (but reliably) when getting files.
>
>Hmm, I tried to get various files between 1 Meg and 22 Megs, multiple
>times, and I didn't have any crash.  Do you encounter the same problem
>with a recent Cygwin snapshot?
>
>Corinna


Do you mean more recent than

CYGWIN_NT-5.0 venedig 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown unknown Cygwin

I mean, I update regularly.  What do you recommend?


Did you try to use the mapping feature of nmap?  I transfer from a VMS
machine, and I need to nmap to get rid of the version number.  I also
use the case command to convert from uppercase to lowercase.


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-18 11:49 Thomas Mellman
  2004-02-18 14:45 ` Igor Pechtchanski
@ 2004-02-19 12:07 ` Corinna Vinschen
  1 sibling, 0 replies; 16+ messages in thread
From: Corinna Vinschen @ 2004-02-19 12:07 UTC (permalink / raw)
  To: cygwin

On Feb 18 02:21, Thomas Mellman wrote:
> Re: ftp crash
> 
>   ftp crashes intermittently (but reliably) when getting files.

Hmm, I tried to get various files between 1 Meg and 22 Megs, multiple
times, and I didn't have any crash.  Do you encounter the same problem
with a recent Cygwin snapshot?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-18 14:45 ` Igor Pechtchanski
  2004-02-18 14:53   ` Christopher Faylor
@ 2004-02-18 15:01   ` Thomas Mellman
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Mellman @ 2004-02-18 15:01 UTC (permalink / raw)
  To: cygwin


--- Igor Pechtchanski <pechtcha@cs.nyu.edu> wrote:

> 0x61000000 is the base address for cygwin1.dll, IIRC.


Aha.  Thank you.  I'm still not clear on what happened to
my stack frame for dataconn(), although I can now imagine
what happened to the stack frame entry for the subordinate
fdopen().

Symbol "fdopen" is at 0x40c530 in a file compiled without debugging.

I also don't understand why I couldn't start ftp in gdb.
Do you have any idea?  Perhaps it has something to do terminal
input?  No, I can't see that ...

BTW, what does IIRC mean?



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-18 14:45 ` Igor Pechtchanski
@ 2004-02-18 14:53   ` Christopher Faylor
  2004-02-18 15:01   ` Thomas Mellman
  1 sibling, 0 replies; 16+ messages in thread
From: Christopher Faylor @ 2004-02-18 14:53 UTC (permalink / raw)
  To: cygwin

On Wed, Feb 18, 2004 at 09:36:58AM -0500, Igor Pechtchanski wrote:
>On Wed, 18 Feb 2004, Thomas Mellman wrote:
>
>> Re: ftp crash
>>   I tried to debug it with gdb but for some reason that I don't
>>   understand, it hangs when run.
>>
>>   Nevertheless, using gdb to get the symbols (which appear to
>>   be correct) and the ftp.exe.stackdump, I believe that I have
>>   localized the problem to the call to dataconn() in recvrequest().
>> [snip]
>>   The funny thing is that the datacon() routine is in ftp.c, at
>>
>>   Local exec file:
>>         `/opt/pub/inetutils-1.3.2-25/ftp/ftp.exe', file type pei-i386.
>>         Entry point: 0x401000
>>         0x00401000 - 0x0040cb04 is .text
>>         0x0040d000 - 0x0040e280 is .data
>>         0x0040f000 - 0x00411310 is .bss
>>         0x00412000 - 0x00412ba4 is .idata
>>
>>   But the "entry point" for dataconn is somewhere completely different:
>>
>>     Exception: STATUS_ACCESS_VIOLATION at eip=610AB030
>>     eax=611489F4 ebx=00000038 ecx=7070736D edx=611489F4 esi=0A045018 edi=000001B0
>>     ebp=0022E9E8 esp=0022E9C8 program=D:\Programme\pub\inetutils-1.3.2-25\ftp\ftp.exe
>>     cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
>>     Stack trace:
>>     Frame     Function  Args
>> [snip]
>>     0022EDB8  61086211  (00401083, 00405EDB, 0A044B70, 00000001)
>>
>>                   ^ - dataconn?
>>   recvrequest - v
>>
>>     0022EE88  00402E15  (00405EDB, 0A045258, 0A044B70, 00405E3C)
>> [snip]
>>     End of stack trace (more stack frames may be present)
>>
>>   Or is these frames starting at 0x22edb8 (0x61086211) some kind
>>   of an interrupt?
>>
>>   Oh, perhaps the dataconn stack frame got lost somehow.  Anyway,
>> [strace output snipped]
>
>0x61000000 is the base address for cygwin1.dll, IIRC.

True, but that address is in the middle of malloc, which usually means
malloc pool corruption.  That means it's not a cygwin DLL problem per
se.

cgf

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ftp bug report
  2004-02-18 11:49 Thomas Mellman
@ 2004-02-18 14:45 ` Igor Pechtchanski
  2004-02-18 14:53   ` Christopher Faylor
  2004-02-18 15:01   ` Thomas Mellman
  2004-02-19 12:07 ` Corinna Vinschen
  1 sibling, 2 replies; 16+ messages in thread
From: Igor Pechtchanski @ 2004-02-18 14:45 UTC (permalink / raw)
  To: Thomas Mellman; +Cc: cygwin

On Wed, 18 Feb 2004, Thomas Mellman wrote:

> Re: ftp crash
>   I tried to debug it with gdb but for some reason that I don't
>   understand, it hangs when run.
>
>   Nevertheless, using gdb to get the symbols (which appear to
>   be correct) and the ftp.exe.stackdump, I believe that I have
>   localized the problem to the call to dataconn() in recvrequest().
> [snip]
>   The funny thing is that the datacon() routine is in ftp.c, at
>
>   Local exec file:
>         `/opt/pub/inetutils-1.3.2-25/ftp/ftp.exe', file type pei-i386.
>         Entry point: 0x401000
>         0x00401000 - 0x0040cb04 is .text
>         0x0040d000 - 0x0040e280 is .data
>         0x0040f000 - 0x00411310 is .bss
>         0x00412000 - 0x00412ba4 is .idata
>
>   But the "entry point" for dataconn is somewhere completely different:
>
>     Exception: STATUS_ACCESS_VIOLATION at eip=610AB030
>     eax=611489F4 ebx=00000038 ecx=7070736D edx=611489F4 esi=0A045018 edi=000001B0
>     ebp=0022E9E8 esp=0022E9C8 program=D:\Programme\pub\inetutils-1.3.2-25\ftp\ftp.exe
>     cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
>     Stack trace:
>     Frame     Function  Args
> [snip]
>     0022EDB8  61086211  (00401083, 00405EDB, 0A044B70, 00000001)
>
>                   ^ - dataconn?
>   recvrequest - v
>
>     0022EE88  00402E15  (00405EDB, 0A045258, 0A044B70, 00405E3C)
> [snip]
>     End of stack trace (more stack frames may be present)
>
>   Or is these frames starting at 0x22edb8 (0x61086211) some kind
>   of an interrupt?
>
>   Oh, perhaps the dataconn stack frame got lost somehow.  Anyway,
> [strace output snipped]

0x61000000 is the base address for cygwin1.dll, IIRC.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* ftp bug report
@ 2004-02-18 11:49 Thomas Mellman
  2004-02-18 14:45 ` Igor Pechtchanski
  2004-02-19 12:07 ` Corinna Vinschen
  0 siblings, 2 replies; 16+ messages in thread
From: Thomas Mellman @ 2004-02-18 11:49 UTC (permalink / raw)
  To: cygwin

Re: ftp crash

  ftp crashes intermittently (but reliably) when getting files.
  I tried to debug it with gdb but for some reason that I don't
  understand, it hangs when run.

  Nevertheless, using gdb to get the symbols (which appear to
  be correct) and the ftp.exe.stackdump, I believe that I have
  localized the problem to the call to dataconn() in recvrequest().

  Note that I am using case and nmap (nmap $1;$2 $1) but I think
  that's not a requirement.

  The funny thing is that the datacon() routine is in ftp.c, at

  Local exec file:
        `/opt/pub/inetutils-1.3.2-25/ftp/ftp.exe', file type pei-i386.
        Entry point: 0x401000
        0x00401000 - 0x0040cb04 is .text
        0x0040d000 - 0x0040e280 is .data
        0x0040f000 - 0x00411310 is .bss
        0x00412000 - 0x00412ba4 is .idata

  But the "entry point" for dataconn is somewhere completely different:


    Exception: STATUS_ACCESS_VIOLATION at eip=610AB030
    eax=611489F4 ebx=00000038 ecx=7070736D edx=611489F4 esi=0A045018 edi=000001B0
    ebp=0022E9E8 esp=0022E9C8 program=D:\Programme\pub\inetutils-1.3.2-25\ftp\ftp.exe
    cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
    Stack trace:
    Frame     Function  Args
    0022E9E8  610AB030  (611489C0, 0001201F, 0024E530, 00000200)
    0022EA28  610AAE17  (00000000, 00000001, 0022EA78, 61054EA8)
    0022EA38  610AB4E5  (74F41678, FFFFFFFF, 0022EAE4, 74F46C93)
    0022EA78  61054EA8  (00000001, 00003028, 0022EAC8, 61082BB0)
    0022EA88  61001CA9  (00003028, 0022EBA0, 0022EBE8, 0024E530)
    0022EAC8  61082BB0  (0A045280, 0022ECD0, 0022EF68, 74FAE1D5)
    0022EC18  6107FA26  (0022ECD0, 0022EC64, 0022EC54, 0022EC44)
    0022ED28  6107F3AB  (00000006, 0022ED50, 0022EC84, 0022EC74)
    0022ED78  6105BE38  (00000005, 0022EDA0, 0022ED9C, 00401923)
    0022EDB8  61086211  (00401083, 00405EDB, 0A044B70, 00000001)

                  ^ - dataconn?
  recvrequest - v

    0022EE88  00402E15  (00405EDB, 0A045258, 0A044B70, 00405E3C)
    0022EEB8  00406462  (00000002, 00410F00, 611102A8, 00000001)
    0022EED8  0040A8B2  (00000001, 0040A6A0, 0040A1F8, 0040E100)
    0022EF40  0040A61D  (00000001, 616733D4, 0A0400A8, 0022EF98)
    0022EF80  61005DE0  (0022EF98, 00000000, 00000000, 00000000)
    0022FF90  61005EE5  (00000000, 00000000, 00000000, 00000000)
    End of stack trace (more stack frames may be present)


  Or is these frames starting at 0x22edb8 (0x61086211) some kind
  of an interrupt?


  Oh, perhaps the dataconn stack frame got lost somehow.  Anyway,
  I now have an strace output which I will be glad to provide.
  The last lines are:


  186 1454434 [main] ftp 1472 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
  147 1454581 [main] ftp 1472 fhandler_base::set_flags: filemode set to binary
  147 1454728 [main] ftp 1472 fdsock: fd 4, name '', soc 0x218
  161 1454889 [main] ftp 1472 cygwin_socket: 4 = socket (2, 1, 0)
  397 1455286 [main] ftp 1472 cygwin_bind: 0 = bind (4, 0x40F390, 16)
  336 1455622 [main] ftp 1472 cygwin_getsockname: 0 = getsockname (4, 0x40F390, 0x22EC80)
  266 1455888 [main] ftp 1472 cygwin_listen: 0 = listen (4, 1)
  155 1456043 [main] ftp 1472 void: 0x402A90 = signal (2, 0x401770)
  172 1456215 [main] ftp 1472 writev: writev (3, 0x22EB90, 1)
  160 1456375 [main] ftp 1472 wsock_event::prepare: 2288292 = wsock_event::prepare ()
  210 1456585 [main] ftp 1472 writev: 26 = write (3, 0x22EB90, 1), errno 2
  351 1456936 [main] ftp 1472 void: 0x401770 = signal (2, 0x401770)
  159 1457095 [main] ftp 1472 readv: readv (3, 0x22EB40, 1) blocking, sigcatchers 2
  146 1457241 [main] ftp 1472 readv: no need to call ready_for_read
  153 1457394 [main] ftp 1472 wsock_event::prepare: 2288196 = wsock_event::prepare ()
 1060 1458454 [main] ftp 1472 readv: 30 = readv (3, 0x22EB40, 1), errno 2
  198 1458652 [main] ftp 1472 void: 0x401770 = signal (2, 0x401770)
  132 1458784 [main] ftp 1472 void: 0x401770 = signal (2, 0x402A90)
  145 1458929 [main] ftp 1472 void: 0x402A90 = signal (2, 0x401770)
  144 1459073 [main] ftp 1472 writev: writev (3, 0x22EBE0, 1)
  137 1459210 [main] ftp 1472 wsock_event::prepare: 2288372 = wsock_event::prepare ()
  219 1459429 [main] ftp 1472 writev: 19 = write (3, 0x22EBE0, 1), errno 2
  200 1459629 [main] ftp 1472 void: 0x401770 = signal (2, 0x401770)
  152 1459781 [main] ftp 1472 readv: readv (3, 0x22EB90, 1) blocking, sigcatchers 2
  159 1459940 [main] ftp 1472 readv: no need to call ready_for_read
  152 1460092 [main] ftp 1472 wsock_event::prepare: 2288276 = wsock_event::prepare ()
39176 1499268 [main] ftp 1472 readv: 101 = readv (3, 0x22EB90, 1), errno 2
  361 1499629 [main] ftp 1472 void: 0x401770 = signal (2, 0x401770)
  138 1499767 [main] ftp 1472 void: 0x401770 = signal (2, 0x402A90)
  137 1499904 [main] ftp 1472 writev: writev (2, 0x22EC60, 1)
  146 1500050 [main] ftp 1472 fhandler_base::write: binary write
entered dataconn
^@  214 1500264 [main] ftp 1472 fhandler_base::write: 18 = write (0x403C44, 18)
  147 1500411 [main] ftp 1472 writev: 18 = write (2, 0x22EC60, 1), errno 2
  155 1500566 [main] ftp 1472 cygwin_select: 5, 0x22EC40, 0x0, 0x0, 0x0
  288 1500854 [main] ftp 1472 dtable::select_read:  fd 4
  245 1501099 [main] ftp 1472 cygwin_select: to NULL, ms FFFFFFFF
  496 1501595 [main] ftp 1472 cygwin_select: sel.always_ready 0
  335 1501930 [main] ftp 1472 handle_exceptions: In cygwin_except_handler exc 0xC0000005 at
0x610AB030 sp 0x22E8B8
  287 1502217 [main] ftp 1472 handle_exceptions: In cygwin_except_handler sig = 11 at 0x610AB030
  157 1502374 [main] ftp 1472 handle_exceptions: In cygwin_except_handler calling 0x0
1502520 [main] ftp 1472 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  146 1502520 [main] ftp 1472 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  243 1502763 [main] ftp 1472 try_to_debug: debugger_command ''
1503322 [main] ftp 1472 open_stackdumpfile: Dumping stack trace to ftp.exe.stackdump
  559 1503322 [main] ftp 1472 open_stackdumpfile: Dumping stack trace to ftp.exe.stackdump
2601705 4105027 [main] ftp 1472 signal_exit: about to call do_exit (18B00)
  194 4105221 [main] ftp 1472 do_exit: do_exit (101120), exit_state 0
  129 4105350 [main] ftp 1472 void: 0x0 = signal (20, 0x1)
  124 4105474 [main] ftp 1472 void: 0x0 = signal (1, 0x1)
  105 4105579 [main] ftp 1472 void: 0x402A90 = signal (2, 0x1)
  124 4105703 [main] ftp 1472 void: 0x0 = signal (3, 0x1)
  107 4105810 [main] ftp 1472 fhandler_base::close: closing '/tmp/mellman/idefix/0218/script'
handle 0x350
  356 4106166 [main] ftp 1472 fhandler_socket::close: 0 = fhandler_socket::close()
  448 4106614 [main] ftp 1472 fhandler_socket::close: 0 = fhandler_socket::close()
  296 4106910 [main] ftp 1472 sigproc_terminate: entering
  127 4107037 [main] ftp 1472 proc_terminate: nchildren 0, nzombies 0
  136 4107173 [main] ftp 1472 proc_terminate: leaving
  264 4107437 [main] ftp 1472 __to_clock_t: dwHighDateTime 0, dwLowDateTime 500720
  109 4107546 [main] ftp 1472 __to_clock_t: total 00000000 00000032
  124 4107670 [main] ftp 1472 __to_clock_t: dwHighDateTime 0, dwLowDateTime 400576
  107 4107777 [main] ftp 1472 __to_clock_t: total 00000000 00000028
 1754 4109531 [main] ftp 1472 _pinfo::exit: Calling ExitProcess 101120


The "entered dataconn", above, is a debugging statement I inserted.


CYGWIN_NT-5.0 venedig 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown unknown Cygwin



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-02-19 23:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-19 14:03 ftp bug report Thomas Mellman
2004-02-19 16:13 ` Corinna Vinschen
2004-02-19 17:52   ` Corinna Vinschen
2004-02-19 18:30     ` Larry Hall
2004-02-19 23:23   ` Christopher Faylor
  -- strict thread matches above, loose matches on Subject: below --
2004-02-19 21:37 Thomas Mellman
2004-02-19 19:16 Thomas Mellman
2004-02-19 19:27 ` Brian Ford
2004-02-19 14:51 Hughes, Bill
2004-02-19 12:53 Thomas Mellman
2004-02-19 13:32 ` Corinna Vinschen
2004-02-18 11:49 Thomas Mellman
2004-02-18 14:45 ` Igor Pechtchanski
2004-02-18 14:53   ` Christopher Faylor
2004-02-18 15:01   ` Thomas Mellman
2004-02-19 12:07 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).