I finally traced the problem down to setting tramp-histfile-override to t. Apparently, Bash 5.0 doesn't like HISTSIZE=0. Changing it to HISTSIZE=1 fixes the error. Attached patch demonstrating workaround. I couldn't reproduce it by hand however: env HISTFILE='' HISTFILESIZE=0 HISTSIZE=0 bash RET Versions: "GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05" GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu) On Mon, Feb 4, 2019 at 11:53 AM Michael Albinus wrote: > > Allen Li writes: > > Hi Allen, > > > I took the liberty of removing the 2>/dev/null in > > tramp-send-command-and-check as well, but > > I don't think there's a lot of info. > > > 16:13:19.704866 tramp-send-command (6) # > > tramp_perl_file_name_all_completions () { > > \perl -e ' > > opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n"); > > @files = readdir(d); closedir(d); > > foreach $f (@files) { > > if (-d "$ARGV[0]/$f") { > > print "$f/\n"; > > } > > else { > > print "$f\n"; > > } > > } > > print "ok\n" > > ' "$1" > > } ; echo tramp_exit_status $? > > 16:13:19.704957 tramp-get-connection-property (7) # process-name nil > > 16:13:19.705087 tramp-get-connection-property (7) # chunksize 0 > > 16:13:19.705193 tramp-set-connection-property (7) # last-cmd-time > > (23638 12831 705148 363000) > > 16:13:19.705294 tramp-send-string (10) # > > tramp_perl_file_name_all_completions () { > > \perl -e ' > > opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n"); > > @files = readdir(d); closedir(d); > > foreach $f (@files) { > > if (-d "$ARGV[0]/$f") { > > print "$f/\n"; > > } > > else { > > print "$f\n"; > > } > > } > > print "ok\n" > > ' "$1" > > } ; echo tramp_exit_status $? > > 16:13:19.705404 tramp-get-connection-property (7) # process-buffer nil > > 16:13:19.705518 tramp-get-connection-property (7) # check-remote-echo nil > > 16:13:19.705597 tramp-get-connection-property (7) # check-remote-echo nil > > 16:13:21.402934 tramp-maybe-send-script (5) # Sending script > > ‘tramp_perl_file_name_all_completions’...failed > > Yes, there's even no trace 10 output about the result. Hmm, that's very > strange. > > Could you, pls, send the contents of the *tramp/sudo root@cielnosurge* buffer? > > Best regards, Michael.