GNU bug report logs -
#23883
24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity
Previous Next
Reported by: MICHAEL J MCCLENNEN <mmcclenn <at> geology.wisc.edu>
Date: Sat, 2 Jul 2016 03:00:02 UTC
Severity: normal
Tags: moreinfo
Found in version 24.4.51
Fixed in version 26.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
MICHAEL J MCCLENNEN <mmcclenn <at> 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.
This bug report was last modified 8 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.