Subject: bug#30387: 26.0.91; lisp_align_free is hanging Emacs on macOS 10.12

From: "John Wiegley" <[email-masked]>
Date: Thu, 08 Feb 2018 00:34:09 -0800

I've been unable to find reproducible conditions for this bug, since it only
happens after Emacs (built from emacs-26 release branch) has been running for
many hours. Basically, Emacs deadlocks -- showing the spinning beach ball of
death -- and when I sample the process using Instruments.app, I find that it's
gotten stuck in lisp_align_free.

Looking at that function, I see this loop:

      while (*tem)
	{
	  if (*tem >= (struct ablock *) abase && *tem < atop)
	    {
	      i++;
	      *tem = (*tem)->x.next_free;
	    }
	  else
	    tem = &(*tem)->x.next_free;
	}

There is no loop guard here to detect cycles, if that's what is happening.

I'll start running with full debugging on over the next few days to see if
that reveals how I'm getting stuck in this situation, but as for now, it has
required kill'ing Emacs twice in the past week.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2