Bug 2208024

Summary: lilypond-2.25.4 crashes building scores using staff groups
Product: [Fedora] Fedora Reporter: Nils Philippsen <nphilipp>
Component: lilypondAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 38CC: gwync, i, nphilipp, pbonzini
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: lilypond-2.25.4-2.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-21 02:01:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Minimal reproducer exhibiting the issue none

Description Nils Philippsen 2023-05-17 17:21:18 UTC
When I attempt to build a score using a PianoStaff or GrandStaff (which contains more than one sub-staff), lilypond crashes.

Reproducible: Always

Steps to Reproduce:
1. Attempt to build a minimal reproducer (which I will attach) with lilypond-2.25.4
Actual Results:  
Slightly varying modes of crashing.

#1) Without dumping core:

--- 8< ---
nils@makake:~/music> lilypond minimal.ly 
GNU LilyPond 2.25.4 (running Guile 2.2)
Processing `minimal.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
/usr/share/lilypond/2.25.4/ly/init.ly:64:2: error: Guile signaled an error for the expression beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
In procedure scm_hash_fn_create_handle_x: Error while printing exception.
--- >8 ---

#2) With dumping core:

--- 8< ---
nils@makake:~/music> lilypond minimal.ly 
GNU LilyPond 2.25.4 (running Guile 2.2)
Processing `minimal.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
/usr/share/lilypond/2.25.4/ly/init.ly:64:2: error: Guile signaled an error for the expression beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
In procedure scm_hash_fn_create_handle_x: Wrong type argument in position 1 (expecting hash-table): Segmentation fault (core dumped)
--- >8 ---

Expected Results:  
It builds a PDF from the score.

- I get the same behavior on Fedora 38 and Rawhide.
- Using the lilypond-2.25.3 Fedora package _or_ the 2.25.4 binary from upstream doesn’t exhibit the issue.

Comment 1 Nils Philippsen 2023-05-17 17:22:25 UTC
Created attachment 1965173 [details]
Minimal reproducer exhibiting the issue

Comment 2 Gwyn Ciesla 2023-05-17 18:35:16 UTC
Interesting. If I rebuild using ./configure instead of %configure the bug goes away. Now to dig and see which flag is triggering the problem.

Comment 3 Gwyn Ciesla 2023-05-17 18:40:53 UTC
Or not. The above is true if I build that way outside the RPM, but remains in an RPM.

Comment 4 Gwyn Ciesla 2023-05-17 20:02:41 UTC
Reported upstream.

Comment 5 Nils Philippsen 2023-05-17 22:07:22 UTC
(In reply to Gwyn Ciesla from comment #3)
> Or not. The above is true if I build that way outside the RPM, but remains
> in an RPM.

This is thoroughly weird, I can’t seem to reproduce it when building from source. Or else I would at least have attempted to bisect to zero in on the cause… 😬

Comment 6 Gwyn Ciesla 2023-05-18 14:58:10 UTC
Upstream sent a patch that fixes this, update incoming.

Comment 7 Fedora Update System 2023-05-18 15:41:06 UTC
FEDORA-2023-02f1cb5ef4 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-02f1cb5ef4

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

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

Comment 9 Nils Philippsen 2023-05-19 15:24:06 UTC
The update fixes the issue for me, both with the minimal producer and the original file I encountered it first with. Thank you very much!

Comment 10 Gwyn Ciesla 2023-05-19 15:25:30 UTC
Awesome, anytime!

Comment 11 Gwyn Ciesla 2023-05-20 17:16:12 UTC
*** Bug 2208744 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2023-05-21 02:01:09 UTC
FEDORA-2023-02f1cb5ef4 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.