all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: MICHAEL J MCCLENNEN <mmcclenn@geology.wisc.edu>
Cc: 23883@debbugs.gnu.org
Subject: bug#23883: 24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity
Date: Sun, 03 Jul 2016 13:55:49 +0200	[thread overview]
Message-ID: <87zipzrl4q.fsf@gmx.de> (raw)
In-Reply-To: <DEAD6C97-B9A8-4CE9-8B99-FE88C2B93D87@wisc.edu> (MICHAEL J. MCCLENNEN's message of "Sat, 02 Jul 2016 01:55:21 +0000")

MICHAEL J MCCLENNEN <mmcclenn@geology.wisc.edu> writes:

Hi,

> To reproduce this bug:
>
> 1) Edit a remote file using tramp.
> 2) Wait for at least 24 hours.
> 3) Make a change to the file in the local buffer.  Emacs will then attempt to query
>    the remote system using tramp in order to check whether it has changed on disk
>    before allowing any local editing.
> 4) Sometimes (not always) this check aborts with the error message "Args out of range".
>    The buffer is left in read-only mode, preventing you from working on the file.

Thanks for the report. I'll try to reproduce it with the recent Emacs
from git; I cannot promise I'll succeed.

Which remote file name have you used? I'm mainly interested in the
method name.

> I have actually figured out where in the code the error occurs, and have a fix for it.  The
> error occurs at the last line of the function `tramp-process-actions' in tramp.el, in the
> call to `delete-region'.
>
> The following patch will fix the problem:
> 3593c3593
> < 	  (let (buffer-read-only) (if (< pos (point)) (delete-region pos (point)))))))))
> ---
>> 	  (let (buffer-read-only) (delete-region pos (point))))))))
>
> I have tested this patch, and it solves the problem without causing any other 
> problems that I can detect.  I would appreciate if you would apply this patch 
> to the Emacs source.

Well, this change would prevent to raise an error. However, it seems
like there is a reason that POS is not valid anymore when the problem
happens. I believe we shall try to understand why this happens; maybe
there's something we need to fix as well, but only to fight the
symptoms.

Could you please try to provoke the error again? Prior this, pls set
tramp-verbose to 10, and send the Tramp debug buffer once it happened.

Best regards, Michael.





  reply	other threads:[~2016-07-03 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-02  1:55 bug#23883: 24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity MICHAEL J MCCLENNEN
2016-07-03 11:55 ` Michael Albinus [this message]
     [not found]   ` <858C806B-049F-45DE-9768-68A6CB8727E3@wisc.edu>
2016-07-29 13:03     ` Michael Albinus
2016-08-08  9:28       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zipzrl4q.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=23883@debbugs.gnu.org \
    --cc=mmcclenn@geology.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.