Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[install] Pacman segfaults with a single server in the mirrorlist #802

Open
LukeShortCloud opened this issue Mar 30, 2024 · 7 comments
Open
Labels
bug Something isn't working upstream Waiting on an upstream code merge.

Comments

@LukeShortCloud
Copy link
Owner

Pacman will always report a segmentation fault when trying to download database files when the XferCommand is configured to use wget.

Installing arch...
+ pacstrap -i /winesapos base base-devel wget --noconfirm
==> Creating install root at /winesapos
==> Installing packages to /winesapos
:: Synchronizing package databases...
--2024-03-30 05:12:17--  http://repo.ialab.dsu.edu/archlinux/core/os/x86_64/core.db
Resolving repo.ialab.dsu.edu (repo.ialab.dsu.edu)... 138.247.115.248
Connecting to repo.ialab.dsu.edu (repo.ialab.dsu.edu)|138.247.115.248|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 131629 (129K) [application/octet-stream]
Saving to: ‘/winesapos/var/lib/pacman/sync/core.db.part’

     0K .......... .......... .......... .......... .......... 38%  539K 0s
    50K .......... .......... .......... .......... .......... 77% 1.05M 0s
   100K .......... .......... ........                        100% 62.9M=0.1s

2024-03-30 05:12:18 (921 KB/s) - ‘/winesapos/var/lib/pacman/sync/core.db.part’ saved [131629/131629]


error: segmentation fault
Please submit a full bug report with --debug if appropriate.
25h==> ERROR: Failed to install packages to new root
@LukeShortCloud LukeShortCloud added the bug Something isn't working label Mar 30, 2024
LukeShortCloud added a commit that referenced this issue Mar 30, 2024
instead of 'wget' for the Pacman XferCommand.

Resolves #802
LukeShortCloud added a commit that referenced this issue Mar 30, 2024
instead of 'wget' for the Pacman XferCommand.

Resolves #802
LukeShortCloud added a commit that referenced this issue Mar 30, 2024
instead of 'wget' for the Pacman XferCommand.

Resolves #802
LukeShortCloud added a commit that referenced this issue Mar 30, 2024
instead of 'wget' for the Pacman XferCommand.

Related #775
Related #802
LukeShortCloud added a commit that referenced this issue Mar 30, 2024
instead of 'wget' for the Pacman XferCommand.

Related #775
Related #802
@LukeShortCloud
Copy link
Owner Author

It seems like the issue is with Pacman itself. There is a known bug that Pacman will result in a segfault when (1) there is only one server in a mirrorlist and (2) GPG key checking is enabled.

This was fixed 1 week ago. The latest release of Pacman is 6.1.0 from 3 weeks ago. We will have to wait for a new release of Pacman.

https://bbs.archlinux.org/viewtopic.php?id=293911
https://gitlab.archlinux.org/pacman/pacman/-/issues/108

@LukeShortCloud
Copy link
Owner Author

This issue only appears while using the new WINESAPOS_SINGLE_MIRROR=true environment variable.

@LukeShortCloud LukeShortCloud changed the title [install] HTTP proxy does not work when Pacman uses wget for the XferCommand [install] Pacman segfaults with a single server in the mirrorlist Mar 30, 2024
@LukeShortCloud
Copy link
Owner Author

A bugfix Pacman 6.1.1 release with this fix is being planned.

https://gitlab.archlinux.org/pacman/pacman/-/milestones/2#tab-issues

@LukeShortCloud LukeShortCloud added the upstream Waiting on an upstream code merge. label Apr 16, 2024
@LukeShortCloud LukeShortCloud self-assigned this May 1, 2024
LukeShortCloud added a commit that referenced this issue May 1, 2024
from the live environment within the chroot. This makes downloads
faster and avoids issues when a single or no mirror is configured.

Related #802
@LukeShortCloud
Copy link
Owner Author

I can confirm that (1) not using a single mirror and (2) commenting out the sed commands to enable the XferCommand allows local builds to work again with pacman 6.1.0-3.

@GuestSneezeOSDev
Copy link

GuestSneezeOSDev commented May 17, 2024

if pacman is not working we can use this command

pacman -Syu haveged
systemctl start haveged
systemctl enable haveged

rm -fr /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux

@JerryWJackson
Copy link

JerryWJackson commented May 25, 2024

I can verify that adding a duplicate Server line immediately beneath the existing one for only the winesapos repo fixes this segfault and allows package installation and db sync to complete as expected.

So it is the same bug from upstream.

@LukeShortCloud
Copy link
Owner Author

@GuestSneezeOSDev Thanks for the suggestion! I gave it a try but the service checks to see if the Linux kernel version is 5.6 or older before starting. Newer Linux kernels appear to have patches that make the random entropy on-par with what haveged provides. As part of our builds, we already do the second part of importing the latest Arch Linux GPG keys.

@JerryWJackson Thanks for confirming! I'm holding out for Pacman 6.1.1 to be released instead of relying on the mentioned workaround of adding an extra Server = line. Hopefully that will be soon.

Oddly, our GitHub Actions pipelines used to fail with this issue on the Chaotic AUR repository but that is no longer the case. I only notice it on local builds. We use container builds (with cache removed) so everything is supposed to be reproducible but apparently it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Waiting on an upstream code merge.
Projects
None yet
Development

No branches or pull requests

3 participants