You are not logged in.

#1 2022-04-02 05:16:32

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Pacman fails to upgrade some packages. [Solved]

I have been having a weird situation here. When I upgraded my computer, a few packages have been failing with this message:   

( 93/103) upgrading pipewire-pulse                                    [#######################################] 100%
error: Unable to read input file: Is a directory
error: command failed to execute correctly
( 94/103) upgrading python-click                                      [#######################################] 100%

Most packages upgraded normally, but pacman reported errors on the following packages:

 fish gimp gcr lib32-fontconfig pipewire grub pipewire-pulse samba 

Full response to

 sudo pacman -Syu 

here: https://bpa.st/XQOA
Pacman log is here: https://bpa.st/4WTA

After the upgrade, I have been getting weird errors from affected packages. For example, when opening fish, I get the following:

 [user@linuxlaptop ~]$ fish
error: Unable to open universal variable file '/': Permission denied
Linux linuxlaptop 5.16.16-arch1-1 x86_64
error: Unable to open universal variable file '/': Permission denied
 22:05:57 up 51 min,  1 user,  load average: 0.76, 0.89, 0.95
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
 I  user  ~  

So I thought, no big deal, I will just restore a btrfs snapshot from a week ago. Everything worked fine after restoring before the upgrade. Before I tried the upgrade again, I cleared my package cache with:

 sudo pacman -Sc 

However, pacman still reported the same errors during upgrade and fish is still reporting that weird error after upgrading. I ran a

 btrfs scrub start / 

to check for file corruption, and everything was normal.

Anyone have any ideas why pacman is reporting these errors? I am stumped.

Last edited by core_contingency (2022-04-03 14:30:08)

Offline

#2 2022-04-02 07:17:02

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

I cleared my package cache with

No, you didn't.

pacman -Sh wrote:

-c, --clean          remove old packages from cache directory (-cc for all)

Offline

#3 2022-04-02 08:46:40

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,659
Website

Re: Pacman fails to upgrade some packages. [Solved]

Did all packages give the exact same two line error during install?

Offline

#4 2022-04-02 20:18:14

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

 Did all packages give the exact same two line error during install? 

No, only

 fish gimp gcr lib32-fontconfig pipewire grub pipewire-pulse samba 

reported errors. You can go here: https://bpa.st/XQOA for the full pacman output.

 No, you didn't. 

Thanks. I restored from my snapshot, actually cleared my pacman cache this time with

 sudo pacman -Scc 

but I still got the same errors when upgrading.

Last edited by core_contingency (2022-04-02 20:18:27)

Offline

#5 2022-04-02 20:20:34

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Pacman fails to upgrade some packages. [Solved]

Post the output of...

pacman-conf

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2022-04-02 23:29:09

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

The results of

 pacman-conf 

are below:

https://bpa.st/64EA

I did have a local custom repo for AUR packages set up, but I already restored my old snapshot, removed the repo from /etc/pacman.conf, and tried the upgrade after deleting my pacman cache, changing my mirror, and using pacman -Syyu to verify that it wasn't my local repo causing the upgrade issue.

Last edited by core_contingency (2022-04-02 23:32:15)

Offline

#7 2022-04-03 06:30:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

Google says "error: Unable to read input file: Is a directory" is from fish, so…

echo $SHELL
stat /bin/bash
stat /bin/sh

Offline

#8 2022-04-03 07:08:21

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

First of all, thanks for all the help from everyone.

That is an interesting theory... I tried reinstalling the broken packages while using the bash shell by

/bin/bash
sudo pacman -Syu fish gimp gcr lib32-fontconfig pipewire grub pipewire-pulse samba 

and pacman still reports the same errors, so I not convinced this is a fish error. See here: https://bpa.st/X2OQ

[user@linuxlaptop ~]$ echo $SHELL
/bin/bash
[user@linuxlaptop ~]$ stat /bin/bash
  File: /bin/bash
  Size: 948624    	Blocks: 1856       IO Block: 4096   regular file
Device: 0,34	Inode: 16596013    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-04-02 12:56:28.531973834 -0700
Modify: 2022-01-08 11:31:11.000000000 -0700
Change: 2022-01-10 19:00:09.325901337 -0700
 Birth: 2022-01-10 19:00:09.322568035 -0700
[user@linuxlaptop ~]$ stat /bin/sh
  File: /bin/sh -> bash
  Size: 4         	Blocks: 8          IO Block: 4096   symbolic link
Device: 0,34	Inode: 16596015    Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-04-02 12:56:28.528640501 -0700
Modify: 2022-01-08 11:31:11.000000000 -0700
Change: 2022-01-10 19:00:09.325901337 -0700
 Birth: 2022-01-10 19:00:09.325901337 -0700 

Offline

#9 2022-04-03 07:14:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

Some pacman hook running a fish script?

Offline

#10 2022-04-03 07:30:14

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

Some pacman hook running a fish script?

Unfortunately, that doesn't seem to be the case. I checked all my pacman hooks in the /usr/share/libalpm/hooks and /etc/pacman.d/hooks directory, and no hooks seem to be calling fish.

Thanks for all the help everyone. I think for right now, I am going to be reinstalling. I have everything backed up, and I have been meaning to do it for a while, so this just gives me an excuse.

Offline

#11 2022-04-03 07:33:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

If you restore your backup, what makes you believe you'll end in a different situation?

pacman has a "--debug" switch that will make it very chatty and probably reveal what call causes this.
And I bet your right arm that some fish is at the other end of it tongue

Offline

#12 2022-04-03 07:50:28

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

Nice! I did not know about the pacman --debug option.

Relevant logs are here (from the failure when updating the gimp package):

debug: extracting /usr/share/man/man5/gimprc.5.gz
debug: extract: skipping dir extraction of /usr/share/metainfo/
debug: extracting /usr/share/metainfo/gimp-data-extras.metainfo.xml
debug: extracting /usr/share/metainfo/org.gimp.GIMP.appdata.xml
debug: updating database
debug: adding database entry 'gimp'
debug: writing gimp-2.10.30-2 DESC information back to db
debug: writing gimp-2.10.30-2 FILES information back to db
debug: adding entry 'gimp' in 'local' cache
debug: executing ". /tmp/alpm_SAyMKL/.INSTALL; post_upgrade 2.10.30-2 2.10.30-2"
debug: executing "/usr/bin/bash" under chroot "/"
error: Unable to read input file: Is a directory
debug: call to waitpid succeeded
error: command failed to execute correctly
debug: running ldconfig
debug: executing "/usr/bin/ldconfig" under chroot "/"
debug: call to waitpid succeeded
debug: parsing hook file /etc/pacman.d/hooks/nvidia.hook
debug: parsing hook file /usr/share/libalpm/hooks/dconf-update.hook
debug: parsing hook file /usr/share/libalpm/hooks/gtk-query-immodules-2.0.hook

Why does the debug say:

executing "/usr/bin/bash" under chroot "/"

I am very confused about what this means. I am not running bash in a chroot...

Last edited by core_contingency (2022-04-03 07:51:29)

Offline

#13 2022-04-03 08:28:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

pacman does, you'll notice that stanza in about every other line.

stat /tmp/alpm_SAyMKL/.INSTALL
stat /usr/bin/bash
pacman -Qikk bash

And there's some fish involved here - you could "strace -f pacman -S gimp" …

Offline

#14 2022-04-03 09:07:16

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

Results of

stat /tmp/alpm_SAyMKL/.INSTALL
stat /usr/bin/bash
pacman -Qikk bash

is here: https://bpa.st/YAJQ

The results of

strace -f pacman -S gimp

is here: https://drive.google.com/file/d/1FQWRan … sp=sharing

(The text file was too big for any pastebin service).

Sorry I can't help more, I don't really know how to interpret an strace.

Offline

#15 2022-04-03 13:03:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

bas looks fine.

The strace ends when you're being asked to continue, try

strace -f pacman --noconfirm -S gimp

Offline

#16 2022-04-03 13:31:20

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

Output of

sudo strace -o /home/user/Downloads/strace_updated.txt -f pacman --noconfirm -S gimp

https://drive.google.com/file/d/1NIpqzR … sp=sharing

Offline

#17 2022-04-03 13:35:26

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

77322 openat(AT_FDCWD, "/root/.bashrc", O_RDONLY) = 5
77322 newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=51, ...}, AT_EMPTY_PATH) = 0
77322 read(5, "[ -x /bin/fish ] && SHELL=/bin/f"..., 51) = 51
77322 close(5)                          = 0
77322 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

Smells like a rotting fish to me tongue
Check /root/.bashrc - it executes fish. Don't do that. Use chsh.

Offline

#18 2022-04-03 13:44:38

core_contingency
Member
Registered: 2019-08-07
Posts: 10

Re: Pacman fails to upgrade some packages. [Solved]

Smells like a rotting fish to me

Thank you so much! Haha, that is the problem with having a several year old installation of Arch - you forget all of your random custom configurations and hacks (that you were totally going to remove once that bug got fixed...) until they bite you in the ass.

After fixing my /root/.bashrc , pacman works fine and does not display those errors anymore. Nice investigative work. I think we can consider this issue closed.

Offline

#19 2022-04-03 13:55:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: Pacman fails to upgrade some packages. [Solved]

In other good news, you get to keep your arm cool

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB