incubator-mod_ftp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Progress of migration to current APR API?
Date Wed, 13 Dec 2006 16:35:02 GMT
Niklas Edmundsson wrote:
> Whirled, and it loads and seems to exhibit some basic working-molecules.
> However, it seems to need some care yet. This is with httpd 2.2.3 and
> the worker MPM (if that matters) on Ubuntu Dapper x86:
> 
> - When connecting it doesn't emit the "220 yada" line until I throw
>   some data at it. This makes FTP clients not work. strace of the
>   httpd process shows that accept isn't even called until I press
>   enter, this leads me to believe that httpd doesn't call accept until
>   it gets input on the socket as this is what HTTP does.
>  - When trying stuff talking directly to the FTP port (with the
>   "socket" utility) I got this far (the 500 in the beginning is
>   because of me pressing enter):

Yowzers - starting here, because this is symptomatic of core breakage
in the filtering api.  (We have a semantic to switch to 'leading write'
which isn't part of HTTP protocol - but it's apparently been violated.)

> PASV
> ------8<------
> and here the thing segfaults. gdb on the coredump shows:
> 
> #4  0xb7dae27f in ftp_cmd_pasv (r=0x81f4fc0, arg=0x81f5fe8 "")
>     at ftp_commands.c:1430
> 1430            sa->port = port; /* Magic here when port = 0 */
> (gdb) print sa
> $1 = (apr_sockaddr_t *) 0x0
> 
> As we all know, dereferencing NULL-pointers gives bad karma ;)
> 
> Trying PORT instead of PASV also crashes, albeit in apr_socket_bind()
> caused by:
> #5  0xb7dae954 in ftp_cmd_port (r=0x81f50e0, arg=0x81f2290
> "\230\020\037\b\r")
>     at ftp_commands.c:1633
> 1633        rv = apr_socket_bind(s, sa);
> (gdb) print s
> $3 = (apr_socket_t *) 0x81f2290
> (gdb) print sa
> $4 = (apr_sockaddr_t *) 0x0

On top of those :)  You asked if I tested - I hadn't gotten that far, but
will this afternoon.  We thankfully have Zubin's work on the ftp test
harness in httpd-testb which I need to check for integration again.

Glad compilation went well for you.

Bill

Mime
View raw message