GNU bug report logs - #38618
27.0.50; Mach port leak on macOS Catalina causing crash

Previous Next

Package: emacs;

Reported by: Phillip Hutchings <phillip <at> iontech.nz>

Date: Sun, 15 Dec 2019 03:44:02 UTC

Severity: normal

Found in version 27.0.50

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Third <alan <at> idiocy.org>
To: Phillip Hutchings <phillip <at> iontech.nz>
Cc: 38618 <at> debbugs.gnu.org
Subject: bug#38618: 27.0.50; Mach port leak on macOS Catalina causing crash
Date: Sun, 15 Dec 2019 14:48:27 +0000
On Sun, Dec 15, 2019 at 02:35:10PM +1300, Phillip Hutchings wrote:
> 
> 
> On macOS Catalina (all versions up to and including 10.15.2), after
> opening a file stored on an iCloud Drive folder Emacs leaks Mach ports
> eventually resulting in an Emacs crash during a random syscall.
> 
> Reproduction:
> * Using Emacs for MacOS X (currently using Nightly build, but also on
> the 26.3 release from 2019-09-02
> * Open a file stored in an iCloud Drive folder, eg Documents when using
> default settings
> * Modify the file, no need to save it, only modify the contents
> * Emacs will leak Mach ports on every edit.
> 
> This does not happen on non-iCloud Drive files, the port count observed 
> in Activity Monitor does not change for these files.
> 
> So far I've removed all customisations, then tried disabling file
> backups and auto saves, and pretty much anything I can think of that
> accesses files. So far I haven't managed to find a cause. 

This sounds strange. I’m not on Catalina, nor do I use icloud, so I
can’t debug this locally.

Can you try enabling NSTRACE (uncomment line 55 in nstrace.h) and then
compare the output when editing a file that doesn’t leak vs one that
does? It might be worth enabling NSTRACE_GROUP_EVENTS too, but it
results in a ton of output, so perhaps try without it first.

Oh, and can you try testing with ‘emacs -nw’, just in case it’s not
related to the window system code.
-- 
Alan Third




This bug report was last modified 5 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.