Hi, we use several samba shares in our company to persistantly store data. We have qubes that automatically mount these shares when the qubes start up. But when its time to shut the qube down again then the systemd unit that is created for each mount, times out instead of shutting down gracefully. Here is an excerpt from console of one such qube:
[2023-01-25 12:16:28] [ 27.170811] CIFS: Attempting to mount \\example.com\mountpoint
[2023-01-25 12:16:34] [ 32.957077] systemd[1]: systemd-fsckd.service: Succeeded.
[2023-01-25 12:17:03] Stopping .[0;1;39mSession c1 of user user.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Removed slice .[0;1;39msystem-modprobe.slice.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped target .[0;1;39mMulti-User System.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped target .[0;1;39mLogin Prompts.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped target .[0;1;39mTimers.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mPeriodic ext4 Onli…ata Check for All Filesystems.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDiscard unused blocks once a week.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDaily rotation of log files.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDaily exim4-base housekeeping.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDaily man-db regeneration.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mUpdate system time each 6h.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mPeriodically check for updates.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDaily Cleanup of Temporary Directories.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped target .[0;1;39mSystem Time Synchronized.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped target .[0;1;39mSystem Time Set.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Closed .[0;1;39mLVM2 poll daemon socket.[0m.
[2023-01-25 12:17:03] Stopping .[0;1;39mAvailability of block devices.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mCUPS Scheduler.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mGetty on tty1.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mAuthorization Manager.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mQubes GUI Agent.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mQubes misc post-boot actions.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mQubes network uplink (eth0) setup.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mQubes remote exec agent.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mSystem Logging Service.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mRealtimeKit Scheduling Policy Service.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mSerial Getty on hvc0.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mDisk Manager.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mDaemon for power management.[0m...
[2023-01-25 12:17:03] Stopping .[0;1;39mLSB: Start/stop secondary xen domains.[0m...
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mAuthorization Manager.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mSystem Logging Service.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mCUPS Scheduler.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mGetty on tty1.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mSerial Getty on hvc0.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mQubes remote exec agent.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDisk Manager.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mDaemon for power management.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mRealtimeKit Scheduling Policy Service.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mQubes misc post-boot actions.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mQubes network uplink (eth0) setup.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Removed slice .[0;1;39msystem-getty.slice.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Removed slice .[0;1;39msystem-qubes\x2dnetwork\x2duplink.slice.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Removed slice .[0;1;39msystem-serial\x2dgetty.slice.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mQubes base firewall settings.[0m.
[2023-01-25 12:17:03] Stopping .[0;1;39mXen driver domain device daemon.[0m...
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mXen driver domain device daemon.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mAvailability of block devices.[0m.
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mLSB: Start/stop secondary xen domains.[0m.
[2023-01-25 12:17:03] Stopping .[0;1;39mLSB: Xen daemons.[0m...
[2023-01-25 12:17:03] [.[0;32m OK .[0m] Stopped .[0;1;39mLSB: Xen daemons.[0m.
[2023-01-25 12:17:04] [ 63.366123] systemd[1]: session-c1.scope: Succeeded.
[2023-01-25 12:17:04] [ 63.366765] systemd[1]: Stopped Session c1 of user user.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mSession c1 of user user.[0m.
[2023-01-25 12:17:04] [ 63.367267] systemd[1]: session-c1.scope: Consumed 2.974s CPU time.
[2023-01-25 12:17:04] [ 63.367950] systemd[1]: Stopping User Login Management...
[2023-01-25 12:17:04] Stopping .[0;1;39mUser Login Management.[0m...
[2023-01-25 12:17:04] [ 63.369669] systemd[1]: Stopping User Manager for UID 1000...
[2023-01-25 12:17:04] Stopping .[0;1;39mUser Manager for UID 1000.[0m...
[2023-01-25 12:17:04] [ 63.375765] systemd[1]: systemd-logind.service: Succeeded.
[2023-01-25 12:17:04] [ 63.376758] systemd[1]: Stopped User Login Management.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mUser Login Management.[0m.
[2023-01-25 12:17:04] [ 63.409453] systemd[1]: qubes-gui-agent.service: Succeeded.
[2023-01-25 12:17:04] [ 63.409839] systemd[1]: Stopped Qubes GUI Agent.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mQubes GUI Agent.[0m.
[2023-01-25 12:17:04] [ 63.431534] systemd[1]: run-user-1000-doc.mount: Succeeded.
[2023-01-25 12:17:04] [ 63.431699] systemd[1]: Unmounted /run/user/1000/doc.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Unmounted .[0;1;39m/run/user/1000/doc.[0m.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mUser Manager for UID 1000.[0m.
[2023-01-25 12:17:04] Stopping .[0;1;39mUser Runtime Directory /run/user/1000.[0m...
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Unmounted .[0;1;39m/run/user/1000.[0m.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mUser Runtime Directory /run/user/1000.[0m.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Removed slice .[0;1;39mUser Slice of UID 1000.[0m.
[2023-01-25 12:17:04] Stopping .[0;1;39mPermit User Sessions.[0m...
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mPermit User Sessions.[0m.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped target .[0;1;39mRemote File Systems.[0m.
[2023-01-25 12:17:04] Unmounting .[0;1;39m/home/user/example.com/mountpoint.[0m...
[2023-01-25 12:17:04] Unmounting .[0;1;39m/rw/home/user/example.com/mountpoint.[0m...
[2023-01-25 12:17:04] Stopping .[0;1;39mQubes memory information reporter.[0m...
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Stopped .[0;1;39mQubes memory information reporter.[0m.
[2023-01-25 12:17:04] [.[0;32m OK .[0m] Unmounted .[0;1;39m/rw/home/user/example.com/mountpoint.[0m.
[2023-01-25 12:17:06] [.[0;1;31m*.[0m.[0;31m* .[0m] A stop job is running for /home/user/example.com/mountpoint (3s / 1min 31s)
.[K[.[0;31m*.[0;1;31m*.[0m.[0;31m* .[0m] A stop job is running for /home/user/example.com/mountpoint (3s / 1min 31s)
.[K[ .[0;31m*.[0;1;31m*.[0m.[0;31m* .[0m] A stop job is running for /home/user/example.com/mountpoint (4s / 1min 31s)
.[K[ .[0;31m*.[0;1;31m*.[0m.[0;31m* .[0m] A stop job is running for /home/user/example.com/mountpoint (4s / 1min 31s)
.[K[ .[0;31m*.[0;1;31m*.[0m.[0;31m*.[0m] A stop job is running for /home/user/example.com/mountpoint (5s / 1min 31s)
.[K[ .[0;31m*.[0;1;31m*.[0m] A stop job is running for /home/user/example.com/mountpoint (5s / 1min 31s)
And this continues until it times out at 1 min 31 sec.
So the question is, how to fix this?
I have tried in different qubes, in both Debian and Fedora, using different kernels. Always the same result.
This did not happen in Fedora 35, just started when either switching to Qubes 4.1 (from 4.0) or switching from F35 to F36, don’t remember when exactly this started.
EDIT: Forgot to say that the mounts are created by running a script from /rw/config/rc.local and is not relient on systemd. The systemd .mount unit files created automatically by systemd and when checking the status of them I get the following
systemctl status home-user-example.com-mountpoint.mount
â—Ź home-user-example.com-mountpoint.mount - /home/user/example.com/mountpoint
Loaded: loaded (/proc/self/mountinfo)
Active: active (mounted) since Wed 2023-01-25 10:45:39 CET; 2h 10min ago
Until: Wed 2023-01-25 10:45:39 CET; 2h 10min ago
Where: /home/user/example.com/mountpoint
What: //example.com/mountpoint