Package: emacs;
Reported by: Aleksandar Popadić <aleksandar.popadic <at> siol.net>
Date: Sat, 12 Mar 2022 16:06:01 UTC
Severity: normal
Found in version 29.0.50
To reply to this bug, email your comments to 54353 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#54353
; Package emacs
.
(Sat, 12 Mar 2022 16:06:01 GMT) Full text and rfc822 format available.Aleksandar Popadić <aleksandar.popadic <at> siol.net>
:bug-gnu-emacs <at> gnu.org
.
(Sat, 12 Mar 2022 16:06:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Aleksandar Popadić <aleksandar.popadic <at> siol.net> To: bug-gnu-emacs <at> gnu.org Subject: 29.0.50; macOS: gdb over ssh into docker stalls Date: Sat, 12 Mar 2022 12:42:05 +0100
[Message part 1 (text/plain, inline)]
I am not sure if this is an emacs bug or not, but I would be grateful for at least some pointers on how to debug this. The issue is that emacs will stall upon hitting a breakpoint until I press C-g. (tramp backtrace is pasted below) Here is the setup and steps to reproduce: - macOS v12.2.1 (stuck with it for work) running emacs built from master - SSH server running in a docker container (minimal Dockerfile to reproduce is attached below) - run emacs with: ./emacs -Q --eval '(setq tramp-verbose 10)' - C-x C-f: /ssh:test <at> localhost#2222:test.c (password is test) - M-x gdb: gdb -i=mi /ssh:test <at> localhost#2222:test - set breakpoints on 3 lines within test.c with C-x C-a C-b - in *gud-gdb*: run --> breakpoint is hit, all is fine - continue --> emacs stalls - after pressing C-g, it unstalls It works if I connect to an ssh server that is not in a docker container. It also works if I use my personal Debian GNU/Linux machine instead of a mac. In tramp debug buffer, I see the following: 11:58:17.969961 tramp-accept-process-output (10) # backtrace() tramp-error((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) quit "") tramp-signal-hook-function(quit nil) accept-process-output(#<process *tramp/ssh test <at> localhost#2222*> nil nil t) tramp-accept-process-output(#<process *tramp/ssh test <at> localhost#2222*>) tramp-wait-for-regexp(#<process *tramp/ssh test <at> localhost#2222*> nil "\\(^\\|\0\\)[^#$\n]*///f743817e0468bdcc00a56151a4c9b874...") tramp-wait-for-output(#<process *tramp/ssh test <at> localhost#2222*>) tramp-send-command((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) "test -e /home/test/test.c 2>/dev/null; echo tramp_...") tramp-send-command-and-check((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) "test -e /home/test/test.c") tramp-sh-handle-file-exists-p("/ssh:test <at> localhost#2222:/home/test/test.c") apply(tramp-sh-handle-file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") tramp-sh-file-name-handler(file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") apply(tramp-sh-file-name-handler file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") tramp-file-name-handler(file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") file-exists-p("/ssh:test <at> localhost#2222:/home/test/test.c") gud-file-name("/home/test/test.c") gud-find-file("/home/test/test.c") gud-display-line("/home/test/test.c" 2) gud-display-frame() gdb-frame-handler() gdb-handle-reply(29) gdb-done-or-error("29" done "frame={level=\"0\",addr=\"0x000055e839174131\",func=\"m..." t) gdb-done("29" "frame={level=\"0\",addr=\"0x000055e839174131\",func=\"m..." t) gdbmi-bnf-incomplete-record-result("29" (gdb-done . progressive)) #f(compiled-function () #<bytecode 0x1fdfe192a9cab>)() gdbmi-bnf-result-and-async-record-impl() gdbmi-bnf-async-record() gdbmi-bnf-out-of-band-record() gdbmi-bnf-output() gud-gdbmi-marker-filter("cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") apply(gud-gdbmi-marker-filter "cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") gud-marker-filter("cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") gud-filter(#<process gud-test> "cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") 11:58:17.970127 tramp-accept-process-output (1) # Quit: "Quit", "" In *Messages* I would see: Quit: "Quit", "" error in process filter: Quit [2 times] WARNING! Discarding GDB handler with token #29 I don't know if the following is related as I observe it also in cases when it works. In *input/output of test* buffer, i see: &"warning: GDB: Failed to set controlling terminal: Operation not permitted\n" In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin21.3.0, NS appkit-2113.30 Version 12.2.1 (Build 21D62)) of 2022-03-09 built on apopadic.local Repository revision: fab840e381db8b5fd226f59d976abd3e4f16bec4 Repository branch: master Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.2.1 Configured using: 'configure --with-ns --with-mailutils --with-imagemagick --with-cairo --with-modules --with-xml2 --with-gnutls --with-json --with-rsvg --disable-silent-rules --disable-ns-self-contained --without-dbus' Configured features: ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils gdb-mi gud vc-hg vc-git diff-mode vc-bzr help-fns radix-tree cl-print backtrace help-mode find-func vc-dispatcher cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs noutline outline easy-mmode tramp-cache tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601 time-date ls-lisp format-spec auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs cl-loaddefs cl-lib password-cache json map seq gv subr-x byte-opt bytecomp byte-compile cconv iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 183353 15572) (symbols 48 11873 1) (strings 32 38355 2131) (string-bytes 1 1370631) (vectors 16 23415) (vector-slots 8 311949 29985) (floats 8 212 243) (intervals 56 30433 0) (buffers 992 20)) Best regards Aleksandar Popadić
[Dockerfile (application/octet-stream, attachment)]
bug-gnu-emacs <at> gnu.org
:bug#54353
; Package emacs
.
(Sat, 12 Mar 2022 17:42:02 GMT) Full text and rfc822 format available.Message #8 received at 54353 <at> debbugs.gnu.org (full text, mbox):
From: Michael Albinus <michael.albinus <at> gmx.de> To: Aleksandar Popadić <aleksandar.popadic <at> siol.net> Cc: 54353 <at> debbugs.gnu.org Subject: Re: bug#54353: 29.0.50; macOS: gdb over ssh into docker stalls Date: Sat, 12 Mar 2022 18:41:35 +0100
Aleksandar Popadić <aleksandar.popadic <at> siol.net> writes: Hi Aleksandar, > In tramp debug buffer, I see the following: > 11:58:17.969961 tramp-accept-process-output (10) # > backtrace() > tramp-error((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) quit "") > tramp-signal-hook-function(quit nil) > accept-process-output(#<process *tramp/ssh test <at> localhost#2222*> nil nil t) > tramp-accept-process-output(#<process *tramp/ssh test <at> localhost#2222*>) > tramp-wait-for-regexp(#<process *tramp/ssh test <at> localhost#2222*> nil "\\(^\\|\0\\)[^#$\n]*///f743817e0468bdcc00a56151a4c9b874...") > tramp-wait-for-output(#<process *tramp/ssh test <at> localhost#2222*>) > tramp-send-command((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) "test -e /home/test/test.c 2>/dev/null; echo tramp_...") > tramp-send-command-and-check((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) "test -e /home/test/test.c") > tramp-sh-handle-file-exists-p("/ssh:test <at> localhost#2222:/home/test/test.c") > apply(tramp-sh-handle-file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") > tramp-sh-file-name-handler(file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") > apply(tramp-sh-file-name-handler file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") > tramp-file-name-handler(file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c") > file-exists-p("/ssh:test <at> localhost#2222:/home/test/test.c") > gud-file-name("/home/test/test.c") > gud-find-file("/home/test/test.c") > gud-display-line("/home/test/test.c" 2) > gud-display-frame() > gdb-frame-handler() > gdb-handle-reply(29) > gdb-done-or-error("29" done "frame={level=\"0\",addr=\"0x000055e839174131\",func=\"m..." t) > gdb-done("29" "frame={level=\"0\",addr=\"0x000055e839174131\",func=\"m..." t) > gdbmi-bnf-incomplete-record-result("29" (gdb-done . progressive)) > #f(compiled-function () #<bytecode 0x1fdfe192a9cab>)() > gdbmi-bnf-result-and-async-record-impl() > gdbmi-bnf-async-record() > gdbmi-bnf-out-of-band-record() > gdbmi-bnf-output() > gud-gdbmi-marker-filter("cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") > apply(gud-gdbmi-marker-filter "cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") > gud-marker-filter("cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") > gud-filter(#<process gud-test> "cx\",\"edx\",\"esi\",\"edi\",\"ebp\",\"esp\",\"r8d\",\"r9d\",\"r10...") > 11:58:17.970127 tramp-accept-process-output (1) # Quit: "Quit", "" I'm not an expert in macOS or docker. But in order to analyze Tramp traces, I would need the complete Tramp debug buffer. All what I could tell from the snippet above is, that Tramp has been invoked with (file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c"), which looks proper. > Best regards > Aleksandar Popadić Best regards, Michael.
bug-gnu-emacs <at> gnu.org
:bug#54353
; Package emacs
.
(Sun, 13 Mar 2022 22:03:02 GMT) Full text and rfc822 format available.Message #11 received at 54353 <at> debbugs.gnu.org (full text, mbox):
From: Aleksandar Popadić <aleksandar.popadic <at> siol.net> To: "Michael Albinus" <michael.albinus <at> gmx.de> Cc: 54353 <at> debbugs.gnu.org Subject: Re: bug#54353: 29.0.50; macOS: gdb over ssh into docker stalls Date: Sun, 13 Mar 2022 22:15:36 +0100
[Message part 1 (text/plain, inline)]
On Sat, 12 Mar 2022, at 18:41, Michael Albinus wrote: > I'm not an expert in macOS or docker. But in order to analyze Tramp > traces, I would need the complete Tramp debug buffer. All what I could > tell from the snippet above is, that Tramp has been invoked with > (file-exists-p "/ssh:test <at> localhost#2222:/home/test/test.c"), which > looks proper. Hello Michael, Thank you for having a look. The full debug buffer is in the attachment. Best regards, Aleksandar Popadić
[tramp_debug.txt (text/plain, attachment)]
bug-gnu-emacs <at> gnu.org
:bug#54353
; Package emacs
.
(Mon, 14 Mar 2022 08:56:02 GMT) Full text and rfc822 format available.Message #14 received at 54353 <at> debbugs.gnu.org (full text, mbox):
From: Michael Albinus <michael.albinus <at> gmx.de> To: Aleksandar Popadić <aleksandar.popadic <at> siol.net> Cc: 54353 <at> debbugs.gnu.org Subject: Re: bug#54353: 29.0.50; macOS: gdb over ssh into docker stalls Date: Mon, 14 Mar 2022 09:55:05 +0100
Aleksandar Popadić <aleksandar.popadic <at> siol.net> writes: > Hello Michael, Hi Aleksandar, > Thank you for having a look. The full debug buffer is in the attachment. Thanks. Tramp is stalled with the following command: --8<---------------cut here---------------start------------->8--- > 11:57:25.692757 tramp-send-command (6) # (env QUOTING_STYLE=locale \stat -c '((/////%N/////) %h %u %g %X %Y %Z %s /////%A///// t %i -1)' /home/test/test.c | sed -e 's/"/\\"/g' -e 's/\/\/\/\/\//"/g') 2>/dev/null; echo tramp_exit_status $? > 11:57:30.045884 tramp-accept-process-output (10) # > backtrace() > tramp-error((tramp-file-name "ssh" "test" nil "localhost" "2222" "/home/test/test.c" nil) quit "") > tramp-signal-hook-function(quit nil) > accept-process-output(#<process *tramp/ssh test <at> localhost#2222*> nil nil t) --8<---------------cut here---------------end--------------->8--- This is surprising, because earlier, the same command has worked: --8<---------------cut here---------------start------------->8--- > 11:56:35.016412 tramp-send-command (6) # (env QUOTING_STYLE=locale \stat -c '((/////%N/////) %h %u %g %X %Y %Z %s /////%A///// t %i -1)' /home/test/test.c | sed -e 's/"/\\"/g' -e 's/\/\/\/\/\//"/g') 2>/dev/null; echo tramp_exit_status $? > 11:56:35.021660 tramp-wait-for-regexp (6) # > (("/home/test/test.c") 1 0 0 1647006732 1647006732 1647006732 58 "-rw-r--r--" t 2402017 -1) > tramp_exit_status 0 > ///4280109f2bf4b7826b57e0f5b8825a1d#$ --8<---------------cut here---------------end--------------->8--- So the traces don't show anything useful, sorry. > Best regards, > Aleksandar Popadić Best regards, Michael.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.