GNU bug report logs - #37299
26.3; Emacs on OSX crashes when clicking menu items while using tramp

Previous Next

Package: emacs;

Reported by: kiran.dasoju <at> broadcom.com

Date: Wed, 4 Sep 2019 01:22:01 UTC

Severity: normal

Tags: confirmed

Merged with 24472, 37557

Found in versions 25.1, 26.3, 27.0.50

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37299 in the body.
You can then email your comments to 37299 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Wed, 04 Sep 2019 01:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to kiran.dasoju <at> broadcom.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Sep 2019 01:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: kiran.dasoju <at> broadcom.com
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; Emacs on OSX crashes when clicking menu items while using tramp
Date: Tue, 03 Sep 2019 16:28:38 -0700
[Message part 1 (text/plain, inline)]
I am running emacs on Mac machine, when i connect to a remote machine
over tramp start using menu items, after few clicks emacs crashes.
Attached is the crash report from the mac's Console app
[Emacs-x86_64-10_14_2019-09-03-003850_C02RR684G8WP.crash (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]



In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
 of 2019-09-02 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1671
Recent messages:
[2019-09-03 16:20:53] ‘*scratch*’ [6 259200]
[2019-09-03 16:20:53] ‘ *Minibuf-0*’ [6 259200]
[2019-09-03 16:20:53] ‘*Messages*’ [0 259200]
[2019-09-03 16:20:53] ‘ *code-conversion-work*’ [0 259200]
[2019-09-03 16:20:53] ‘ *pdf-info-query--escape*’ [0 259200]
[2019-09-03 16:20:53] ‘ *Echo Area 0*’ [0 259200]
[2019-09-03 16:20:53] ‘ *Echo Area 1*’ [0 259200]
[2019-09-03 16:20:53] ‘*debug tramp/ssh kd904675 <at> lvnvdc1753.lvn.broadcom.net*’ [0 259200]
[2019-09-03 16:20:53] ‘*tramp/ssh kd904675 <at> lvnvdc1753.lvn.broadcom.net*’ [0 259200]
[2019-09-03 16:20:53] ‘*debug tramp/nil nil*’ [0 259200]

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  ivy-rich-mode: t
  ivy-mode: t
  helm-mode: t
  shell-dirtrack-mode: t
  async-bytecomp-package-mode: t
  global-linum-mode: t
  linum-mode: t
  global-auto-revert-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  display-time-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  pdf-occur-global-minor-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/kd904675/.emacs.d/elpa/auth-source-pass-20190628.650/auth-source-pass hides /Applications/Emacs.app/Contents/Resources/lisp/auth-source-pass
/Users/kd904675/.emacs.d/elpa/verilog-mode-2019.6.21.103209889/verilog-mode hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/verilog-mode
/Users/kd904675/.emacs.d/elpa/soap-client-3.1.5/soap-client hides /Applications/Emacs.app/Contents/Resources/lisp/net/soap-client
/Users/kd904675/.emacs.d/elpa/soap-client-3.1.5/soap-inspect hides /Applications/Emacs.app/Contents/Resources/lisp/net/soap-inspect
/Users/kd904675/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mail-utils server files-x noutline outline
tramp-cache tramp-sh elec-pair expand-region text-mode-expansions
er-basic-expansions expand-region-core expand-region-custom tramp-term
counsel xdg xref project swiper cl-extra help-mode ivy-rich subr-x ivy
colir color ivy-overlay helm-mode helm-files image-dired dired-x
dired-aux ffap helm-buffers helm-occur helm-tags helm-locate helm-grep
pcase helm-regexp helm-utils helm-help helm-types helm-tramp tramp
tramp-compat tramp-loaddefs trampver shell pcomplete parse-time
helm-config helm-easymenu async-bytecomp helm helm-source eieio-compat
helm-multi-match helm-lib async list-register register-list linum
windmove framemove autorevert filenotify diary-lib diary-loaddefs
cal-menu calendar cal-loaddefs midnight browse-kill-ring derived cl
shell-completion shell-command shell-pop term disp-table ehelp
highlight-symbol thingatpt backup-dir extraedit goto-last-change
highline mm-util mail-prsvr paren delsel protbuf time point-stack wgrep
grep grep-edit moccur-edit color-moccur edmacro kmacro tabbar crosshairs
col-highlight easy-mmode vline hl-line+ hl-line himark filesets
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local find-func cedet dired dired-loaddefs pdf-isearch
let-alist pdf-misc imenu pdf-tools compile comint ansi-color ring
cus-edit cus-start cus-load wid-edit pdf-view bookmark pp jka-compr
pdf-cache pdf-info tq pdf-util advice format-spec image-mode finder-inf
info package easymenu epg-config url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars
seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 548912 23273)
 (symbols 48 41626 5)
 (miscs 40 73 377)
 (strings 32 120382 3401)
 (string-bytes 1 3480522)
 (vectors 16 63460)
 (vector-slots 8 1314507 18456)
 (floats 8 331 167)
 (intervals 56 6734 4528)
 (buffers 992 15))

Merged 24472 37299. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Wed, 04 Sep 2019 07:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Wed, 04 Sep 2019 08:01:02 GMT) Full text and rfc822 format available.

Message #10 received at 37299 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: kiran.dasoju <at> broadcom.com
Cc: 37299 <at> debbugs.gnu.org
Subject: Re: bug#37299: 26.3; Emacs on OSX crashes when clicking menu items
 while using tramp
Date: Wed, 04 Sep 2019 10:00:36 +0200
kiran.dasoju--- via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

Hi,

> I am running emacs on Mac machine, when i connect to a remote machine
> over tramp start using menu items, after few clicks emacs crashes.

Thanks for the report. It is the same as reported under bug number
24472, so I've merged them.

Unfortunately, there's no solution yet. Personally, I don't use macOS,
so I cannot investigate.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Wed, 04 Sep 2019 19:43:01 GMT) Full text and rfc822 format available.

Message #13 received at 37299 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: kiran.dasoju <at> broadcom.com, 37299 <at> debbugs.gnu.org
Subject: Re: bug#37299: 26.3; Emacs on OSX crashes when clicking menu items
 while using tramp
Date: Wed, 04 Sep 2019 21:41:56 +0200
>>>>> On Wed, 04 Sep 2019 10:00:36 +0200, Michael Albinus <michael.albinus <at> gmx.de> said:

    Michael> kiran.dasoju--- via "Bug reports for GNU Emacs, the Swiss army knife of
    Michael> text editors" <bug-gnu-emacs <at> gnu.org> writes:

    Michael> Hi,

    >> I am running emacs on Mac machine, when i connect to a remote machine
    >> over tramp start using menu items, after few clicks emacs crashes.

    Michael> Thanks for the report. It is the same as reported under bug number
    Michael> 24472, so I've merged them.

    Michael> Unfortunately, there's no solution yet. Personally, I don't use macOS,
    Michael> so I cannot investigate.

Iʼve stared at the code, and I canʼt see anything wrong with it. What
kind of debug would you want?

Robert

PS I tried clang's address leak detection, which didnʼt complain about anything.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Wed, 04 Sep 2019 20:10:02 GMT) Full text and rfc822 format available.

Message #16 received at 37299 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: kiran.dasoju <at> broadcom.com, 37299 <at> debbugs.gnu.org
Subject: Re: bug#37299: 26.3; Emacs on OSX crashes when clicking menu items
 while using tramp
Date: Wed, 04 Sep 2019 22:09:35 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

Hi Robert,

>     Michael> Unfortunately, there's no solution yet. Personally, I
>     Michael> don't use macOS,
>     Michael> so I cannot investigate.
>
> Iʼve stared at the code, and I canʼt see anything wrong with it. What
> kind of debug would you want?

Nothing, because I believe it is rather an error related to macOS. Tramp
is just the trigger, but I cannot see any reason how Tramp could trigger
Emacs to crash.

Maybe you try to reproduce the problem, and check the traces in gdb then?

> Robert

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Thu, 05 Sep 2019 09:34:02 GMT) Full text and rfc822 format available.

Message #19 received at 37299 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: kiran.dasoju <at> broadcom.com, 37299 <at> debbugs.gnu.org
Subject: Re: bug#37299: 26.3; Emacs on OSX crashes when clicking menu items
 while using tramp
Date: Thu, 05 Sep 2019 11:33:20 +0200
>>>>> On Wed, 04 Sep 2019 22:09:35 +0200, Michael Albinus <michael.albinus <at> gmx.de> said:

    Michael> Robert Pluim <rpluim <at> gmail.com> writes:
    Michael> Hi Robert,

    Michael> Unfortunately, there's no solution yet. Personally, I
    Michael> don't use macOS,
    Michael> so I cannot investigate.
    >> 
    >> Iʼve stared at the code, and I canʼt see anything wrong with it. What
    >> kind of debug would you want?

    Michael> Nothing, because I believe it is rather an error related to macOS. Tramp
    Michael> is just the trigger, but I cannot see any reason how Tramp could trigger
    Michael> Emacs to crash.

    Michael> Maybe you try to reproduce the problem, and check the traces in gdb then?

I can reproduce it, but it doesnʼt really help:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff5c41a016 libsystem_kernel.dylib`__abort_with_payload + 10
    frame #1: 0x00007fff5c4155db libsystem_kernel.dylib`abort_with_payload_wrapper_internal + 82
    frame #2: 0x00007fff5c415589 libsystem_kernel.dylib`abort_with_reason + 22
    frame #3: 0x00007fff5aafb8dd libobjc.A.dylib`_objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 108
    frame #4: 0x00007fff5aafb78f libobjc.A.dylib`_objc_fatal(char const*, ...) + 135
    frame #5: 0x00007fff5aaee563 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 941
    frame #6: 0x00007fff303415ea CoreFoundation`_CFAutoreleasePoolPop + 22
    frame #7: 0x00007fff325ba0e3 Foundation`-[NSAutoreleasePool release] + 144
    frame #8: 0x00000001001e8635 emacs`ns_update_menubar(f=<unavailable>, deep_p=<unavailable>, submenu=<unavailable>) at nsmenu.m:0:5 [opt]
    frame #9: 0x00000001001e867e emacs`ns_activate_menubar(f=<unavailable>) at nsmenu.m:476:3 [opt]
    frame #10: 0x00000001000c880e emacs`read_char at keyboard.c:3894:6 [opt]
    frame #11: 0x00000001000c7ff8 emacs`read_char [inlined] read_event_from_main_queue(end_time=0x0000000000000000, local_getcjmp=0x00000001051ba0a0, used_mouse_menu=0x00007ffeefbff1db) at keyboard.c:2136 [opt]
    frame #12: 0x00000001000c7e88 emacs`read_char at keyboard.c:2200 [opt]
    frame #13: 0x00000001000c7e4d emacs`read_char(commandflag=1, map=0x00000001039609a3, prev_event=0x0000000000000000, used_mouse_menu=0x00007ffeefbff1db, end_time=0x0000000000000000) at keyboard.c:2808 [opt]
    frame #14: 0x00000001000c4b1b emacs`read_key_sequence(keybuf=<unavailable>, prompt=0x0000000000000000, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=<unavailable>) at keyboard.c:9125:12 [opt]
    frame #15: 0x00000001000c32dc emacs`command_loop_1 at keyboard.c:1345:15 [opt]
    frame #16: 0x000000010014a029 emacs`internal_condition_case(bfun=(emacs`command_loop_1 at keyboard.c:1236), handlers=0x0000000000000090, hfun=<unavailable>) at eval.c:1355:25 [opt]
    frame #17: 0x00000001000d25b0 emacs`command_loop_2(ignore=<unavailable>) at keyboard.c:1091:11 [opt]
    frame #18: 0x00000001001496f7 emacs`internal_catch(tag=0x000000000000c4b0, func=(emacs`command_loop_2 at keyboard.c:1087), arg=0x0000000000000000) at eval.c:1116:25 [opt]
    frame #19: 0x00000001000c22ee emacs`command_loop at keyboard.c:1070:2 [opt]
    frame #20: 0x00000001000c2203 emacs`recursive_edit_1 at keyboard.c:714:9 [opt]
    frame #21: 0x00000001000c24ab emacs`Frecursive_edit at keyboard.c:786:3 [opt]
    frame #22: 0x00000001000c0bd2 emacs`main(argc=<unavailable>, argv=0x00007ffeefbff668) at emacs.c:2086:3 [opt]
    frame #23: 0x00007fff5c2c73d5 libdyld.dylib`start + 1
    frame #24: 0x00007fff5c2c73d5 libdyld.dylib`start + 1

Which just tells us that

  /* set main menu */
  if (needsSet)
    [NSApp setMainMenu: menu];

  [pool release]; <= This causes the crash
  unblock_input ();

but not what object is at fault. Removing that [pool release] fixes
the crash, but probably means leaking memory.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Thu, 05 Sep 2019 13:11:02 GMT) Full text and rfc822 format available.

Message #22 received at 37299 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: kiran.dasoju <at> broadcom.com, 37299 <at> debbugs.gnu.org
Subject: Re: bug#37299: 26.3; Emacs on OSX crashes when clicking menu items
 while using tramp
Date: Thu, 05 Sep 2019 15:10:24 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Which just tells us that
>
>   /* set main menu */
>   if (needsSet)
>     [NSApp setMainMenu: menu];
>
>   [pool release]; <= This causes the crash
>   unblock_input ();
>
> but not what object is at fault. Removing that [pool release] fixes
> the crash, but probably means leaking memory.

And it doesn't explain how it's related to Tramp.

> Robert

Best regards, Michael.




Merged 24472 37299 37557. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2019 15:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37299; Package emacs. (Tue, 31 Mar 2020 15:37:04 GMT) Full text and rfc822 format available.

Message #27 received at 37299 <at> debbugs.gnu.org (full text, mbox):

From: Carl Winbäck <c <at> tunnel53.net>
To: 37299 <at> debbugs.gnu.org
Subject: Observations regard bug #37299
Date: Tue, 31 Mar 2020 13:37:07 +0200
Hello friends,

I was hit by this bug and have made some observations about it.

The bug affects some, but not all, Emacs ”distributions” for macOS.

These packages are affected by the bug: ”Emacs-26.3-universal.dmg” and
”Emacs-2020-03-26_01-40-23-fe6b8c91cb7a3c1959f7fb2b43f73cc7f7fc9fc3-universal.dmg”
from https://emacsformacosx.com/

Another package that is also affected is ”Emacs-26.3-modified-2.dmg”,
available at https://vigou3.gitlab.io/emacs-modified-macos/

However, I have also tried the package
”emacs-26.3-mac-7.9-10.14.4.zip”. That package is *not* affected by
this bug.  It’s available at
https://github.com/railwaycat/homebrew-emacsmacport or via homebrew.

The source itself seems to be available here:
https://bitbucket.org/mituharu/emacs-mac/src/master/

So what conclusions can we draw from these facts? Apparently there are
clues here that could help us to find the bug.

According to the info in the file README-mac[1], that source
distribution is modified quite heavily compared to ”stock” Emacs. At
this point I don’t know what it does differently when it comes to
e.g. tramp mode or menu implementation.

Is there anyone who would like to take a guess about why that package
manage to avoid this bug?

[1] https://bitbucket.org/mituharu/emacs-mac/src/master/README-mac




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 31 Jan 2021 12:24:05 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Marc Herbert <marc.herbert <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 18 Mar 2021 20:24:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 May 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 6 days ago.

Previous Next


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