incubator-mod_ftp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <san...@temme.net>
Subject Re: Progress of migration to current APR API?
Date Wed, 13 Dec 2006 16:37:07 GMT

On Dec 13, 2006, at 5:36 AM, Niklas Edmundsson wrote:

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

Apparently, we turn on TCP_DEFER_ACCEPT by default on Linux. Try the  
following directive:

AcceptFilter ftp none

or

AcceptFilter http none

(I don't know how that ftp protocol would be registered for this  
particular purpose, and we may not do that.) The AcceptFilter concept  
came along after 2.0. It is a marvellous performance boost for any  
protocol where the client sends data first (like HTTP), but it breaks  
any protocol where the server is supposed to send data first (like  
FTP, SMTP or NNTP).

I can't talk directly to the segfaults, but you gotta admit we're  
making progress. (:

Can you past the entire backtrace?

Thanks,

S.

>  - 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):
> ------8<------
>
> 220 ftp.acc.umu.se 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
> 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
>
> More bad karma :)
>
>
> Did it work when you tested it??
>
> /Nikke
> -- 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
> =-=-=-=-
>  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |      
> nikke@acc.umu.se
> ---------------------------------------------------------------------- 
> -----
>  Black holes resulted when MS tried to beat a deadline
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
> =-=-=-=
>
>


-- 
sander@temme.net              http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF


Mime
View raw message