emacs UI hang: viewing a thread where msg has .tgz attachment with symlink to ..

Subject: emacs UI hang: viewing a thread where msg has .tgz attachment with symlink to ..

Date: Thu, 17 Jul 2014 20:11:28 -0400

To: notmuch@notmuchmail.org


From: Sanjoy Mahajan

When I view one particular thread, in which one of the messages has a
.tgz attachment, emacs hangs for at least 2-3 minutes before I stop it
with ctrl-g.  An strace on the emacs process shows an endless series of
stats and opens such as:


Those are undoubtedly from the message with the .tgz attachment, which
all untars to src/ and has src/course as a symlink to ..:

$ tar -tvf 6.SFMx-source.tgz | grep src/course
lrwxrwxrwx sanjoy/sanjoy      0 2014-04-22 14:59 src/course -> ..

So I wonder whether notmuch-emacs is trying to untar the attachment and
then makes an ever more nested version of it, and never stops.  (As a
test, I visited the .tgz file directly in Emacs [with C-x C-f] but that
caused no problem.  So I think it is something specific to the notmuch
emacs interface.)

When I ctrl-g the emacs, I get a view of the thread in notmuch-show
mode, but perhaps not surprisingly it is slightly incorrect (see
attached screenshot).  The last message's information and content (from
the "Subject:" line onward) should be indented one space to line up
under the "Sanjoy Mahajan...07:11".

I'm using notmuch and notmuch-emacs 0.18.1-1 (Debian/i386 pkg) and emacs

If there is further debugging information that would help, or tests that
I should run, let me know.