all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
@ 2021-09-11 15:00 Steinar Bang
  2021-09-12 16:48 ` Michael Albinus
  2021-09-14 13:38 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 8+ messages in thread
From: Steinar Bang @ 2021-09-11 15:00 UTC (permalink / raw)
  To: help-gnu-emacs

Platform: debian 11 "bullseye", amd64
	  GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian

After the upgrade to debian 11, which brought me emacs 27, there are
some remote files that fail on load with "Args out of range".

There is also at least one, fairly large (1.9MB) file, that loads file
(the file used by the old gnus-sync.el).

Looking at the Messages buffer, it seems that the load fails after the
file has been fetched and successfully decompressed.

Does anyone know what causes this? And does anyone know what I can do to
fix it?

A google search on similar errors said that tramp has had it back in
2013 and 2016, but not recently.

Thanks!

 -Steinar


The contents of the Messages buffer after a failing tramp remote file load, are:

 Tramp: Opening connection for myuser@somehost.somedomain.com using scp...
 Tramp: Sending command ‘exec ssh -l myuser  -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none somehost.somedomain.com’
 Tramp: Waiting for prompts from remote shell...done
 Tramp: Found remote shell prompt on ‘somehost.somedomain.com’
 Tramp: Connection reset, because remote host changed from ‘Linux 4.19.0-16-amd64’ to ‘Linux 5.10.0-8-amd64’
 Tramp: Opening connection for myuser@somehost.somedomain.com using scp...
 Tramp: Sending command ‘exec ssh -l myuser  -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none somehost.somedomain.com’
 Tramp: Waiting for prompts from remote shell...done
 Tramp: Found remote shell prompt on ‘somehost.somedomain.com’
 Tramp: Opening connection for myuser@somehost.somedomain.com using scp...done [2 times]
 Tramp: Inserting ‘/scp:myuser@somehost.somedomain.com:/home/myuser/somefile’...
 Tramp: Encoding remote file ‘/scp:myuser@somehost.somedomain.com:/home/myuser/somefile’ with ‘(env GZIP= gzip <%s | base64)’...done
 Tramp: Decoding local file ‘/tmp/tramp.bQ7fkB’ with ‘(lambda (beg end) (base64-decode-region beg end) (let ((coding-system-for-write 'binary) (coding-system-for-read 'binary)) (apply #'tramp-call-process-region '(tramp-file-name scp myuser nil somehost.somedomain.com nil /home/myuser/somefile nil) (point-min) (point-max) (car (split-string env GZIP= gzip -d)) t t nil (cdr (split-string env GZIP= gzip -d)))))’...done
 Tramp: Inserting ‘/scp:myuser@somehost.somedomain.com:/home/myuser/somefile’...done
 apply: Args out of range: 1628771269, -1, 0



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-11 15:00 Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian Steinar Bang
@ 2021-09-12 16:48 ` Michael Albinus
  2021-09-19  8:35   ` Steinar Bang
  2021-09-14 13:38 ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Albinus @ 2021-09-12 16:48 UTC (permalink / raw)
  To: Steinar Bang; +Cc: help-gnu-emacs

Steinar Bang <sb@dod.no> writes:

Hi Steinar,

> Platform: debian 11 "bullseye", amd64
> 	  GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian
>
> After the upgrade to debian 11, which brought me emacs 27, there are
> some remote files that fail on load with "Args out of range".
>
> There is also at least one, fairly large (1.9MB) file, that loads file
> (the file used by the old gnus-sync.el).
>
> Looking at the Messages buffer, it seems that the load fails after the
> file has been fetched and successfully decompressed.
>
> Does anyone know what causes this? And does anyone know what I can do to
> fix it?

Does it also happen if you call "emacs -Q"?

If not, bisect your ~/.emacs in order to find the
culprit. Otherwise, enable backtraces, and show them.

(setq debug-on-error t)

> Thanks!
>
>  -Steinar

Best regards, Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-11 15:00 Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian Steinar Bang
  2021-09-12 16:48 ` Michael Albinus
@ 2021-09-14 13:38 ` Stefan Monnier via Users list for the GNU Emacs text editor
  2021-09-19  8:36   ` Steinar Bang
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-09-14 13:38 UTC (permalink / raw)
  To: help-gnu-emacs

Steinar Bang [2021-09-11 17:00:54] wrote:

> Platform: debian 11 "bullseye", amd64
> 	  GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian
>
> After the upgrade to debian 11, which brought me emacs 27, there are
> some remote files that fail on load with "Args out of range".

If you `M-x toggle-debug-on-error RET` are you able to get a backtrace?
That would help narrow down the problem.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-12 16:48 ` Michael Albinus
@ 2021-09-19  8:35   ` Steinar Bang
  2021-09-19 10:18     ` Steinar Bang
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2021-09-19  8:35 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Michael Albinus <michael.albinus@gmx.de>:

> Does it also happen if you call "emacs -Q"?

No, it does not.  With "emacs -Q" the file loads fine.

> If not, bisect your ~/.emacs in order to find the
> culprit. Otherwise, enable backtraces, and show them.

Whew... my .emacs has a history that goes back to 1987 or 1989 or
thereabouts... lots of obsolete config that has never been cleaned up. :-)

But I will try!

> (setq debug-on-error t)

Debugger entered--Lisp error: (args-out-of-range 1628771269 -1 0)
  set-visited-file-modtime(1628771269)
  apply(set-visited-file-modtime 1628771269)
  tramp-run-real-handler(set-visited-file-modtime (1628771269))
  tramp-sh-handle-set-visited-file-modtime(nil)
  apply(tramp-sh-handle-set-visited-file-modtime nil)
  tramp-sh-file-name-handler(set-visited-file-modtime nil)
  apply(tramp-sh-file-name-handler set-visited-file-modtime nil)
  tramp-file-name-handler(set-visited-file-modtime nil)
  set-visited-file-modtime()
  #f(compiled-function () #<bytecode 0x15929a718f4d>)()
  tramp-handle-insert-file-contents(#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil)
  apply(tramp-handle-insert-file-contents (#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil))
  tramp-sh-file-name-handler(insert-file-contents #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil)
  apply(tramp-sh-file-name-handler insert-file-contents (#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil))
  tramp-file-name-handler(insert-file-contents #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil)
  insert-file-contents(#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t)
  find-file-noselect-1(#<buffer somefile> #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) nil nil #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) (414310 (-1 . 1)))
  find-file-noselect(#("/scp:myuser@somehost.somedomain.com:somefile" 1 4 (tramp-default t)) nil nil t)
  find-file(#("/scp:myuser@somehost.somedomain.com:somefile" 1 4 (tramp-default t)) t)
  funcall-interactively(find-file #("/scp:myuser@somehost.somedomain.com:somefile" 1 4 (tramp-default t)) t)
  call-interactively(find-file nil nil)
  command-execute(find-file)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-14 13:38 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2021-09-19  8:36   ` Steinar Bang
  2021-09-19  8:55     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2021-09-19  8:36 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>:

> If you `M-x toggle-debug-on-error RET` are you able to get a backtrace?
> That would help narrow down the problem.

Thanks, here's the stack trace:

Debugger entered--Lisp error: (args-out-of-range 1628771269 -1 0)
  set-visited-file-modtime(1628771269)
  apply(set-visited-file-modtime 1628771269)
  tramp-run-real-handler(set-visited-file-modtime (1628771269))
  tramp-sh-handle-set-visited-file-modtime(nil)
  apply(tramp-sh-handle-set-visited-file-modtime nil)
  tramp-sh-file-name-handler(set-visited-file-modtime nil)
  apply(tramp-sh-file-name-handler set-visited-file-modtime nil)
  tramp-file-name-handler(set-visited-file-modtime nil)
  set-visited-file-modtime()
  #f(compiled-function () #<bytecode 0x15929a718f4d>)()
  tramp-handle-insert-file-contents(#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil)
  apply(tramp-handle-insert-file-contents (#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil))
  tramp-sh-file-name-handler(insert-file-contents #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil)
  apply(tramp-sh-file-name-handler insert-file-contents (#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil))
  tramp-file-name-handler(insert-file-contents #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t nil nil nil)
  insert-file-contents(#("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) t)
  find-file-noselect-1(#<buffer somefile> #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) nil nil #("/scp:myuser@somehost.somedomain.com:/home/myuser/somefile" 1 4 (tramp-default t)) (414310 (-1 . 1)))
  find-file-noselect(#("/scp:myuser@somehost.somedomain.com:somefile" 1 4 (tramp-default t)) nil nil t)
  find-file(#("/scp:myuser@somehost.somedomain.com:somefile" 1 4 (tramp-default t)) t)
  funcall-interactively(find-file #("/scp:myuser@somehost.somedomain.com:somefile" 1 4 (tramp-default t)) t)
  call-interactively(find-file nil nil)
  command-execute(find-file)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-19  8:36   ` Steinar Bang
@ 2021-09-19  8:55     ` Eli Zaretskii
  2021-09-19 10:20       ` Steinar Bang
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-09-19  8:55 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Steinar Bang <sb@dod.no>
> Date: Sun, 19 Sep 2021 10:36:01 +0200
> 
> >>>>> Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>:
> 
> > If you `M-x toggle-debug-on-error RET` are you able to get a backtrace?
> > That would help narrow down the problem.
> 
> Thanks, here's the stack trace:
> 
> Debugger entered--Lisp error: (args-out-of-range 1628771269 -1 0)
>   set-visited-file-modtime(1628771269)

If you read the doc string of set-visited-file-modtime, you will see
that an argument of 1628771269 is invalid.

>   apply(set-visited-file-modtime 1628771269)
>   tramp-run-real-handler(set-visited-file-modtime (1628771269))
>   tramp-sh-handle-set-visited-file-modtime(nil)

Are you using an old version of Tramp?  It seems like Tramp calls
set-visited-file-modtime with a time value that is no longer supported
in Emacs 27.

In any case, I think you should submit a bug report, this place is not
where such issues should be discussed.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-19  8:35   ` Steinar Bang
@ 2021-09-19 10:18     ` Steinar Bang
  0 siblings, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2021-09-19 10:18 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:
>>>>> Michael Albinus <michael.albinus@gmx.de>:

>> Does it also happen if you call "emacs -Q"?

> No, it does not.  With "emacs -Q" the file loads fine.

>> If not, bisect your ~/.emacs in order to find the
>> culprit. Otherwise, enable backtraces, and show them.

> Whew... my .emacs has a history that goes back to 1987 or 1989 or
> thereabouts... lots of obsolete config that has never been cleaned up. :-)

> But I will try!

Ok, I found the culprit, and it was kind of unexpected, in config not
related to tramp at all:

It's the line
      (push (concat git-gnus-directory "/lisp") load-path)
in
 ;; Git version of Gnus:
 ;; Not in actual use but can't be removed as long as I use gnus-sync because
 ;; gnus-sync use gnus-gethash and this macro has been removed from gnus in emacs 27
 (if (not running-emacs25-or-emacs26)
     (let ((git-gnus-directory
            (if running-xemacs
                (concat git-workspace "/gnus.xemacs")
              (concat git-workspace "/gnus"))))
       (push (concat git-gnus-directory "/lisp") load-path)
       (let ((git-gnus-info-dir (concat git-gnus-directory "/texi")))
 	(push git-gnus-info-dir Info-directory-list))))

The ~/git/gnus/ clone is an obsolete clone from 2016, and as the comment
says, have been left alone because I have code that uses gnus-gethash
from here.

The code that uses is, is something called gnus-sync.el from 2011 (or
therabouts), that was a stopgap solution for what is solved by cloud
gnus.

However, cloud gnus has never worked for me, and since gnus-sync
continued to work, I've procrastinated on the troubleshooting.

But I guess I have to figure it out now.  The author of gnus-sync is
also the author (AFAIK) of the cloudy gnusy stuff (Hi Ted!), so I'm
probably the only user, 10 years on...?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian
  2021-09-19  8:55     ` Eli Zaretskii
@ 2021-09-19 10:20       ` Steinar Bang
  0 siblings, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2021-09-19 10:20 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Eli Zaretskii <eliz@gnu.org>:

> In any case, I think you should submit a bug report, this place is not
> where such issues should be discussed.

The problem was my config, and was caused by me continuing to use an
obsolete, unsupported and superceded piece of emacs lisp.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-19 10:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-11 15:00 Get "Args out of range" on remote file loaded with tramp on emacs 27 on debian Steinar Bang
2021-09-12 16:48 ` Michael Albinus
2021-09-19  8:35   ` Steinar Bang
2021-09-19 10:18     ` Steinar Bang
2021-09-14 13:38 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-09-19  8:36   ` Steinar Bang
2021-09-19  8:55     ` Eli Zaretskii
2021-09-19 10:20       ` Steinar Bang

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.