From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Connection drops data if it sent too quickly Date: Mon, 03 Feb 2003 21:37:17 +0100 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84lm0x85j6.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044304636 16926 80.91.224.249 (3 Feb 2003 20:37:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 3 Feb 2003 20:37:16 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18fnL6-0004Of-00 for ; Mon, 03 Feb 2003 21:37:12 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18fnSr-0003SB-00 for ; Mon, 03 Feb 2003 21:45:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18fnMR-0002fa-00 for emacs-devel@quimby.gnus.org; Mon, 03 Feb 2003 15:38:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18fnM8-0002ef-00 for emacs-devel@gnu.org; Mon, 03 Feb 2003 15:38:16 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18fnM7-0002e1-00 for emacs-devel@gnu.org; Mon, 03 Feb 2003 15:38:15 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18fnM6-0002dU-00 for emacs-devel@gnu.org; Mon, 03 Feb 2003 15:38:15 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18fnKC-0004KH-00 for ; Mon, 03 Feb 2003 21:36:16 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18fnJS-0004Gh-00 for ; Mon, 03 Feb 2003 21:35:30 +0100 Original-Lines: 39 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:4ferobwLRuKaVA8Lbb4HFyuCm3s= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11336 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11336 Tramp calls, say, ssh via start-process. This results in an interactive shell from the remote host. Then Tramp sends commands to this shell. For example, it might send: mimencode -u -b <<'EOF' Then Tramp uses process-send-region to send base64 encoded data to this ssh process. Then Tramp sends the string EOF. The problem is that the connection is dropping bytes when the data is sent too quickly. I've changed it to send chunks of 500 bytes, then wait 0.1 seconds. This works. This happens using for Michael, a codeveloper, using GNU Emacs 20.7.1 (hppa1.1-hp-hpux10.20, Motif) to connect to localhost. The file in question is between 300k and 400k (so the base64 encoded data is correspondingly bigger). It also happens to other people, but I don't have a reference. The remote end only sees 150 bytes (!) or so of it. Removing the (sleep-for 0.1) but keeping the send-in-chunks mechanism lets 250k (or so) arrive on the remote end. There seems to be code in process-send-region (or a function called from it) that tries to avoid sending data too quickly, but I don't grok it. Just unconditionally throttling the speed of data transmission seems kludgy. But what to do? (Maybe Michael could try what happens when he does mimencode -b /tmp/largefile | \ ssh jrl@localhost /bin/sh -c 'mimencode -u -b > /tmp/outfile' outside of Emacs. Maybe the problem is in ssh. But nevertheless, Tramp needs to work around it.) Thanks for any advice. -- A turnip curses Elvis