From: Davis Herring <herring@lanl.gov>
To: Alexander Shukaev <emacs@alexander.shukaev.name>
Cc: Noam Postavsky <npostavs@gmail.com>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: Emacs Hangs on Filesystem Operations on Stale NFS
Date: Tue, 12 Jun 2018 11:26:55 -0600 [thread overview]
Message-ID: <b64edef7-1142-aa3d-38e0-ab8666d11d94@lanl.gov> (raw)
In-Reply-To: <7466e2d177e79983436af2425ceb5b54@alexander.shukaev.name>
> signal.alarm(3)
> try:
> proc = subprocess.call('stat ' + path,
> shell=True,
> stderr=subprocess.PIPE,
> stdout=subprocess.PIPE)
You're sending SIGALRM to the _parent_, not the (possibly-frozen)
stat(1) child. Of course that works; you're just interrupting normal
pipe I/O with (or wait(2) on) the child.
Emacs can't possibly do all of its file operations in subprocesses. A
complete redesign might allow the "process per tab" model used in some
modern browsers, but that would break much of existing Lisp. It might
just be possible to have a "file server process" that could be killed
and reincarnated as needed, but I wouldn't want to promise much about
performance (and support for concurrent I/O).
Incidentally, don't mix call() and communicate(), and avoid
"shell=True", especially when the replacement is easier:
proc = subprocess.Popen(['stat', path],
stderr=subprocess.PIPE,
stdout=subprocess.PIPE)
[From a later message:]
> There are plenty of other ways why those file operations might hang.
> For example, [1].
>
> [1] http://unix.stackexchange.com/questions/63071/local-regular-file-causes-stat-or-ls-l-to-hang
The (single, accepted) answer there says that it was an LDAP issue
looking up user/group names. That's not a file operation at all.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
next prev parent reply other threads:[~2018-06-12 17:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 10:27 Emacs Hangs on Filesystem Operations on Stale NFS Alexander Shukaev
2018-06-11 11:01 ` Andreas Schwab
2018-06-11 11:05 ` Alexander Shukaev
2018-06-11 11:50 ` Andreas Schwab
2018-06-11 12:03 ` Alexander Shukaev
2018-06-11 11:55 ` Alexander Shukaev
2018-06-11 11:59 ` Noam Postavsky
2018-06-11 12:11 ` Alexander Shukaev
2018-06-11 12:20 ` Noam Postavsky
2018-06-11 12:22 ` Alexander Shukaev
2018-06-11 12:34 ` Noam Postavsky
2018-06-11 12:41 ` Alexander Shukaev
2018-06-11 12:40 ` Andreas Schwab
2018-06-11 12:46 ` Alexander Shukaev
2018-06-11 15:51 ` Eli Zaretskii
2018-06-13 15:40 ` Paul Eggert
2018-06-12 17:26 ` Davis Herring [this message]
2018-06-12 18:26 ` Perry E. Metzger
2018-06-11 15:04 ` Stefan Monnier
2018-06-11 16:46 ` Mike Kupfer
2018-06-11 17:08 ` Stefan Monnier
2018-06-13 10:45 ` Alexander Shukaev
2018-06-13 12:35 ` Yuri Khan
2018-06-13 14:23 ` Stefan Monnier
2018-06-13 15:30 ` Yuri Khan
2018-06-13 18:09 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b64edef7-1142-aa3d-38e0-ab8666d11d94@lanl.gov \
--to=herring@lanl.gov \
--cc=emacs-devel@gnu.org \
--cc=emacs@alexander.shukaev.name \
--cc=npostavs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.