[SRU] Klayout 0.28.15 segmentation fault on startup

Bug #2066026 reported by Peter Würtz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
klayout (Ubuntu)
Status tracked in Oracular
Noble
Fix Committed
Medium
Erich Eickmeyer
Oracular
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

Klayout 0.28.15 is completely incompatible with Python 3.12, and segfaults on startup. Included patches attempted to increase the supported version number, but the code itself was incompatible and it simply would not run.

Attempts to include a simple patch from upstream proved unsuccessful and resulted in a complete FTBFS. This was due to the shifting of code in other places prior to the commits of the patch, meaning the patch was irrelevant without other pieces of code changed. Hence, the first version of klayout that supported Python 3.12 was 0.28.16, released on 12 February 2024. Unfortunately, it was not uploaded to Debian prior to Feature Freeze/Debian Import Freeze, so it did not make it in-time.

As reported by the reporter of this bug, no testing on the runtime was done prior to release. So, while the build was successful, runs are reproducibly unsuccessful. This package is, therefore, completely useless in the archive as it stands unless it is updated to version 0.28.16.

[Test Case]

* Install klayout
* Attempt to run klayout

Expected: Application runs
Actual: Segmentation fault

[What could go wrong]

Looking into this application, it seems to be a Suggests of electronics-asic-dev which is a metapackage for asic development, which installs applications much like itself, i.e. for electronics engineers and others who build electronic circuits. It doesn't appear to enhance any other packages, meaning it has no *actual* reverse dependencies, nor does it provide any libraries.

It's hard to regress an application that simply does not function, and considering it has no actual reverse dependencies, I'm having trouble fathoming anything going wrong here other than 0.28.16 also failing to run with further updates. :)

[Other Information]

While this is a point release and does concentrate on bug fixes, it does include some "enhancements" as they're called on the changelog[1] that may or may not be considered "features":

* Enhancement: DRC enhancements related to touching edges
 - New DRC function switches: "without_touching_corners", "without_touching_edges" to skip width and space errors at kissing corners and touching-edge configurations
 - Kissing corners are now detected also in non-collinear edge configuration
* Enhancement: OASIS reader errors out on broken OASIS with duplicate CELLNAMEs

While including features would normally require a Feature Freeze exception or a backport, I would argue against it in this case as the version in the development release of Ubuntu at this time is 0.29.1 which is magnitudes newer and definitely, per the changelog[2] contains many new features.

Other options, such as simply patching for Python 3.12, have been exhausted. No-change rebuilds also proved to be ineffective. Moving up one point release as opposed to moving to the latest release seemed to be the best compromise. Apologies for the diff being so large but, unfortunately, carrying patches to make 0.28.15 Python 3.12 compatible would have been more time-consuming and created a diff nearly as large.

[1]https://www.klayout.de/development.html#0.28.16
[2]https://www.klayout.de/development.html#0.29.1
---
Original bug report follows:

On Ubuntu 24.04, Klayout 0.28.15-1build5 crashes on startup.

This is due to a bug described in the upstream issue https://github.com/KLayout/klayout/issues/1619, which shows up on systems using Python 3.12.

This bug was fixed in Klayout versions >=0.28.16.

Revision history for this message
Peter Würtz (pwuertz) wrote :
Revision history for this message
Peter Würtz (pwuertz) wrote :

I just built the next version (debian/0.29.1-1) released by the package maintainers at https://salsa.debian.org/electronics-team/klayout on Ubuntu 24.04. This version works without issues.

Can we just sync up to debian/0.29.1-1?

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote (last edit ):

Hi Peter,

>Can we just sync up to debian/0.29.1-1?

In oracular? Yes, it's already there. In noble? That would be a hard sell. If we can build against the patch that fixes it in the github issue you linked, then it would be a much easier sell as an SRU.

See https://wiki.ubuntu.com/StableReleaseUpdates for more information.

I'll get working on this.

Changed in klayout (Ubuntu):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in klayout (Ubuntu Noble):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in klayout (Ubuntu Oracular):
status: New → Fix Released
assignee: Erich Eickmeyer (eeickmeyer) → nobody
Changed in klayout (Ubuntu Noble):
status: New → Triaged
importance: Undecided → Medium
Changed in klayout (Ubuntu Noble):
status: Triaged → In Progress
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Just a quick update while this is building in my PPA: the patch did *not* apply cleanly and needed a bit of modification since the patch was based on newer code than exists in 0.28.15. Furthermore, even with the changes, it was fuzzy and needed to be applied with the fuzz so the fuzz could be extracted and then the patch rebuilt, which I have done.

That said, now we have a clean patched version building in my PPA and hopefully it will run. Will report back as soon as I have an update.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

The build FTBFS, but it gave an honest try. Turns out the patch is irrellevant without some commits beforehand, but this would be a matter of going into parent commit hell, so I think a saner solution might be to try to update it to 0.28.16.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote (last edit ):

Attempted a no-change rebuild without the patch. Predictably, it built, but segfaulted upon run due to the Python 3.12 incompatibility.

summary: - Klayout 0.28.15 segmentation fault on startup
+ [SRU] Klayout 0.28.15 segmentation fault on startup
description: updated
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

I have sponsored the fix for this package by uploading this package to noble-proposed UNAPPROVED awaiting approval from the Ubuntu Stable Release Updates team. Subsequently, I have unsubscribed the Ubuntu Sponsors Team as the upload has now been sponsored and awaits SRU approval.

For more information about this process, see https://wiki.ubuntu.com/StableReleaseUpdates

Changed in klayout (Ubuntu Oracular):
status: Fix Released → Invalid
status: Invalid → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Peter, or anyone else affected,

Accepted klayout into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/klayout/0.28.16-0ubuntu0.24.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in klayout (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

$ apt-cache policy klayout
klayout:
  Installed: 0.28.16-0ubuntu0.24.04.1
  Candidate: 0.28.16-0ubuntu0.24.04.1
  Version table:
 *** 0.28.16-0ubuntu0.24.04.1 100
        100 http://us.archive.ubuntu.com/ubuntu noble-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.28.15-1build5 500
        500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages

* Started klayout

Application runs with no apparent issues.

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.