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

Arch Pacman broken (fails reading list of installed packages) #2310

Closed
fpqc opened this issue Jul 11, 2017 · 20 comments
Closed

Arch Pacman broken (fails reading list of installed packages) #2310

fpqc opened this issue Jul 11, 2017 · 20 comments

Comments

@fpqc
Copy link

fpqc commented Jul 11, 2017

Build 16237

Installing packages with pacman in an Arch userspace (manual setup instructions here ) now fails to see that installed packages are installed, so installing a new package will install all dependencies up to the very top of the dependency tree. I think this also happened in the previous build (16236) (actually no longer sure), and I'm not sure if it happened due to a change in the code of Pacman or a change in WSL (I don't have a Win10 computer on hand running CU, just insider builds).

The workaround is to delete the local database (/var/lib/pacman/local) before every manual installation of a package, but this completely breaks updating with -Su.

@sunilmut
Copy link
Member

@fpqc - Are you able to downgrade the pacman version to see if that changes anything? That will reduce one of the variable here.

@DDoSolitary
Copy link

@sunilmut I also have this problem too after upgrading build 16237. I didn't upgrade the pacman.

@fpqc
Copy link
Author

fpqc commented Jul 11, 2017

@sunilmut Grabbed 5.0.1-5 from my remote package cache downgrading now.

Edit: Still fails in the same way. I'm using this bootstrap tarball

https://mirrors.kernel.org/archlinux/iso/latest/archlinux-bootstrap-2017.07.01-x86_64.tar.gz

Here's the one from May, which definitely worked at the time on earlier builds of Windows:

https://mirrors.kernel.org/archlinux/iso/2017.05.01/archlinux-bootstrap-2017.05.01-x86_64.tar.gz

It fails when you chroot in to see the existing pacman database, meaning that it must be a WSL regression and not a pacman or glibc regression.

@fpqc
Copy link
Author

fpqc commented Jul 11, 2017

@sunilmut If you untar and chroot into the bootstrap environment, pacman -Q will show no output.

Previously (on earlier builds like 16215), pacman -Q while chrooted would output this list for 05.01 bootstrap tarball and this list for 07.01 bootstrap tarball.

The output on WSL 16237 is nonexistent.

Since the updated versions of strace are still not working due to #555 , I'm guessing you can get the traces directly out of the driver to see what syscalls are getting hit and perhaps what's breaking.

@benhillis benhillis added the bug label Jul 11, 2017
@sunilmut
Copy link
Member

Looking into this now, starting with a repro.

@sunilmut
Copy link
Member

Looks like I have a repro. Will start digging.

@sunilmut
Copy link
Member

Found the culprit.

syscall trace of pacman -Q on build 16215, where things are working:

GETDENTS - 3, {000000000154DD40}, 32768 = 3107
GETDENTS - 3, {000000000154DD40}, 32768 = 0
LSEEK - 3, 0, 0 = 0
GETDENTS - 3, {000000000154DD40}, 32768 = 3107
GETDENTS - 3, {000000000154DD40}, 32768 = 0

syscall trace of pacman -Q on build 16237, where things are broken:

GETDENTS - 3, {0000000001E13D40}, 32768 = 3424
GETDENTS - 3, {0000000001E13D40}, 32768 = 0
LSEEK - 3, 0, 0 = 0
GETDENTS - 3, {0000000001E13D40}, 32768 = 0

Note how after the LSEEK call, the cursor is not rewinding. We did some changes to the getdents syscall recently and regressed this. I tested some privates and the issue is resolved. I will get this in and try to get it fast tracked. Thanks @fpqc for reporting the issue. Also adding @SvenGroot as FYI.

@sunilmut
Copy link
Member

The fix has been checked in the dev branch and we will try to get it up as soon as possible.

Additionally, are there any other known blockers in getting strace to work on Arch, other than #555 ?

@therealkenc
Copy link
Collaborator

Additionally, are there any other known blockers in getting strace to work on Arch

Nah PTRACE_O_TRACEEXIT will make strace 4.15 happy AFAIK. The breakage was this change here per #1578.

@sunilmut
Copy link
Member

@SvenGroot recently added support for PTRACE_O_TRACEEXIT, which is making it's way to the Insider build.

@sunilmut
Copy link
Member

#555 is "fixinbound" :)

@mateuszlewko
Copy link

In which build we can expect this fix?

@benhillis
Copy link
Member

Most recent Insider build has the fix.

@meltdown03
Copy link

Do we have to uninstall / reinstall to see the chages? Running pacman -Q still shows nothing for me on latest build.

@benhillis
Copy link
Member

benhillis commented Aug 1, 2017

No you do not have to reinstall. I read over this thread again and it looks like there is one additional fix that will be coming soon.

@fpqc
Copy link
Author

fpqc commented Aug 1, 2017

@meltdown03 If you used my workaround it is highly recommended to reinstall because the database will be broken and inaccurate.

@meltdown03
Copy link

I've been using the workaround everytime I install/update anything. There's no way to rebuild the database somehow?

@fpqc
Copy link
Author

fpqc commented Aug 1, 2017

Nope. This was sort of implicit when I warned that -Su is going to break. You could fix it I guess by doing pacman -S base base-devel --force and then manually force-reinstalling each of the packages you had previously installed.

@fpqc
Copy link
Author

fpqc commented Aug 3, 2017

@benhillis You should just be able to mark this fixed (not even fixedininsider because it was a fast-ring only regression). I tested in the latest build and all is well.

@benhillis
Copy link
Member

This is fixed in 16257.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants