Manjaro-pacnew-checker causing a bunch of systemd units not to start

Installed manjaro-pacnew-checker to actively monitor for any *.pacnew files.

Tested as described here

All seemed fine until I had to reboot after doing the latest stable update. After system came up I noticed a bunch of my user systemd services hadn’t come up.

journalctl | grep -i 'pacnew' shows the following;

Mar 20 15:50:17 [REDACTED] systemd[586]: basic.target: Found dependency on pacnew-checker.path/start
Mar 20 15:50:17 [REDACTED] systemd[586]: Started "Monitor the *.pacnew/*.pacsave files creations".
Mar 20 15:50:41 [REDACTED] systemd[629]: basic.target: Found dependency on pacnew-checker.path/start
Mar 20 15:50:41 [REDACTED] systemd[629]: Started "Monitor the *.pacnew/*.pacsave files creations".
Mar 20 15:50:50 [REDACTED] systemd[586]: Stopped "Monitor the *.pacnew/*.pacsave files creations".
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found ordering cycle on default.target/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on xdg-user-dirs-update.service/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on basic.target/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on paths.target/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on pacnew-checker.path/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Job xdg-user-dirs-update.service/start deleted to break ordering cycle starting with pacnew-checker.path/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found ordering cycle on default.target/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on basic.target/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on paths.target/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Found dependency on pacnew-checker.path/start
Mar 21 01:09:16 [REDACTED] systemd[594]: pacnew-checker.path: Job paths.target/start deleted to break ordering cycle starting with pacnew-checker.path/start
Mar 21 01:09:16 [REDACTED] systemd[594]: Started "Monitor the *.pacnew/*.pacsave files creations".
Mar 21 01:09:24 [REDACTED] systemd[631]: default.target: Found dependency on pacnew-checker.path/start
Mar 21 01:09:24 [REDACTED] systemd[631]: default.target: Found dependency on pacnew-checker.path/start
Mar 21 01:09:24 [REDACTED] systemd[631]: default.target: Found dependency on pacnew-checker.path/start
Mar 21 01:09:24 [REDACTED] systemd[631]: atuin-daemon.service: Found dependency on pacnew-checker.path/start
Mar 21 01:09:24 [REDACTED] systemd[631]: Started "Monitor the *.pacnew/*.pacsave files creations".
Mar 21 01:09:34 [REDACTED] systemd[594]: Stopped "Monitor the *.pacnew/*.pacsave files creations".
Mar 21 04:33:46 [REDACTED] systemd[631]: Starting "Run GUI for manage Pacnew/Pacsave files"...
Mar 21 04:33:51 [REDACTED] systemd[631]: Started "Run GUI for manage Pacnew/Pacsave files".
Mar 21 04:33:52 [REDACTED] systemd[631]: pacnew-checker.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 04:33:52 [REDACTED] systemd[631]: pacnew-checker.service: Failed with result 'exit-code'.

Seems to indicate an ordering cycle between pacnew-checker and default.target but I cant see any unit file for pacnew-checker apart from

/usr/lib/systemd/user/pacnew-checker.path

and

/usr/lib/systemd/user/pacnew-checker.service

but then they don’t seem to do anything since

systemd-analyze verify /usr/lib/systemd/user/pacnew-checker.path

and

systemd-analyze verify /usr/lib/systemd/user/pacnew-checker.service

produce no output.

If I uninstall manjaro-pacnew-checker then all the systemd units including my (–user) ones work as expected.

Anything I can do to break the ordering cycle and where would its origin be?

The pacnew-checker is enabled for all users (the --global flag).

As such it should not interfere with the general system.

Because the service itself is has no install directive it cannot be enabled.

The service is invoked by the path unit when a path condition exist - in this case /tmp/pacnew-check.file which is created by pacnew-check.sh (based on the result of pacdiff -o command).

At first glance one could think of a conflict between After= and WantedBy= and if it is - then removing the After= may be the solution - but @Ste74 has likely researched this thoroughly so I believe it is correct as it is.

At least my system does not exhibit any strange behavior.

You may try commenting After=, see if it changes behavior on your system

[Unit]
Description="Monitor the *.pacnew/*.pacsave files creations"
After=default.target

[Path]
PathExists=/tmp/pacnew-check.file
Unit=pacnew-checker.service

[Install]
WantedBy=default.target

(similar to how a timer can invoke a service and automount can invoke a mount unit)

1 Like

Done.

All units work as expected globally but am inclined to try and find out why my systems behave diffently from those of @linux-aarhus and others rather than accept that as a solution.

I am inclined to think it is something else - I know it looks weird that you can fix the behaviour by removing and reproduce by installing - I won’t go into that.

A test on a system which has never seen the package - and one which I never touched .pac*-files - I installed and rebooted to activate the path.

Then I ran the pacnew-checker script and checked the journal

journal output
 $ journalctl | grep -i 'pacnew'
Mar 21 10:30:46 fox13 sudo[3407]:       fh : TTY=pts/0 ; PWD=/home/fh ; USER=root ; COMMAND=/usr/bin/pacman -Syu manjaro-pacnew-checker
Mar 21 10:32:15 fox13 systemd[1220]: basic.target: Found dependency on pacnew-checker.path/start
Mar 21 10:32:15 fox13 systemd[1220]: Started "Monitor the *.pacnew/*.pacsave files creations".
Mar 21 10:32:21 fox13 systemd[1299]: basic.target: Found dependency on pacnew-checker.path/start
Mar 21 10:32:21 fox13 systemd[1299]: Started "Monitor the *.pacnew/*.pacsave files creations".
Mar 21 10:32:30 fox13 systemd[1220]: Stopped "Monitor the *.pacnew/*.pacsave files creations".

Then I triggered the path by touching the trigger file /tmp/pacnew-check.file which launched the gui as expected.

I went through the files - now I remember why I do not use it - painstaking editing …

journal output
 $ journalctl | grep -i 'pacnew'
[...]
Mar 21 10:38:32 fox13 systemd[1299]: Starting "Run GUI for manage Pacnew/Pacsave files"...
Mar 21 10:38:37 fox13 systemd[1299]: Started "Run GUI for manage Pacnew/Pacsave files".
Mar 21 10:39:30 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain TEMPORARY authorization for action org.gtk.vfs.file-operations for unix-process:2649:44930 [/usr/bin/python3 /usr/bin/meld admin:///etc/passwd admin:///etc/passwd.pacnew] (owned by unix-user:fh)
Mar 21 10:40:38 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:40:38 fox13 pkexec[2833]: fh: Executing command [USER=root] [TTY=unknown] [CWD=/home/fh] [COMMAND=/usr/bin/rm -f /etc/passwd.pacnew]
Mar 21 10:40:54 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain TEMPORARY authorization for action org.gtk.vfs.file-operations for unix-process:2880:53373 [/usr/bin/python3 /usr/bin/meld admin:///etc/shells admin:///etc/shells.pacnew] (owned by unix-user:fh)
Mar 21 10:41:10 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:41:10 fox13 pkexec[2988]: fh: Executing command [USER=root] [TTY=unknown] [CWD=/home/fh] [COMMAND=/usr/bin/rm -f /etc/shells.pacnew]
Mar 21 10:41:19 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain TEMPORARY authorization for action org.gtk.vfs.file-operations for unix-process:3038:55883 [/usr/bin/python3 /usr/bin/meld admin:///etc/hostname admin:///etc/hostname.pacnew] (owned by unix-user:fh)
Mar 21 10:41:28 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:41:28 fox13 pkexec[3146]: fh: Executing command [USER=root] [TTY=unknown] [CWD=/home/fh] [COMMAND=/usr/bin/rm -f /etc/hostname.pacnew]
Mar 21 10:41:46 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:41:53 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain TEMPORARY authorization for action org.gtk.vfs.file-operations for unix-process:3332:59275 [/usr/bin/python3 /usr/bin/meld admin:///etc/makepkg.conf.d/rust.conf admin:///etc/makepkg.conf.d/rust.conf.pacnew] (owned by unix-user:fh)
Mar 21 10:42:50 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:42:50 fox13 pkexec[3490]: fh: Executing command [USER=root] [TTY=unknown] [CWD=/home/fh] [COMMAND=/usr/bin/rm -f /etc/makepkg.conf.d/rust.conf.pacnew]
Mar 21 10:42:56 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain TEMPORARY authorization for action org.gtk.vfs.file-operations for unix-process:3540:65648 [/usr/bin/python3 /usr/bin/meld admin:///etc/plymouth/plymouthd.conf admin:///etc/plymouth/plymouthd.conf.pacnew] (owned by unix-user:fh)
Mar 21 10:43:37 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:43:37 fox13 pkexec[3685]: fh: Executing command [USER=root] [TTY=unknown] [CWD=/home/fh] [COMMAND=/usr/bin/rm -f /etc/plymouth/plymouthd.conf.pacnew]
Mar 21 10:44:07 fox13 polkitd[976]: Operator of unix-session:2 successfully authenticated as unix-user:fh to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:2542:40138 [/bin/bash /usr/bin/pacnew-checker] (owned by unix-user:fh)
Mar 21 10:44:08 fox13 systemd[1299]: pacnew-checker.service: Consumed 20.469s CPU time, 81.6M memory peak.

But no strange behavior - everything is as expected…

//UPDATE:

I have just been able to reproduce the issue - I am running a syncthing user service - it has begun to fail because it conflicts with the pacnew checker.

I will have to investigate further …

3 Likes

I guess will have to accept this as the solution since it makes sense as the unit can’t come after another unit that already wants it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.