Issues with Make on Ubuntu 22.04
Hi, I don't know if this is the right forum for this (if not, please point me in the right direction). I'm having some issues with Make. After upgrading to Ubuntu 22.04 I started getting Segmentation Fault in Make when building a project at work. I did some testing around and the following are my findings. Make segfaults with the binary available on Ubuntu 22.04 (Make-4.3), but not the one on Ubuntu 21.10 (Make-4.3). It also works fine on Ubuntu 20.04 with Make-4.2.1. I had a colleague send me his binary from 21.10 and it works fine, while mine on 22.04 does not. Both are Make-4.3. Building Make-4.3 from source also causes the segfault, which makes it seem like Ubuntu has done some modification that even made it work initially. But that change has now been undone? Also, building the latest Make from source does not cause any segfault. But it seems to have reworked the part that crashes and possibly a lot more. So it is no longer an issue upstream. The cause of the segfault is at `src/function.c` at function `func_filter_filterout` at the following code. The alloca keeps allocating on the stack until it goes outside memory and causes write outside its own memory. while ((p = find_next_token (_iterator, )) != 0) { struct a_word *word = alloca (sizeof (struct a_word)); *wordtail = word; wordtail = >next; if (*word_iterator != '\0') ++word_iterator; p[len] = '\0'; word->str = p; word->length = len; word->matched = 0; word->chain = 0; words++; } Though, the root cause seems to be different because this code is the same in the different versions of Ubuntu's Make source code. When it segfaults this part seems to be iterating over many things which it should not iterate over. The project I'm building is based on Buildroot. Regarding that, it seems to be failing between the Configuration and the Build step. It finishes Configuration, but never reaches the start of Build. This only seems to happen when `modules` package is pointing to a separate folder of modules. If I put the `hello` module as a normal package there is no issue building it. Run the commands below to recreate. Note that the initial build will take some time, as it has to build the Linux kernel. $ git clone https://github.com/westermo/netbox/tree/make-bug $ cd netbox $ make netbox_os_zero_defconfig $ make $ make modules-reconfigure # segfault happens here After that, the last command can be repeated to test building the modules. I had several other colleagues try this on their computers as well, and the result was the same. Segfault on Ubuntu 22.04, but not on earlier versions. Best Regards, Casper -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: [ubuntu-studio-devel] Upgrade Notifications for Kubuntu and Ubuntu Studio
Hi everyone! 1) PackageKit should remove unused stuff automatically during regular upgrades on APT-based systems (the backend is configured that way already) 2) AppStream supports a way to not only signal that a new OS release is available, but also provide a basic changelog. What it does not (and can not (yet?) provide is specific instructions as to *how* to jump to a new release, as that is very distribution specific. See https://www.freedesktop.org/software/appstream/docs/sect-Metadata-OS.html 3) PackageKit is theoretically able to upgrade a system, see https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html#Transaction.UpgradeSystem - we would preferably implement this via the offline-upgrades mechanism nowadays though. The specific mechanism to jump between distro releases once existed in the PackageKit APT backend, but was removed ages ago because it was very buggy and needed a rewrite anyway. So, all that's needed is for someone to implement support for the `operating-system` component in Discover, for Ubuntu to ship such a component if it doesn't do that already, and for someone to properly implement distro upgrades in the APT backend of PackageKit and wire that up to Discover. Pull requests for all of these, especially work on PackageKit, are very welcome ;-) Cheers, Matthias¹ ¹ who maintains AppStream and tries to dodge the PackageKit maintainer hat that gets thrown at him -- I welcome VSRE emails. See http://vsre.info/ -- ubuntu-studio-devel mailing list ubuntu-studio-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel
Re: Upgrade Notifications for Kubuntu and Ubuntu Studio
Hi everyone! 1) PackageKit should remove unused stuff automatically during regular upgrades on APT-based systems (the backend is configured that way already) 2) AppStream supports a way to not only signal that a new OS release is available, but also provide a basic changelog. What it does not (and can not (yet?) provide is specific instructions as to *how* to jump to a new release, as that is very distribution specific. See https://www.freedesktop.org/software/appstream/docs/sect-Metadata-OS.html 3) PackageKit is theoretically able to upgrade a system, see https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html#Transaction.UpgradeSystem - we would preferably implement this via the offline-upgrades mechanism nowadays though. The specific mechanism to jump between distro releases once existed in the PackageKit APT backend, but was removed ages ago because it was very buggy and needed a rewrite anyway. So, all that's needed is for someone to implement support for the `operating-system` component in Discover, for Ubuntu to ship such a component if it doesn't do that already, and for someone to properly implement distro upgrades in the APT backend of PackageKit and wire that up to Discover. Pull requests for all of these, especially work on PackageKit, are very welcome ;-) Cheers, Matthias¹ ¹ who maintains AppStream and tries to dodge the PackageKit maintainer hat that gets thrown at him -- I welcome VSRE emails. See http://vsre.info/ -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Re: [ubuntu-studio-devel] Upgrade Notifications for Kubuntu and Ubuntu Studio
Hi Matthias! Great to hear from you! On Friday, September 9, 2022 8:31:32 AM PDT Matthias Klumpp wrote: > Hi everyone! > > 1) PackageKit should remove unused stuff automatically during regular > upgrades on APT-based systems (the backend is configured that way > already) Definitely a good step. > 2) AppStream supports a way to not only signal that a new OS release > is available, but also provide a basic changelog. What it does not > (and can not (yet?) provide is specific instructions as to *how* to > jump to a new release, as that is very distribution specific. See > https://www.freedesktop.org/software/appstream/docs/sect-Metadata-OS.html > 3) PackageKit is theoretically able to upgrade a system, see > https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html#Tra > nsaction.UpgradeSystem - we would preferably implement this via the > offline-upgrades > mechanism nowadays though. The specific mechanism to jump between > distro releases once existed in the PackageKit APT backend, but was > removed ages ago because it was very buggy and needed a rewrite > anyway. I think we're in the clear on this piece now. I was able to package distro- release-notifier from Harald Sitter et al (https://invent.kde.org/system/ distro-release-notifier) which uses the existing backend of Ubuntu's update- notifier. This means that it doesn't have to use appstream and launches the proper do-release-upgrade GUI frontend. I have tested it in 20.04 and it works properly, so I intend to get this into Ubuntu Studio (and discuss it further with Kubuntu so they don't end up in this situation again). -- Erich Eickmeyer Project Leader - Ubuntu Studio Member - Ubuntu Community Council signature.asc Description: This is a digitally signed message part. -- ubuntu-studio-devel mailing list ubuntu-studio-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel
Re: Upgrade Notifications for Kubuntu and Ubuntu Studio
Hi Matthias! Great to hear from you! On Friday, September 9, 2022 8:31:32 AM PDT Matthias Klumpp wrote: > Hi everyone! > > 1) PackageKit should remove unused stuff automatically during regular > upgrades on APT-based systems (the backend is configured that way > already) Definitely a good step. > 2) AppStream supports a way to not only signal that a new OS release > is available, but also provide a basic changelog. What it does not > (and can not (yet?) provide is specific instructions as to *how* to > jump to a new release, as that is very distribution specific. See > https://www.freedesktop.org/software/appstream/docs/sect-Metadata-OS.html > 3) PackageKit is theoretically able to upgrade a system, see > https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html#Tra > nsaction.UpgradeSystem - we would preferably implement this via the > offline-upgrades > mechanism nowadays though. The specific mechanism to jump between > distro releases once existed in the PackageKit APT backend, but was > removed ages ago because it was very buggy and needed a rewrite > anyway. I think we're in the clear on this piece now. I was able to package distro- release-notifier from Harald Sitter et al (https://invent.kde.org/system/ distro-release-notifier) which uses the existing backend of Ubuntu's update- notifier. This means that it doesn't have to use appstream and launches the proper do-release-upgrade GUI frontend. I have tested it in 20.04 and it works properly, so I intend to get this into Ubuntu Studio (and discuss it further with Kubuntu so they don't end up in this situation again). -- Erich Eickmeyer Project Leader - Ubuntu Studio Member - Ubuntu Community Council signature.asc Description: This is a digitally signed message part. -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Re: Upgrade Notifications for Kubuntu and Ubuntu Studio
On Friday, September 9, 2022 3:09:32 AM PDT Julian Andres Klode wrote: > On Thu, Sep 08, 2022 at 08:46:31PM -0700, Erich Eickmeyer wrote: > > Hi Aleix, > > > > On Thursday, September 8, 2022 1:30:02 PM PDT Aleix Pol wrote: > > > Note that Discover is just using PackageKit, so it's a problem to > > > address > > > there. > > > > > > If despite having Discover be "very, very flawed" you want to have a > > > discussion one day about how to make it fit for your purpose, I'll be > > > happy to join and see what can be done. > > > > That was not meant as an insult to your work, and I'm terribly sorry if it > > arrived that way. Honestly, Discover is a fine piece of software, > > especially as a software store and I quite enjoy using it as such. > > However, I think you're right, my observations toward the "very, very > > flawed" might be better directed at PackageKit since it doesn't have the > > capability to do autoremove like I'm suggesting for software updates. > > It's not hard to implement, it's basically > >bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false); >bool doAutoRemoveKernels = > _config->FindB("APT::Get::AutomaticRemove::Kernels", false); bool > hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove"); > >std::unique_ptr kernelAutoremovalMatcher; >if (doAutoRemoveKernels && !doAutoRemove) >{ > kernelAutoremovalMatcher = > APT::KernelAutoRemoveHelper::GetProtectedKernelsFilter(Cache, true); } > >Cache->MarkAndSweep(); > >SortedPackageUniverse Universe(Cache); >// look over the cache to see what can be removed >for (auto const : Universe) >{ > if (Cache[Pkg].Garbage) > { > if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) >if(Debug) > std::cout << "We could delete " << APT::PrettyPkg(Cache, Pkg) > << std::endl; if (doAutoRemove || (kernelAutoremovalMatcher != nullptr && > (*kernelAutoremovalMatcher)(Pkg))) { >if(Pkg.CurrentVer() != 0 && > Pkg->CurrentState != pkgCache::State::ConfigFiles) > Cache->MarkDelete(Pkg, purgePkgs, 0, false); >else > Cache->MarkKeep(Pkg, false, false); > } > > > at the right place after calling Upgrade(). > > Though I don't know maybe it needs the following code bits too where we > recover packages we now have broken. > >// we could have removed a new dependency of a garbage package, >// so check if a reverse depends is broken and if so install it again. > > Probably it makes sense to extract the non-CLI bits of DoAutoremove() in > apt-private to apt-pkg, so PackageKit and others just have one function to > call to do any autoremovals that should be done by policy. Right. We definitely want to be careful here. The strength of update-manager is that it presents the user with a checkbox list of packages to remove and gives them the option whether or not to remove those packages. Autoremoving wholesale is not what I'm looking for here, and I guess I should've communicated that better. -- Erich Eickmeyer Project Leader - Ubuntu Studio Member - Ubuntu Community Council signature.asc Description: This is a digitally signed message part. -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Re: [ubuntu-studio-devel] Upgrade Notifications for Kubuntu and Ubuntu Studio
On Friday, September 9, 2022 3:09:32 AM PDT Julian Andres Klode wrote: > On Thu, Sep 08, 2022 at 08:46:31PM -0700, Erich Eickmeyer wrote: > > Hi Aleix, > > > > On Thursday, September 8, 2022 1:30:02 PM PDT Aleix Pol wrote: > > > Note that Discover is just using PackageKit, so it's a problem to > > > address > > > there. > > > > > > If despite having Discover be "very, very flawed" you want to have a > > > discussion one day about how to make it fit for your purpose, I'll be > > > happy to join and see what can be done. > > > > That was not meant as an insult to your work, and I'm terribly sorry if it > > arrived that way. Honestly, Discover is a fine piece of software, > > especially as a software store and I quite enjoy using it as such. > > However, I think you're right, my observations toward the "very, very > > flawed" might be better directed at PackageKit since it doesn't have the > > capability to do autoremove like I'm suggesting for software updates. > > It's not hard to implement, it's basically > >bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false); >bool doAutoRemoveKernels = > _config->FindB("APT::Get::AutomaticRemove::Kernels", false); bool > hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove"); > >std::unique_ptr kernelAutoremovalMatcher; >if (doAutoRemoveKernels && !doAutoRemove) >{ > kernelAutoremovalMatcher = > APT::KernelAutoRemoveHelper::GetProtectedKernelsFilter(Cache, true); } > >Cache->MarkAndSweep(); > >SortedPackageUniverse Universe(Cache); >// look over the cache to see what can be removed >for (auto const : Universe) >{ > if (Cache[Pkg].Garbage) > { > if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) >if(Debug) > std::cout << "We could delete " << APT::PrettyPkg(Cache, Pkg) > << std::endl; if (doAutoRemove || (kernelAutoremovalMatcher != nullptr && > (*kernelAutoremovalMatcher)(Pkg))) { >if(Pkg.CurrentVer() != 0 && > Pkg->CurrentState != pkgCache::State::ConfigFiles) > Cache->MarkDelete(Pkg, purgePkgs, 0, false); >else > Cache->MarkKeep(Pkg, false, false); > } > > > at the right place after calling Upgrade(). > > Though I don't know maybe it needs the following code bits too where we > recover packages we now have broken. > >// we could have removed a new dependency of a garbage package, >// so check if a reverse depends is broken and if so install it again. > > Probably it makes sense to extract the non-CLI bits of DoAutoremove() in > apt-private to apt-pkg, so PackageKit and others just have one function to > call to do any autoremovals that should be done by policy. Right. We definitely want to be careful here. The strength of update-manager is that it presents the user with a checkbox list of packages to remove and gives them the option whether or not to remove those packages. Autoremoving wholesale is not what I'm looking for here, and I guess I should've communicated that better. -- Erich Eickmeyer Project Leader - Ubuntu Studio Member - Ubuntu Community Council signature.asc Description: This is a digitally signed message part. -- ubuntu-studio-devel mailing list ubuntu-studio-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel
Re: [ubuntu-studio-devel] Upgrade Notifications for Kubuntu and Ubuntu Studio
On Thu, Sep 08, 2022 at 08:46:31PM -0700, Erich Eickmeyer wrote: > Hi Aleix, > > On Thursday, September 8, 2022 1:30:02 PM PDT Aleix Pol wrote: > > Note that Discover is just using PackageKit, so it's a problem to address > > there. > > > > If despite having Discover be "very, very flawed" you want to have a > > discussion one day about how to make it fit for your purpose, I'll be > > happy to join and see what can be done. > > > > That was not meant as an insult to your work, and I'm terribly sorry if it > arrived that way. Honestly, Discover is a fine piece of software, especially > as > a software store and I quite enjoy using it as such. However, I think you're > right, my observations toward the "very, very flawed" might be better > directed > at PackageKit since it doesn't have the capability to do autoremove like I'm > suggesting for software updates. It's not hard to implement, it's basically bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false); bool doAutoRemoveKernels = _config->FindB("APT::Get::AutomaticRemove::Kernels", false); bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove"); std::unique_ptr kernelAutoremovalMatcher; if (doAutoRemoveKernels && !doAutoRemove) { kernelAutoremovalMatcher = APT::KernelAutoRemoveHelper::GetProtectedKernelsFilter(Cache, true); } Cache->MarkAndSweep(); SortedPackageUniverse Universe(Cache); // look over the cache to see what can be removed for (auto const : Universe) { if (Cache[Pkg].Garbage) { if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) if(Debug) std::cout << "We could delete " << APT::PrettyPkg(Cache, Pkg) << std::endl; if (doAutoRemove || (kernelAutoremovalMatcher != nullptr && (*kernelAutoremovalMatcher)(Pkg))) { if(Pkg.CurrentVer() != 0 && Pkg->CurrentState != pkgCache::State::ConfigFiles) Cache->MarkDelete(Pkg, purgePkgs, 0, false); else Cache->MarkKeep(Pkg, false, false); } at the right place after calling Upgrade(). Though I don't know maybe it needs the following code bits too where we recover packages we now have broken. // we could have removed a new dependency of a garbage package, // so check if a reverse depends is broken and if so install it again. Probably it makes sense to extract the non-CLI bits of DoAutoremove() in apt-private to apt-pkg, so PackageKit and others just have one function to call to do any autoremovals that should be done by policy. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en signature.asc Description: PGP signature -- ubuntu-studio-devel mailing list ubuntu-studio-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel
[ubuntu-studio-devel] Ubuntu Studio daily CD health check
This is a daily health check report on the Ubuntu Studio CD images. If you have any questions, contact Colin Watson . ubuntustudio/dvd: kinetic-dvd-amd64.iso oversized by 130870784 bytes (5130870784) -- ubuntu-studio-devel mailing list ubuntu-studio-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel
Re: Upgrade Notifications for Kubuntu and Ubuntu Studio
On Thu, Sep 08, 2022 at 08:46:31PM -0700, Erich Eickmeyer wrote: > Hi Aleix, > > On Thursday, September 8, 2022 1:30:02 PM PDT Aleix Pol wrote: > > Note that Discover is just using PackageKit, so it's a problem to address > > there. > > > > If despite having Discover be "very, very flawed" you want to have a > > discussion one day about how to make it fit for your purpose, I'll be > > happy to join and see what can be done. > > > > That was not meant as an insult to your work, and I'm terribly sorry if it > arrived that way. Honestly, Discover is a fine piece of software, especially > as > a software store and I quite enjoy using it as such. However, I think you're > right, my observations toward the "very, very flawed" might be better > directed > at PackageKit since it doesn't have the capability to do autoremove like I'm > suggesting for software updates. It's not hard to implement, it's basically bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false); bool doAutoRemoveKernels = _config->FindB("APT::Get::AutomaticRemove::Kernels", false); bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove"); std::unique_ptr kernelAutoremovalMatcher; if (doAutoRemoveKernels && !doAutoRemove) { kernelAutoremovalMatcher = APT::KernelAutoRemoveHelper::GetProtectedKernelsFilter(Cache, true); } Cache->MarkAndSweep(); SortedPackageUniverse Universe(Cache); // look over the cache to see what can be removed for (auto const : Universe) { if (Cache[Pkg].Garbage) { if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) if(Debug) std::cout << "We could delete " << APT::PrettyPkg(Cache, Pkg) << std::endl; if (doAutoRemove || (kernelAutoremovalMatcher != nullptr && (*kernelAutoremovalMatcher)(Pkg))) { if(Pkg.CurrentVer() != 0 && Pkg->CurrentState != pkgCache::State::ConfigFiles) Cache->MarkDelete(Pkg, purgePkgs, 0, false); else Cache->MarkKeep(Pkg, false, false); } at the right place after calling Upgrade(). Though I don't know maybe it needs the following code bits too where we recover packages we now have broken. // we could have removed a new dependency of a garbage package, // so check if a reverse depends is broken and if so install it again. Probably it makes sense to extract the non-CLI bits of DoAutoremove() in apt-private to apt-pkg, so PackageKit and others just have one function to call to do any autoremovals that should be done by policy. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en signature.asc Description: PGP signature -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel