Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-existing tramp function advised in magit-process.el #5109

Open
bramadams opened this issue Mar 13, 2024 · 1 comment
Open

Non-existing tramp function advised in magit-process.el #5109

bramadams opened this issue Mar 13, 2024 · 1 comment

Comments

@bramadams
Copy link

bramadams commented Mar 13, 2024

Hi,

I've been debugging a tramp hanging issue connecting to an Oracle Solaris 11.4.59.144.2 box, where emacs 29.2 would just hang with message "Tramp: Inserting /sshx:i:~/bla.txt’...done", instead of opening that text file in a buffer (outside the context of any git repository). I'm using the latest upstream Magit 28bcd29, Transient 0.5.3, Git 2.39.1, Emacs 29.2, darwin, as well as the most recent tramp 2.6.2.2.

It turns out that :disabled-ing magit in my configuration (using use-package) resolves the problem, i.e., no more hangs (remote files open correctly), even though the accessed file is not at all in any git repository. Ubuntu-based machines seem to not have this issue, but the Solaris box currently cannot be replaced.

Looking into magit's code base, magit's main interactions with tramp seem to be in magit-process.el, in particular:

  1. magit-tramp-pipe-stty-settings

  2. (advice-add 'tramp-sh-handle-start-file-process :around #'tramp-sh-handle-start-file-process--magit-tramp-process-environment)

  3. (advice-add 'tramp-sh-handle-process-file :around #'tramp-sh-handle-process-file--magit-tramp-process-environment)

I tried changing the value of magit-tramp-pipe-stty-settings, and also disabling the two advices, but, none of these seemed to have the same effect as just :disabled-ing magit in my config.

One odd thing, though, is that the first advice (see 2. above) mentions tramp-sh-handle-start-file-process, which no longer exists in tramp's code base, see this commit from December 2018: emacs-mirror/emacs@a94ac60.

From that commit message, it is unclear whether magit's advice should be changed to advise the new tramp-sh-handle-make-process, or the older tramp-handle-start-file-process, and whether any changes are needed in tramp-sh-handle-start-file-process--magit-tramp-process-environment.

Any suggestions on how to fix or work around this tramp hanging issue, possibly involving magit's advised tramp functions?

BA

@tarsius
Copy link
Member

tarsius commented Apr 1, 2024

Thanks for the report and sorry for not replying earlier. I am rather busy, but eventually I will get around to this too. Might still take a while though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants