Rpm-ostree upgrade always fail on first try

Hi !

For some reason gnome software never works fine for me…
So I have to manually run the update commands, and for some reason I always need to run rpm-ostree twice. the first run always ends with the following error message:

Blockquote Txn Upgrade on /org/projectatomic/rpmostree1/fedora failed: Running %prein for akmods: bwrap(/bin/sh): Child process killed by signal 6; run journalctl -t 'rpm-ostree(akmods.prein)' for more information

Running the command that’s given in the error message give me this:

Blockquote Aug 12 14:59:57 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[8733]: groupadd: /etc/group.4: lock file already used (nlink: 1)
Aug 12 14:59:57 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[8733]: groupadd: cannot lock /etc/group; try again later.
Aug 12 14:59:57 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[8737]: useradd: group ‘akmods’ does not exist
Aug 12 15:16:49 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[23486]: groupadd: /etc/group.4: lock file already used (nlink: 1)
Aug 12 15:16:49 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[23486]: groupadd: cannot lock /etc/group; try again later.
Aug 12 15:16:49 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[23491]: useradd: group ‘akmods’ does not exist
– Boot b8027f3310ca4ddf8bf62d1468db2d91 –
Aug 15 09:52:55 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[5124]: groupadd: /etc/group.4: lock file already used (nlink: 1)
Aug 15 09:52:55 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[5124]: groupadd: cannot lock /etc/group; try again later.
Aug 15 09:52:55 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[5130]: useradd: group ‘akmods’ does not exist
– Boot b5f57d45d0564418acdd8370efb6aa4e –
Aug 20 08:45:40 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[4655]: groupadd: /etc/group.4: lock file already used (nlink: 1)
Aug 20 08:45:40 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[4655]: groupadd: cannot lock /etc/group; try again later.
Aug 20 08:45:40 DESKTOP-NFFGO5O rpm-ostree(akmods.prein)[4659]: useradd: group ‘akmods’ does not exist

Running rpm-ostree upgrade immediately after it usually works fine… From what I can gather it’s somewhat related to Nvidia drivers ? Did they fail to install properly ? Why do I need to run the command twice ? Is there a way to solve this permanently ?

When akmods was installed it ‘should’ have created both the akmods user and group
What is the result of grep akmods /etc/group and grep akmods /etc/passwd

If those entries do not exist then you should first remove akmods then install it new so the group and user entries are properly created.

# grep akmods /etc/group
akmods:x:973:

# grep akmods /etc/passwd
akmods:x:973:973:User is used by akmods to build akmod packages:/var/cache/akmods/:/sbin/nologin

If the entries already exist then it seems something else is causing those errors.

If I am understanding the errors reported it seems that installing akmods is unable to create the group entry and the missing group causes useradd to fail. The cause of the failure to create the group entry seems that there is a lock file already existing (/etc/group.4). It is possible that simply removing that lock file will solve the issue.

2 Likes

Added akmods, rpm-ostree and removed gnome

Might want to create an rpm-ostree issue

https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora

or

Not sure which is the best one, probably Fedoras. Maybe write on Bugzilla and link to Github

It does seems grep doesn’t return anything. Maybe the akmods thing didn’t install properly. I’ll try to remove it and re-install it.

The question still remains why does the update not fail the second time ?

There are known intermittent issues with akmods and the NVIDIA package: