简体   繁体   English

Flymake与xmlstarlet和流氓挂emacs

[英]Flymake with xmlstarlet and tramp hangs emacs

I have flymake enabled in my Emacs configuration. 我在Emacs配置中启用了flymake。 Locally it works fine, but when I try to open a remote html file with tramp, Emacs hangs and I have to kill it. 在本地它可以正常工作,但是当我尝试用流浪汉打开一个远程html文件时,Emacs挂起,我必须将其杀死。

I tried to check with gdb, and the top of the stack is as follows: 我尝试检查gdb,并且堆栈的顶部如下:

#0  0x00007fcee786c83c in __pselect (nfds=<optimized out>, readfds=<optimized out>, writefds=<optimized out>, exceptfds=<optimized out>, timeout=<optimized out>, sigmask=<optimized out>)
at ../sysdeps/unix/sysv/linux/pselect.c:79
#1  0x00000000004d02f7 in xg_select (fds_lim=13, rfds=0x7fff4d830210, wfds=0x0, efds=0x0, timeout=0x7fff4d830460, sigmask=0x0) at xgselect.c:48
#2  0x00000000005947f3 in wait_reading_process_output (time_limit=<optimized out>, nsecs=0, read_kbd=0, do_display=false, wait_for_cell=12096626, wait_proc=<optimized out>, just_wait_proc=1) at process.c:4633
#3  0x0000000000597429 in Faccept_process_output (process=56383997, seconds=<optimized out>, millisec=<optimized out>, just_this_one=<optimized out>) at process.c:4026

So it seems that for some reason the xmlstarlet process on the remote machine, but I have no idea why. 因此,由于某种原因,远程机器上的xmlstarlet进程似乎出现了,但是我不知道为什么。

The command that flymake uses should be xmlstarlet val filename.html , which executes with no problems from the command line. flymake使用的命令应该是xmlstarlet val filename.html ,该命令从命令行执行时不会出现问题。 Configuring flymake to use other programs such as tidy or xmllint doesn't change anything. 将flymake配置为使用其他程序(如tidy或xmllint)不会改变任何内容。

Any suggestion on what I could do to be able to debug the issue ? 关于我可以做些什么来调试问题的任何建议?

Edit 编辑

In fact after a while (at least 1 minute) the command completes. 实际上,在一段时间(至少1分钟)后,命令完成。 After the startup there are no longer waits for the same buffer, and flymake works as expected. 启动后,不再需要等待相同的缓冲区,flymake可以按预期工作。

Details on the system 系统细节

I'm connecting from an Ubuntu 12.04 machine. 我正在从Ubuntu 12.04计算机连接。 I tried to connect to a FreeBSD 9.3 machine, but I have the same problem on a DragonflyBSD machine. 我试图连接到FreeBSD 9.3机器,但是在DragonflyBSD机器上也有同样的问题。 The remote shell is zsh on both systems, but changing it to bash doesn't help. 在两个系统上,远程shell均为zsh,但是将其更改为bash并没有帮助。

Stacktrace 堆栈跟踪

This is the full lisp stacktrace I get. 这是我得到的完整lisp stacktrace。

https://gist.github.com/mrighele/8371399 https://gist.github.com/mrighele/8371399

the flymake-html-init is the one presented in the emacs wiki flymake-html-initemacs Wiki中介绍的一种

Interestingly, when I send the signal, the content of the file buffer is overwritten with the following, not sure if it is of any interest. 有趣的是,当我发送信号时,文件缓冲区的内容将被以下内容覆盖,不确定是否有意义。

tramp_perl_file_truename () {
function> \perl5 -e '
function quote> use File::Spec;
function quote> use Cwd "realpath";
function quote> sub recursive {
function quote>     my ($volume, @dirs) = @_;
function quote>     my $real = realpath(File::Spec->catpath(
function quote>                    $volume, File::Spec->catdir(@dirs), ""));
function quote>     if ($real) {
function quote>         my ($vol, $dir) = File::Spec->splitpath($real, 1);
function quote>         return ($vol, File::Spec->splitdir($dir));
function quote>     }
function quote>     else {
function quote>         my $last = pop(@dirs);
function quote>         ($volume, @dirs) = recursive($volume, @dirs);
function quote>         push(@dirs, $last);
function quote>         return ($volume, @dirs);
function quote>     }
function quote> }
function quote> $result = realpath($ARGV[0]);
function quote> if (!$result) {
function quote>     my ($vol, $dir) = File::Spec->splitpath($ARGV[0], 1);
function quote>     ($vol, @dirs) = recursive($vol, File::Spec->splitdir($dir)<sive($vol, File::Spec->splitdir($dir))                                       <sive($vol, File::Spec->splitdir($dir));
function quote>     $result = File::Spec->catpath($vol, File::Spec->catdir(@di<>catpath($vol, File::Spec->catdir(@dir                                       <>catpath($vol, File::Spec->catdir(@dirs), "");
function quote> }
function quote> if ($ARGV[0] =~ /\/$/) {
function quote>     $result = $result . "/";
function quote> }
function quote> print "\"$result\"\n";
function quote> ' "$1" 2>/dev/null
function> } 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0

Try the following: 请尝试以下操作:

(setq debug-on-event 'sigusr2)

and then when Emacs is frozen, do kill -USR2 <emacspid> from a shell. 然后在冻结Emacs时,请从外壳中kill -USR2 <emacspid> That should hopefully give you a lisp-level backtrace which will help track down the problem. 希望这会给您带来一个lisp级的回溯,这将有助于找出问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM