incubator-mod_ftp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Edmundsson <>
Subject Re: Progress of migration to current APR API?
Date Wed, 13 Dec 2006 13:36:59 GMT
On Tue, 12 Dec 2006, William A. Rowe, Jr. wrote:

>> Drop a mail when you think you're done so I can give it a whirl :)
> The fixes for apr-1 and httpd-2.x, and some of the various other emits are
> now fixed. The unfixed emits are either errors or for headers I didn't get
> a chance to plug in, but should have no effect.
> Give it a whirl.

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 

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

220 FTP Server (Apache/2.2.3 (Unix) mod_ftp/3.0.0 Nov 21 2006 13:28:45) ready.
500 : Command not recognized
USER ftp
331 Password required for ftp
PASS nikke@
230 User ftp logged in
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

More bad karma :)

Did it work when you tested it??

  Niklas Edmundsson, Admin @ {acc,hpc2n}      |
  Black holes resulted when MS tried to beat a deadline

View raw message