Bug 2277250 - Tree-sitter ABI change causes Emacs to crash
Summary: Tree-sitter ABI change causes Emacs to crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 40
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Oliver
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-26 00:00 UTC by Peter Oliver
Modified: 2024-04-28 03:17 UTC (History)
10 users (show)

Fixed In Version: emacs-29.3-6.fc40
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-28 03:17:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github tree-sitter tree-sitter issues 3296 0 None closed *** stack smashing detected ***: terminated Fatal error 6: Aborted 2024-04-26 00:00:59 UTC

Description Peter Oliver 2024-04-26 00:00:31 UTC
Tree-sitter update https://bodhi.fedoraproject.org/updates/FEDORA-2024-e22c159068 contains an ABI change that crashes Emacs.  

Reproducible: Always

Steps to Reproduce:
1. sudo yum install libtree-sitter-java
2. M-x java-ts-mode

Actual Results:  
*** stack smashing detected ***: terminated
Fatal error 6: Aborted
Backtrace:
emacs(emacs_backtrace+0x5a)[0x595a2a]
emacs(terminate_due_to_signal+0x9f)[0x467885]
emacs[0x468623]
emacs[0x70b914]
/lib64/libc.so.6(+0x40710)[0x7f0e928c8710]
/lib64/libc.so.6(+0x98144)[0x7f0e92920144]
/lib64/libc.so.6(gsignal+0x1e)[0x7f0e928c865e]
/lib64/libc.so.6(abort+0xdf)[0x7f0e928b0902]
/lib64/libc.so.6(+0x29767)[0x7f0e928b1767]
/lib64/libc.so.6(+0x1244f9)[0x7f0e929ac4f9]
/lib64/libc.so.6(+0x125774)[0x7f0e929ad774]
emacs(Ftreesit_induce_sparse_tree+0x287)[0x6bedd7]
emacs(exec_byte_code+0x54c)[0x66b6ec]
emacs(Ffuncall+0xfd)[0x62123d]
emacs[0x624b1a]
emacs(Fmapcan+0xeb)[0x62915b]
/usr/lib64/emacs/29.3/native-lisp/29.3-028c5110/treesit-37439c61-97df641d.eln(F747265657369742d73696d706c652d696d656e75_treesit_simple_imenu_0+0x7b)[0x7f0e783c81fb]
emacs(Ffuncall+0xfd)[0x62123d]
/usr/lib64/emacs/29.3/native-lisp/29.3-028c5110/which-func-fb53504e-6ee45ec8.eln(F77686963682d66756e632d66662d686f6f6b_which_func_ff_hook_0+0x273)[0x7f0e78ba58a3]
emacs(Ffuncall+0xfd)[0x62123d]
emacs[0x62131d]
emacs(run_hook_with_args+0xcc)[0x61beac]
emacs(Frun_hooks+0x5c)[0x61c0ac]
emacs(Ffuncall+0xfd)[0x62123d]
/usr/bin/../lib64/emacs/29.3/native-lisp/29.3-028c5110/preloaded/subr-13adf6a6-bfb9f448.eln(F72756e2d6d6f64652d686f6f6b73_run_mode_hooks_0+0x381)[0x7f0e8c95da91]
emacs(Ffuncall+0xfd)[0x62123d]
/usr/lib64/emacs/29.3/native-lisp/29.3-028c5110/java-ts-mode-8f83e26b-9e21fe67.eln(F6a6176612d74732d6d6f6465_java_ts_mode_0+0x3a6)[0x7f0e783ee846]
emacs(Ffuncall+0xfd)[0x62123d]
emacs(Ffuncall_interactively+0x3b)[0x61066b]
emacs(Ffuncall+0xfd)[0x62123d]
emacs(Fapply+0x388)[0x621b18]
emacs(Fcall_interactively+0x425)[0x618a95]
/usr/bin/../lib64/emacs/29.3/native-lisp/29.3-028c5110/preloaded/simple-fab5b0cf-9ff4140c.eln(F636f6d6d616e642d65786563757465_command_execute_0+0x285)[0x7f0e8d571705]
emacs(Ffuncall+0xfd)[0x62123d]
/usr/bin/../lib64/emacs/29.3/native-lisp/29.3-028c5110/preloaded/simple-fab5b0cf-9ff4140c.eln(F657865637574652d657874656e6465642d636f6d6d616e64_execute_extended_command_0+0x1d9)[0x7f0e8d570599]
emacs(Ffuncall+0xfd)[0x62123d]
emacs(Ffuncall_interactively+0x3b)[0x61066b]
emacs(Ffuncall+0xfd)[0x62123d]
emacs(Fapply+0x1b0)[0x621940]
emacs(Fcall_interactively+0x425)[0x618a95]
/usr/bin/../lib64/emacs/29.3/native-lisp/29.3-028c5110/preloaded/simple-fab5b0cf-9ff4140c.eln(F636f6d6d616e642d65786563757465_command_execute_0+0x285)[0x7f0e8d571705]
...
Abort (core dumped)

Expected Results:  
No crash.

Comment 1 Andreas 2024-04-26 08:54:36 UTC
This is a problem with all tree-sitter modes in Emacs. The upstream bug suggests that these breaks other applications that use tree-sitter too.

Comment 2 Fedora Update System 2024-04-26 09:34:37 UTC
FEDORA-2024-779057407e (emacs-29.3-6.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-779057407e

Comment 3 Fedora Update System 2024-04-27 01:08:51 UTC
FEDORA-2024-779057407e has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-779057407e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-779057407e

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

Comment 4 Fedora Update System 2024-04-28 03:17:21 UTC
FEDORA-2024-779057407e (emacs-29.3-6.fc40) has been pushed to the Fedora 40 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.