Package: emacs;
Reported by: Christian Johansson <christian <at> cvj.se>
Date: Wed, 29 Jan 2020 11:29:01 UTC
Severity: normal
Found in version 27.0.50
To reply to this bug, email your comments to 39343 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#39343
; Package emacs
.
(Wed, 29 Jan 2020 11:29:02 GMT) Full text and rfc822 format available.Christian Johansson <christian <at> cvj.se>
:bug-gnu-emacs <at> gnu.org
.
(Wed, 29 Jan 2020 11:29:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Christian Johansson <christian <at> cvj.se> To: bug-gnu-emacs <at> gnu.org Subject: 27.0.50; Thrad signal crashes Emacs with sgmentation fault Date: Wed, 29 Jan 2020 12:27:19 +0100
Running following works on Linux but not on macOS. (let ((loop t) (iterations 1)) (while loop (make-thread (lambda() (message "Thread %d" iterations) (signal 'error (list "My error")))) (setq iterations (1+ iterations)))) Error in console: Fatal error 11: Segmentation faultAbort trap: 6 It seems to be some kind of issue with quitting threads on macOS which is not present on Linux In GNU Emacs 27.0.50 (build 5, x86_64-apple-darwin18.5.0, NS appkit-1671.40 Version 10.14.4 (Build 18E226)) of 2019-07-12 built on Christians-MacBook-Air.local Repository revision: 8179cbff9ed37e7d8892643859adfad448ae1c7a Repository branch: master Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.2 Recent messages: Getting /ftp:neojungiantypology.com <at> ftp.neojungiantypology.com:/.htaccess...done Wrote /Users/christianjohansson/.emacs.d/.emacs.desktop.lock Desktop: 1 frame, 27 buffers restored. Initializing Hyperbole...done Hyperbole 7.0.6 is ready for action. For information about GNU Emacs and the GNU system, type C-h C-a. Ispell process killed Starting new Ispell process /usr/local/bin/hunspell with svenska dictionary... Source file ‘/Users/christianjohansson/Documents/emacs/lisp/mail/emacsbug.el’ newer than byte-compiled file Source file ‘/Users/christianjohansson/Documents/emacs/lisp/mail/sendmail.el’ newer than byte-compiled file Configured features: RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS PDUMPER GMP Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: global-hl-todo-mode: t flycheck-color-mode-line-mode: t show-paren-mode: t save-place-mode: t global-diff-hl-mode: t diff-hl-mode: t ssh-deploy-line-mode: t global-auto-complete-mode: t flyspell-mode: t editorconfig-mode: t which-key-mode: t csv-field-index-mode: t global-flycheck-mode: t flycheck-mode: t async-bytecomp-package-mode: t yas-global-mode: t yas-minor-mode: t override-global-mode: t ido-everywhere: t display-time-mode: t winner-mode: t electric-pair-mode: t desktop-save-mode: t recentf-mode: t global-semantic-mru-bookmark-mode: t global-semanticdb-minor-mode: t global-semantic-idle-completions-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-local-symbol-highlight-mode: t global-semantic-idle-summary-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t global-semantic-stickyfunc-mode: t global-semantic-show-parser-state-mode: t global-semantic-highlight-edits-mode: t semantic-mode: t delete-selection-mode: t display-battery-mode: t global-whitespace-mode: t which-function-mode: t shell-dirtrack-mode: t tooltip-mode: t global-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 window-divider-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t transient-mark-mode: t Load-path shadows: /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-analyzer hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode-analyzer /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-tags hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode-tags /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-macros hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode-macros /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-semantic hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode-semantic /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-syntax-table hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode-syntax-table /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-flymake hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode-flymake /Users/christianjohansson/.emacs.d/phps-mode/phps-mode hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190930.1742/phps-mode /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20190917.530/ssh-deploy /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20190917.530/ssh-deploy-diff-mode /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-hydra hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20190917.530/ssh-deploy-hydra /Users/christianjohansson/.emacs.d/elpa/less-css-mode-20161001.453/less-css-mode hides /Users/christianjohansson/Documents/emacs/lisp/textmodes/less-css-mode /Users/christianjohansson/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /Users/christianjohansson/Documents/emacs/lisp/emacs-lisp/let-alist /Users/christianjohansson/Documents/emacs/lisp/sb-image hides /Users/christianjohansson/Documents/emacs/lisp/obsolete/sb-image /Users/christianjohansson/Documents/emacs/lisp/url/url-ns hides /Users/christianjohansson/Documents/emacs/lisp/obsolete/url-ns /Users/christianjohansson/Documents/emacs/lisp/emacs-lisp/cl hides /Users/christianjohansson/Documents/emacs/lisp/obsolete/cl Features: (shadow mail-extr emacsbug sendmail ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util tramp-cache epa-file ange-ftp tramp-ftp apache-mode eww mm-url url-queue shr svg org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rfc822 mml mml-sec epa epg mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs text-property-search org-docview org-bibtex bibtex org-bbdb org-w3m semantic/imenu semantic/sb semantic/tag-file semantic/db-file data-debug cedet-files semantic/bovine/c semantic/decorate/include hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze/refs bug-reference display-line-numbers rainbow-mode hl-todo flycheck-rust flycheck-color-mode-line face-remap editorconfig-core editorconfig-core-handle editorconfig-fnmatch vc-git init rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap smartparens-html sgml-mode dom nxml-util nxml-enc xmltok misc ts-comint tss log4e helm helm-source helm-multi-match helm-lib json-mode json-reformat json-snatcher tide tide-lv typescript-mode zenburn-theme smarty-mode paren saveplace restclient smex flycheck-pos-tip pos-tip diff-hl vc-dir ewoc vc vc-dispatcher diff-mode exec-path-from-shell ssh-deploy-hydra ssh-deploy nginx-mode ac-html ac-html-core auto-complete-config auto-complete popup ztree ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util gulp-task-runner grunt powerline powerline-separators powerline-themes phpcbf php-auto-yasnippets php-mode add-log cc-langs php-face php php-project mmm-mode mmm-univ mmm-class mmm-region mmm-auto mmm-vars mmm-utils mmm-compat php-eldoc phps-mode derived phps-mode-tags phps-mode-syntax-table phps-mode-semantic semantic/doc phps-mode-flymake phps-mode-analyzer semantic/wisent semantic/wisent/wisent phps-mode-wy-macros phps-mode-serial phps-mode-macros web-beautify w3m doc-view jka-compr image-mode timezone w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-favicon w3m-image w3m-proc w3m-util hydra lv hl-line auto-dictionary flyspell ispell editorconfig ansible-doc org-jira org-jira-sdk jiralib request autorevert filenotify mail-utils soap-client mm-decode mm-bodies mm-encode url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc puny rng-xsd rng-dt rng-util xsd-regexp xml org-clock ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload radix-tree ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout ecb-compilation ecb-common-browser speedbar sb-image dframe ecb-navigate eieio-compat ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-find semantic/db-ref ecb-util which-key csv-mode sort flycheck-package package-lint let-alist finder finder-inf lisp-mnt flycheck flymake-rust flymake-easy flymake-proc flymake rust-playground time-stamp cargo cargo-process smartparens-markdown markdown-mode color smartparens-rust rust-mode image+ image-file google-translate google-translate-default-ui google-translate-core-ui google-translate-core google-translate-tk google-translate-backend url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap lorem-ipsum hyperbole hinit hibtypes hib-doc-id hsys-www klink hib-kbd hib-social hib-debbugs hsys-org org-element avl-tree smartparens-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities time-date org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs hactypes hui-mini hui hui-mouse hmouse-key hargs hui-menu hyrolo-menu hyrolo hmail hui-jmenu noutline outline hmouse-sh hmouse-drv hypb locate dired dired-loaddefs hui-window hycontrol hsettings hui-em-but hbut hact hpath hhist hbdata htz cal-julian cal-menu calendar cal-loaddefs hbmap hmoccur browse-url hui-select hvar set hversion hload-path darktooth-theme autothemer smartparens-config smartparens-javascript smartparens-text smartparens paredit ripgrep thingatpt grep compile minimap skewer-mode cache-table js2-mode etags fileloop generator xref project js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs simple-httpd pp url-util doom-themes doom-themes-base base16-theme dracula-theme with-editor warnings async-bytecomp async server yasnippet yaxception ht dash know-your-http-well http-status-codes http-relations http-methods http-headers s use-package up-delight up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time winner elec-pair desktop frameset recentf tree-widget wid-edit semantic/mru-bookmark semantic/db-mode semantic/idle semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base semantic/format ezimage semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func cedet delsel battery disp-table whitespace which-func imenu windmove tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring parse-time ls-lisp format-spec wombat-theme edmacro kmacro kotl-autoloads rx cl-extra help-mode advice w3m-load info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib 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 dbusbind kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 943870 51645) (symbols 48 80255 3) (strings 32 259884 5972) (string-bytes 1 7562303) (vectors 16 102296) (vector-slots 8 1189521 55816) (floats 8 832 297) (intervals 56 7106 199) (buffers 992 47)) -- Hälsningar / Best Regards Christian
bug-gnu-emacs <at> gnu.org
:bug#39343
; Package emacs
.
(Wed, 29 Jan 2020 20:43:01 GMT) Full text and rfc822 format available.Message #8 received at 39343 <at> debbugs.gnu.org (full text, mbox):
From: Alan Third <alan <at> idiocy.org> To: Christian Johansson <christian <at> cvj.se> Cc: 39343 <at> debbugs.gnu.org Subject: Re: bug#39343: 27.0.50; Thrad signal crashes Emacs with sgmentation fault Date: Wed, 29 Jan 2020 20:42:34 +0000
On Wed, Jan 29, 2020 at 12:27:19PM +0100, Christian Johansson wrote: > Running following works on Linux but not on macOS. > > (let ((loop t) > (iterations 1)) > (while loop > (make-thread > (lambda() > (message "Thread %d" iterations) > (signal 'error (list "My error")))) > (setq iterations (1+ iterations)))) > > Error in console: Fatal error 11: Segmentation faultAbort trap: 6 > > It seems to be some kind of issue with quitting threads on macOS which is > not present on Linux It’s a stack overflow caused by the main thread getting stuck in a loop processing calls to ns_send_appdefined which must be coming from the 2000‐odd threads the script starts. Presumably it’s the call to ns_run_loop_break in sys_cond_broadcast that’s doing it. I don’t think there’s really any way round this other than the massive rewrite the NS port needs to make it handle threads correctly. -- Alan Third
bug-gnu-emacs <at> gnu.org
:bug#39343
; Package emacs
.
(Wed, 29 Jan 2020 21:07:01 GMT) Full text and rfc822 format available.Message #11 received at 39343 <at> debbugs.gnu.org (full text, mbox):
From: Christian Johansson <christian <at> cvj.se> To: Alan Third <alan <at> idiocy.org> Cc: 39343 <at> debbugs.gnu.org Subject: Re: bug#39343: 27.0.50; Thrad signal crashes Emacs with sgmentation fault Date: Wed, 29 Jan 2020 22:05:57 +0100
Hi I understand, wish I had the skills to help with that but my C is weak and my macOS internals is even weaker. Sometimes I get another thread issue on macOS. It also crashes Emacs but the error is something about try to clear a pointer that doesn’t point to anything anymore. Would it be helpful if I try to find a reproducable way of causing that and file another issue? It seems to occur non-determinstically so I haven’t been able to reproduce it yet. Could perhaps depend on garbage collector and maybe some kind of race-condition.. I have two plugins for Emacs that would improve significantly with stable thread support but at the moment it seems threads are unstable on macOS. I have not experienced any issues on Linux. Async.el works but it adds unecessary overhead by launching a separate Emacs process and it would be nice to not need it. Kind regards Christian > 29 jan. 2020 kl. 21:42 skrev Alan Third <alan <at> idiocy.org>: > >> On Wed, Jan 29, 2020 at 12:27:19PM +0100, Christian Johansson wrote: >> Running following works on Linux but not on macOS. >> >> (let ((loop t) >> (iterations 1)) >> (while loop >> (make-thread >> (lambda() >> (message "Thread %d" iterations) >> (signal 'error (list "My error")))) >> (setq iterations (1+ iterations)))) >> >> Error in console: Fatal error 11: Segmentation faultAbort trap: 6 >> >> It seems to be some kind of issue with quitting threads on macOS which is >> not present on Linux > > It’s a stack overflow caused by the main thread getting stuck in a > loop processing calls to ns_send_appdefined which must be coming from > the 2000‐odd threads the script starts. > > Presumably it’s the call to ns_run_loop_break in sys_cond_broadcast > that’s doing it. > > I don’t think there’s really any way round this other than the massive > rewrite the NS port needs to make it handle threads correctly. > > -- > Alan Third
bug-gnu-emacs <at> gnu.org
:bug#39343
; Package emacs
.
(Wed, 20 Oct 2021 03:06:01 GMT) Full text and rfc822 format available.Message #14 received at 39343 <at> debbugs.gnu.org (full text, mbox):
From: Po Lu <luangruo <at> yahoo.com> To: Alan Third <alan <at> idiocy.org> Cc: Christian Johansson <christian <at> cvj.se>, 39343 <at> debbugs.gnu.org Subject: Re: bug#39343: 27.0.50; Thrad signal crashes Emacs with sgmentation fault Date: Wed, 20 Oct 2021 11:05:38 +0800
Alan Third <alan <at> idiocy.org> writes: > I don’t think there’s really any way round this other than the massive > rewrite the NS port needs to make it handle threads correctly. I don't understand the precise problem here (nor do I understand the thread code.) Could you elaborate on what the problem is, and why it requires a massive rewrite? Thanks.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.