* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline [not found] <974722961.3073608.1671487166201.ref@mail.yahoo.com> @ 2022-12-19 21:59 ` Hin-Tak Leung 2022-12-20 3:32 ` Eli Zaretskii 0 siblings, 1 reply; 12+ messages in thread From: Hin-Tak Leung @ 2022-12-19 21:59 UTC (permalink / raw) To: 60208 --text follows this line-- Basically this is about resource exhaustion with emacs 28's native compilation, leading to crash if not caught. There is a missing "-Q" for building "emacs-int-comp-subr--trampoline..*...el". More details at: https://bugzilla.redhat.com/show_bug.cgi?id=2109745 Bug 2109745 - emacs-ess spawn multiple processes with ... --batch -l /tmp/emacs-async-comp-ess-custom-*.el and at https://github.com/emacs-ess/ESS/issues/1222 Resource exhaustion with emacs 28's native compilation. What happens seems to be this: emacs-ess have about 50+ files, which would be natively compiled on fedora's recent native-compile-enabled emacs. On fedora, they also auto-load emacs-ess mode via site-lisp. Now, "/tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-*.el" seems to be some kind of stub which needs to be natively compiled as a prerequisite for any native compilation at all, and it needs to be done once ever, and it writes to ~/.emacs.d/eln-cache/28.1-b1f2d84a/subr--trampoline-64656c6574652d63686172_delete_char_0.eln , and do it exactly once. However, currently, emacs 28 is doing this via: "/usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline..." missing a "-Q", and should be: "/usr/bin/emacs -Q --batch -l /tmp/emacs-int-comp-subr--trampoline..." The consequence of the missing "-Q" is that, this commands also loads emacs-ess, and which requires native compilation, which launches more copies of the process of "emacs ... --batch -l /tmp/emacs-int-comp-subr--trampoline...". We soon have hundred of copies of emacs running, and thousands, and leading to resource exhaustion and eventual crash. I don't know how that trampoline file is generated, and what is its exact purpose, but it seems to be generic (not specific to emacs-ess) , and that it should be compiled with a missing "-Q", instead of running emacs --batch plain. In GNU Emacs 28.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-07-15 built on buildhw-x86-02.iad2.fedoraproject.org Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 36 (Workstation Edition) Configured using: 'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json --with-native-compilation build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB Important settings: value of $LC_MONETARY: en_GB.utf8 value of $LC_NUMERIC: en_GB.utf8 value of $LC_TIME: en_GB.utf8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-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: /usr/share/emacs/site-lisp/lilypond-init hides /usr/share/emacs/site-lisp/site-start.d/lilypond-init Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils finder-inf package url-handlers ess-site ess-toolbar ess-mouse mouseme browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core eieio-loaddefs password-cache url-vars mailcap ess-swv ess-noweb ess-noweb-font-lock-mode ess-jags-d ess-bugs-l essd-els ess-xls-d ess-vst-d ess-stata-mode ess-stata-lang cc-vars cc-defs make-regexp ess-sp6w-d ess-sp5-d ess-sp4-d ess-sas-d ess-sas-l ess-sas-a ess-s4-d ess-s3-d ess-omg-d ess-omg-l ess-arc-d ess-lsp-l ess-sp6-d ess-dde ess-sp3-d ess-julia julia-mode cl ess-r-mode ess-r-flymake flymake-proc flymake thingatpt ess-r-xref xref project ess-trns ess-r-package shell pcomplete ess-r-syntax ess-r-completion ess-roxy ess-rd essddr noutline outline easy-mmode hideshow ess-s-lang ess-help info ess-mode ess ess-noweb-mode ess-inf ess-tracebug comp comp-cstr warnings rx cl-seq cl-extra help-mode advice format-spec ess-generics compile text-property-search ess-utils ido ess-custom executable comint ansi-color ring clang-rename clang-include-fixer let-alist json subr-x map seq byte-opt bytecomp byte-compile cconv clang-format cl-macs gv xml cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads xwidget-internal dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 179768 7459) (symbols 48 16053 0) (strings 32 56305 2843) (string-bytes 1 1932240) (vectors 16 28343) (vector-slots 8 521371 19414) (floats 8 78 41) (intervals 56 332 0) (buffers 992 13)) ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-19 21:59 ` bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline Hin-Tak Leung @ 2022-12-20 3:32 ` Eli Zaretskii 2022-12-20 9:30 ` Hin-Tak Leung 0 siblings, 1 reply; 12+ messages in thread From: Eli Zaretskii @ 2022-12-20 3:32 UTC (permalink / raw) To: htl10; +Cc: 60208 > Date: Mon, 19 Dec 2022 21:59:26 +0000 (UTC) > From: Hin-Tak Leung <htl10@users.sourceforge.net> > > Now, > "/tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-*.el" > seems to be some kind of stub which needs to be natively compiled as a > prerequisite for any native compilation at all, and it needs to be done > once ever, and it writes to > ~/.emacs.d/eln-cache/28.1-b1f2d84a/subr--trampoline-64656c6574652d63686172_delete_char_0.eln > , and do it exactly once. > > However, currently, emacs 28 is doing this via: > > "/usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline..." > > missing a "-Q", and should be: > > "/usr/bin/emacs -Q --batch -l /tmp/emacs-int-comp-subr--trampoline..." > > The consequence of the missing "-Q" is that, this commands also loads > emacs-ess, and which requires native compilation, which launches more > copies of the process of "emacs ... --batch -l > /tmp/emacs-int-comp-subr--trampoline...". I'm not sure this conclusion is correct, because --batch implies -q. There's a difference between -q and -Q, so are you saying that emacs-ess is loaded from a site-init file in your case? ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-20 3:32 ` Eli Zaretskii @ 2022-12-20 9:30 ` Hin-Tak Leung 2022-12-20 14:16 ` Eli Zaretskii 0 siblings, 1 reply; 12+ messages in thread From: Hin-Tak Leung @ 2022-12-20 9:30 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 60208 [-- Attachment #1: Type: text/plain, Size: 451 bytes --] On Tuesday, 20 December 2022 at 11:32:21 GMT+8, Eli Zaretskii <eliz@gnu.org> wrote: > I'm not sure this conclusion is correct, because --batch implies -q. > There's a difference between -q and -Q, so are you saying that > emacs-ess is loaded from a site-init file in your case? Yes, that's right. Fedora has a "/usr/share/emacs/site-lisp/site-start.d/ess-init.el" , which contains the single line, "(require 'ess-site)". Indeed as you said. [-- Attachment #2: Type: text/html, Size: 1199 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-20 9:30 ` Hin-Tak Leung @ 2022-12-20 14:16 ` Eli Zaretskii 2022-12-21 9:25 ` Andrea Corallo 0 siblings, 1 reply; 12+ messages in thread From: Eli Zaretskii @ 2022-12-20 14:16 UTC (permalink / raw) To: Hin-Tak Leung, Andrea Corallo; +Cc: 60208 > Date: Tue, 20 Dec 2022 09:30:31 +0000 (UTC) > From: Hin-Tak Leung <htl10@users.sourceforge.net> > Cc: 60208@debbugs.gnu.org > > On Tuesday, 20 December 2022 at 11:32:21 GMT+8, Eli Zaretskii <eliz@gnu.org> wrote: > > > I'm not sure this conclusion is correct, because --batch implies -q. > > There's a difference between -q and -Q, so are you saying that > > emacs-ess is loaded from a site-init file in your case? > > Yes, that's right. Fedora has a "/usr/share/emacs/site-lisp/site-start.d/ess-init.el" , which contains the single > line, "(require 'ess-site)". Indeed as you said. Thanks. Andrea, do you see any problems with adding -Q to the async compilation command line, to avoid processing site-init files? Did we have any reasons not to do that from the beginning, or was it just an omission? ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-20 14:16 ` Eli Zaretskii @ 2022-12-21 9:25 ` Andrea Corallo 2022-12-21 12:46 ` Eli Zaretskii 0 siblings, 1 reply; 12+ messages in thread From: Andrea Corallo @ 2022-12-21 9:25 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Hin-Tak Leung, 60208 Eli Zaretskii <eliz@gnu.org> writes: >> Date: Tue, 20 Dec 2022 09:30:31 +0000 (UTC) >> From: Hin-Tak Leung <htl10@users.sourceforge.net> >> Cc: 60208@debbugs.gnu.org >> >> On Tuesday, 20 December 2022 at 11:32:21 GMT+8, Eli Zaretskii <eliz@gnu.org> wrote: >> >> > I'm not sure this conclusion is correct, because --batch implies -q. >> > There's a difference between -q and -Q, so are you saying that >> > emacs-ess is loaded from a site-init file in your case? >> >> Yes, that's right. Fedora has a "/usr/share/emacs/site-lisp/site-start.d/ess-init.el" , which contains the single >> line, "(require 'ess-site)". Indeed as you said. > > Thanks. > > Andrea, do you see any problems with adding -Q to the async > compilation command line, to avoid processing site-init files? Hi Eli, no I don't. > Did we > have any reasons not to do that from the beginning, or was it just an > omission? Not that I remember. Actually I think we should do this for all compilations (sync and async). If okay I can push the fix on emacs-29. Bests Andrea ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-21 9:25 ` Andrea Corallo @ 2022-12-21 12:46 ` Eli Zaretskii 2022-12-21 22:30 ` Andrea Corallo 0 siblings, 1 reply; 12+ messages in thread From: Eli Zaretskii @ 2022-12-21 12:46 UTC (permalink / raw) To: Andrea Corallo; +Cc: htl10, 60208 > From: Andrea Corallo <akrl@sdf.org> > Cc: Hin-Tak Leung <htl10@users.sourceforge.net>, 60208@debbugs.gnu.org > Date: Wed, 21 Dec 2022 09:25:38 +0000 > > Eli Zaretskii <eliz@gnu.org> writes: > > > Andrea, do you see any problems with adding -Q to the async > > compilation command line, to avoid processing site-init files? > > Hi Eli, > > no I don't. > > > Did we > > have any reasons not to do that from the beginning, or was it just an > > omission? > > > Not that I remember. Actually I think we should do this for all > compilations (sync and async). > > If okay I can push the fix on emacs-29. Yes, please. ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-21 12:46 ` Eli Zaretskii @ 2022-12-21 22:30 ` Andrea Corallo 2022-12-22 0:33 ` Hin-Tak Leung 0 siblings, 1 reply; 12+ messages in thread From: Andrea Corallo @ 2022-12-21 22:30 UTC (permalink / raw) To: Eli Zaretskii; +Cc: htl10, 60208 Eli Zaretskii <eliz@gnu.org> writes: >> From: Andrea Corallo <akrl@sdf.org> >> Cc: Hin-Tak Leung <htl10@users.sourceforge.net>, 60208@debbugs.gnu.org >> Date: Wed, 21 Dec 2022 09:25:38 +0000 >> >> Eli Zaretskii <eliz@gnu.org> writes: >> >> > Andrea, do you see any problems with adding -Q to the async >> > compilation command line, to avoid processing site-init files? >> >> Hi Eli, >> >> no I don't. >> >> > Did we >> > have any reasons not to do that from the beginning, or was it just an >> > omission? >> >> >> Not that I remember. Actually I think we should do this for all >> compilations (sync and async). >> >> If okay I can push the fix on emacs-29. > > Yes, please. Done with e59216d3be8. Best Regards Andrea ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-21 22:30 ` Andrea Corallo @ 2022-12-22 0:33 ` Hin-Tak Leung 2022-12-22 7:21 ` Eli Zaretskii 0 siblings, 1 reply; 12+ messages in thread From: Hin-Tak Leung @ 2022-12-22 0:33 UTC (permalink / raw) To: Eli Zaretskii, Andrea Corallo; +Cc: 60208 [-- Attachment #1: Type: text/plain, Size: 158 bytes --] On Thursday, 22 December 2022 at 06:31:08 GMT+8, Andrea Corallo <akrl@sdf.org> wrote: > Done with e59216d3be8. Thanks a lot for the speedy response! [-- Attachment #2: Type: text/html, Size: 765 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-22 0:33 ` Hin-Tak Leung @ 2022-12-22 7:21 ` Eli Zaretskii 2022-12-22 13:46 ` Hin-Tak Leung 0 siblings, 1 reply; 12+ messages in thread From: Eli Zaretskii @ 2022-12-22 7:21 UTC (permalink / raw) To: Hin-Tak Leung; +Cc: 60208-done, akrl > Date: Thu, 22 Dec 2022 00:33:42 +0000 (UTC) > From: Hin-Tak Leung <htl10@users.sourceforge.net> > Cc: 60208@debbugs.gnu.org > > On Thursday, 22 December 2022 at 06:31:08 GMT+8, Andrea Corallo <akrl@sdf.org> wrote: > > > Done with e59216d3be8. > > Thanks a lot for the speedy response! Thanks, I'm therefore closing this bug. ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-22 7:21 ` Eli Zaretskii @ 2022-12-22 13:46 ` Hin-Tak Leung 2022-12-22 15:22 ` Eli Zaretskii 0 siblings, 1 reply; 12+ messages in thread From: Hin-Tak Leung @ 2022-12-22 13:46 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 60208-done, akrl [-- Attachment #1: Type: text/plain, Size: 144 bytes --] Thanks for all the work. Just one more question: should/could this fix go into 28.2? I can file at the distros to get it back-ported either way. [-- Attachment #2: Type: text/html, Size: 300 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-22 13:46 ` Hin-Tak Leung @ 2022-12-22 15:22 ` Eli Zaretskii 2022-12-22 16:32 ` Hin-Tak Leung 0 siblings, 1 reply; 12+ messages in thread From: Eli Zaretskii @ 2022-12-22 15:22 UTC (permalink / raw) To: Hin-Tak Leung; +Cc: 60208, akrl > Date: Thu, 22 Dec 2022 13:46:52 +0000 (UTC) > From: Hin-Tak Leung <htl10@users.sourceforge.net> > Cc: akrl@sdf.org, 60208-done@debbugs.gnu.org > > Thanks for all the work. Just one more question: should/could this fix go into 28.2? I can file at the distros to > get it back-ported either way. We don't plan on any more Emacs 28.x releases, but you can backport the change in your downstream sources, if you want. ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline 2022-12-22 15:22 ` Eli Zaretskii @ 2022-12-22 16:32 ` Hin-Tak Leung 0 siblings, 0 replies; 12+ messages in thread From: Hin-Tak Leung @ 2022-12-22 16:32 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 60208, akrl [-- Attachment #1: Type: text/plain, Size: 750 bytes --] On Thursday, 22 December 2022 at 23:23:29 GMT+8, Eli Zaretskii <eliz@gnu.org> wrote: > We don't plan on any more Emacs 28.x releases, but you can backport > the change in your downstream sources, if you want. That's okay. Thanks for time for responding. I have already filed at the distro to get it back ported: https://bugzilla.redhat.com/show_bug.cgi?id=2155824 The change looks small/easier enough to back port. It was knowing where to insert the change that was the hard. I knew a "-Q" is needed somewhere but it was somewhat hard to find out how the trampoline files are generated. (Yes, it is all in the source code, and in particular, probably in comp.el, but good guess is not the same as knowing) Thanks for the time of responding. [-- Attachment #2: Type: text/html, Size: 2984 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-12-22 16:32 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <974722961.3073608.1671487166201.ref@mail.yahoo.com> 2022-12-19 21:59 ` bug#60208: 28.1; Resource exhaustion with emacs 28's native compilation; need "-Q" for trampoline Hin-Tak Leung 2022-12-20 3:32 ` Eli Zaretskii 2022-12-20 9:30 ` Hin-Tak Leung 2022-12-20 14:16 ` Eli Zaretskii 2022-12-21 9:25 ` Andrea Corallo 2022-12-21 12:46 ` Eli Zaretskii 2022-12-21 22:30 ` Andrea Corallo 2022-12-22 0:33 ` Hin-Tak Leung 2022-12-22 7:21 ` Eli Zaretskii 2022-12-22 13:46 ` Hin-Tak Leung 2022-12-22 15:22 ` Eli Zaretskii 2022-12-22 16:32 ` Hin-Tak Leung
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).