Bug 2155824 - emacs-ess spawn multiple processes with ... --batch -l /tmp/emacs-async-comp-ess-custom-*.el
Summary: emacs-ess spawn multiple processes with ... --batch -l /tmp/emacs-async-comp-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daiki Ueno
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-22 13:56 UTC by Hin-Tak Leung
Modified: 2023-01-11 01:34 UTC (History)
9 users (show)

Fixed In Version: emacs-28.2-1.fc38 emacs-28.2-1.fc37 emacs-28.2-1.fc36
Clone Of:
Environment:
Last Closed: 2022-12-31 13:33:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Hin-Tak Leung 2022-12-22 13:56:15 UTC
This bug was initially created as a copy of Bug #2109745

I am copying this bug because: 

This turn out to need a fix (last entry below) in emacs itself, rather than emacs-ess.



Description of problem:

Something seems to have gone deeply wrong with emacs-28.1-2.fc36.x86_64 + emacs-ess-18.10.2-6.fc36.noarch . My git EDITOR is emacs and I use it daily, so I know I last use emacs okay on 19th Jul. Now it is stuck at loading "/usr/share/emacs/site-lisp/site-start.d/ess-init.el" on start-up.

It appeared that I upgraded from emacs-1:27.2-11.fc36.x86_64 to emacs-1:28.1-2.fc36.x86_64 on Wed 20 Jul 2022 21:41:39 BST.

Anyway, now when emacs starts, it spawns multiple processes of - part of "ps -ax":

---
 906049 pts/9    Sl+    0:03 emacs
 906114 pts/10   Ssl+   0:00 /usr/bin/emacs --batch -l /tmp/emacs-async-comp-ess-custom-cyjHX9.el
 906116 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-5DY1M9.el
 906118 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-28lIdB.el
 906120 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-SDZLyz.el
 906122 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-7gy55Z.el
 906124 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-rETxmu.el
 906126 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-3JyVYc.el
 906128 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-PWDGyM.el
 906130 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-GKBwii.el
 906132 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-GTxZDz.el
 906134 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-NSU0BX.el
 906142 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-uCZIZo.el
 906143 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-im9bnO.el
 906146 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-Ku1RsE.el
 906147 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-BEQeze.el
 906150 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-XFzriX.el
 906151 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-qpt6l8.el
 906154 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-CfxhW5.el
 906155 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-QYBJmp.el
 906158 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-0aH6Fx.el
 906160 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-Q9xbFy.el
 906162 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-k4xCVV.el
 906164 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-alEGQa.el
 906166 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-xK3Dbs.el
 906168 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-B3HlMK.el
 906170 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-AX4jqh.el
 906172 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-OIUCpt.el
 906173 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-vdo6Ms.el
 906176 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-FlArQM.el
 906177 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-gvBALD.el
 906180 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-jKWQKF.el
 906181 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-6jpknA.el
 906184 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-rjrQSW.el
 906185 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-sdGtrI.el
 906188 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-0I2cpt.el
 906189 ?        Ssl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-Wks6rU.el
 906192 ?        Rsl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-nn0nkj.el
 906193 ?        Rsl    0:00 /usr/bin/emacs --batch -l /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-iXBidj.el
 906196 pts/11   R+     0:00 ps -ax
---

Version-Release number of selected component (if applicable):
emacs-1:28.1-2.fc36.x86_64
emacs-ess-18.10.2-6.fc36.noarch
emacs-common-ess-18.10.2-6.fc36.noarch

How reproducible:
Always

Steps to Reproduce:
1. upgrade to emacs 28, have emacs-ess
2. launch emacs
3.

Actual results:
CPU consumption shoots up, multiple emacs processes spawn, and multiple files /tmp/emacs-int-comp-subr--trampoline-64656c6574652d63686172_delete_char_0-*.el are created, plus one /tmp/emacs-async-comp-ess-custom-*.el . emacs not useable and get stuck loading /usr/share/emacs/site-lisp/site-start.d/ess-init.el

Expected results:
start up should finish and one should be able to use emacs normally.

Additional info:
"dnf downgrade emacs" offers 1:27.2-9.fc35 (not fc36), and after downgrading, it works.

Comment 1 Hin-Tak Leung 2022-12-22 13:57:21 UTC
Sorry, better url for the fix:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=e59216d3be86918b995bd63273c851ebc6176a83

It seems simple enough to backport to 28.1, before if/when this might be included in 28.2.

Comment 2 Jens Petersen 2022-12-23 16:41:16 UTC
Thank you Hin-Tak Leung for your persistence on this!

Here is a Koji scratch build for F37:
https://koji.fedoraproject.org/koji/taskinfo?taskID=95625459
(for example you could install/test it with koji-tool install 95625459)
Are you still using F36? I can do one too.

Also a newer rawhide scratch build (note this is emacs-28.2):
https://koji.fedoraproject.org/koji/taskinfo?taskID=95622287


((Just a few minor extra other comments:

1. emacs-28.2 is already released btw - hopefully it should go into Rawhide at least very soon
2. there is also a clone bug feature in bugzilla you could use next time, though
3. in this case probably we could also have moved the ESS bug to the emacs component, but that is fine:
   the main important thing is getting this serious issue finally fixed :-))

Comment 3 Jens Petersen 2022-12-23 17:33:04 UTC
Here is a f36 scratch build too:
https://koji.fedoraproject.org/koji/taskinfo?taskID=95626001

These scratch builds contain a backport of the upstream emacs-29 fix.
If you and others can test that would be great, thanks

Comment 4 Hin-Tak Leung 2022-12-23 20:15:57 UTC
Yes, I meant to do clone bug instead of copy bug - was filing on a smart phone so didn't have the mouse-over feature to tell which is which... thought about switching the component, but not sure if it would go to the right people, etc... anyway, I see the clone bug thing often enough, and that seems to be the preferred way to do, instead of copy bug.

I am on f37 now (having another look at the emacs bug was the last thing I did before upgrading). The Koji scratch build for F37 failed, by the way, so I grabbed emacs-28.1-3.1.fc36.x86_64.rpm, emacs-filesystem-28.1-3.1.fc36.noarch.rpm, and emacs-common-28.1-3.1.fc36.x86_64.rpm, and did an "dnf upgrade <theses>" to replaced the 3.fc37 packages. They work fine on fc37.

To test, after "dnf upgrade <theses>",

1. clean out ~/.emacs.d/eln-cache/28.1-b1f2d84a/ (because there is a workaround, of adding "-Q" and manually creating the trampoline file).

2. launch emacs

emacs should get past /usr/share/emacs/site-lisp/site-start.d/ess-init.el quite quickly. CPU usage would stay at 50% or so however for another minute or so, while ~/.emacs.d/eln-cache/28.1-b1f2d84a/ is being gradually re-populated. You can see one or two extra emacs processes running, within that minute.

emacs-ess currently generates quite a bit of warnings for native compilation, but emacs offers suppressing those. That's a separate issue, and depending on personal preference, people could click on "disable warning" and "diable warning logging" to ignore those.

Comment 5 Hin-Tak Leung 2022-12-23 20:21:21 UTC
about 28.2 - that makes sense - I was somewhat surprised that the emacs people said they aren't doing any more of 28.x , but it now make sense that they don't intend to have a 28.3 .

Comment 6 Jens Petersen 2022-12-24 02:44:15 UTC
Here is a f37: scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=95626270

(I should have waited posting the links until they all finished)

Comment 7 Jens Petersen 2022-12-24 02:56:42 UTC
Thanks for testing!

Comment 8 Jens Petersen 2022-12-24 02:59:00 UTC
(In reply to Hin-Tak Leung from comment #5)
> about 28.2 - that makes sense - I was somewhat surprised that the emacs
> people said they aren't doing any more of 28.x , but it now make sense that
> they don't intend to have a 28.3 .

Right though I honestly feel this issue is serious enough to warrant a minor release...

Comment 9 Jens Petersen 2022-12-25 12:10:20 UTC
I have opened 2 PRs:

https://src.fedoraproject.org/rpms/emacs/pull-request/17 (against current Fedora)

and 

https://src.fedoraproject.org/rpms/emacs/pull-request/18 (which adds the backport to the 28.2 rebase in #16)

New koji scratch builds should be available there in a while

Merry Christmas

Comment 10 Fedora Update System 2022-12-31 13:29:07 UTC
FEDORA-2022-cbc71cc4fe has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-cbc71cc4fe

Comment 11 Fedora Update System 2022-12-31 13:33:23 UTC
FEDORA-2022-cbc71cc4fe has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2022-12-31 21:08:34 UTC
FEDORA-2022-e37f239f2e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e37f239f2e

Comment 13 Fedora Update System 2022-12-31 21:10:17 UTC
FEDORA-2022-d69c7f95a4 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d69c7f95a4

Comment 14 Fedora Update System 2023-01-01 01:52:18 UTC
FEDORA-2022-d69c7f95a4 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-d69c7f95a4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-d69c7f95a4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2023-01-01 02:00:25 UTC
FEDORA-2022-e37f239f2e has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-e37f239f2e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e37f239f2e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2023-01-03 01:25:08 UTC
FEDORA-2022-d69c7f95a4 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2023-01-11 01:34:45 UTC
FEDORA-2022-e37f239f2e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.