From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Ftp freezes on w32 Date: Sun, 05 Nov 2006 13:51:05 +0100 Message-ID: <454DDE39.6060001@student.lu.se> References: <454C77D4.2090609@student.lu.se> <454D305C.7080600@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1162731101 17800 80.91.229.2 (5 Nov 2006 12:51:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Nov 2006 12:51:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 05 13:51:37 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GghTL-0000aG-Tt for ged-emacs-devel@m.gmane.org; Sun, 05 Nov 2006 13:51:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GghTL-0002P9-GG for ged-emacs-devel@m.gmane.org; Sun, 05 Nov 2006 07:51:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GghT3-0002MO-8G for emacs-devel@gnu.org; Sun, 05 Nov 2006 07:51:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GghT1-0002Ji-3O for emacs-devel@gnu.org; Sun, 05 Nov 2006 07:51:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GghT0-0002JT-Ru for emacs-devel@gnu.org; Sun, 05 Nov 2006 07:51:14 -0500 Original-Received: from [80.76.149.212] (helo=ch-smtp01.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GghT0-0000a0-Gx for emacs-devel@gnu.org; Sun, 05 Nov 2006 07:51:14 -0500 Original-Received: from c83-249-218-244.bredband.comhem.se ([83.249.218.244]:65255 helo=[192.168.123.121]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1GghSv-0005ux-5d for emacs-devel@gnu.org; Sun, 05 Nov 2006 13:51:12 +0100 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Emacs Devel In-Reply-To: <454D305C.7080600@student.lu.se> X-Scan-Result: No virus found in message 1GghSv-0005ux-5d. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1GghSv-0005ux-5d a7045375609825998e8f8802ca4f8fb5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61818 Archived-At: Lennart Borgman wrote: > Lennart Borgman wrote: >> I have seen a problem with ftp on w32 which I have not had time to >> report before. The problem is that if I make a small pause for some >> minutes then ftp hangs. Looks like there perhaps is some problem with >> the ftp process. Here is a more detailed description: >> >> >> I have downloaded the ftp program mentioned on >> http://www.emacswiki.org/cgi-bin/wiki/AngeFtp and my >> ange-ftp-ftp-program-name is c:/dl/ftp-for-win32/Release/ftp.exe. I >> am using w2k on this pc. My CVS Emacs is from 2006-11-03. >> >> I open a remote file with the name >> "/ftp:someuser@ftp.somehost.com:/htdocs/somepath/index.html". After >> doing the first changes to the remote file point is on line 79 in the >> buffer "*ftp someuser@ftp.somehost.com*". >> >> Now I wait maybe 10 min. Then I try again to change the file. Now >> Emacs freezes right after the first character, but C-g helps and the >> screen gets updated again. Looking in the ftp buffer point is still >> on line 79 right after the prompt. However now there is some text >> after the prompt: >> >> ftp> quote mdtm /htdocs/somepath/index.html >> >> If I in the window showing the ftp buffer now press up arrow I get >> the error message: >> >> Wrong type argument: processp, nil > > I have looked at this a bit more. The process get killed in > `ange-ftp-wait-not-busy' so there is no strange with that the process > is gone. > > However what is happening is that the `ange-ftp-wait-not-busy' never > ends. The process filter in `ange-ftp-process-filter' recieves a > string with only nulls (in the argument str). > > Since this is reproducible it seems possible to make a fix for it. A > signal can be sent from the process filter and this can be caught in > `ange-ftp-raw-send'. But it does not seem quite right to me. > > Is there not something suspicious about that the process filter > receives just nulls? Is there something wrong with emacs_read? Some more information. Workaround: It is possible to workaround the problem by simply deleting the inferior ftp process in `ange-ftp-process-filter' when a string with just a lot of nulls is recieved. However it looks to me like there is a more general bug involved here. If I run the ftp program above in just a w32 command window (cmd.exe) it looks like this C:\dl\ftp-for-win32\Release>ftp.exe ftp> open ftp.somehost.com Connected to ftp.somehost.com. 220 somehost FTP Server ready Name (ftp.somehost.com:none): someuser 331 Password required for someuser. Password: 230 User someuser logged in. ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> pwd 257 "/" is current directory. ftp> quote mdtm /htdocs/BalkanFotter/index.html 213 20061104161649 Now I wait a bit more than 300 s and then try getting mode time again: ftp> quote mdtm /htdocs/BalkanFotter/index.html 421 No Transfer Timeout (300 seconds): closing control connection. ftp> If I try the last command in the ftp buffer instead then I get no response. Looking at Windows Task Manager I can see that both Emacs and the ftp process are active. My guess is that the ftp process sends the line "421 ..." to standard error and that Emacs somehow misses this. Seems like a bug in either the ftp program or Emacs. Could someone please comment on this?