You are not logged in.

#1 2025-07-06 21:27:24

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

[SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

Hello all. I found something seemingly abnormal looking through my system log today. This may very well be no issue at all, as I haven't had any other recent problems with my system, and these errors go back months (perhaps years). However, it seems this probably shouldn't be happening and I'd like to fix it in case it's a symptom of a larger problem.

Jul 05 11:25:03 Marojejy systemd[1370]: Stopping Virtual filesystem service...
Jul 05 11:25:03 Marojejy systemd[1370]: Stopping Virtual filesystem metadata service...
Jul 05 11:25:03 Marojejy systemd[1370]: Stopping Virtual filesystem service - disk device monitor...
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Failed to kill control group /user.slice/user-1000.slice/user@1000.service/session.slice/gvfs-daemon.service, ignoring: Operation not permitted
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Killing process 1530 (gvfsd-fuse) with signal SIGKILL.
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Killing process 36339 (fusermount3) with signal SIGKILL.
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Killing process 36342 (fusermount3) with signal SIGKILL.
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Failed to kill control group /user.slice/user-1000.slice/user@1000.service/session.slice/gvfs-daemon.service, ignoring: Operation not permitted
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Unit process 36339 (fusermount3) remains running after unit stopped.
Jul 05 11:25:03 Marojejy systemd[1370]: gvfs-daemon.service: Unit process 36342 (fusermount3) remains running after unit stopped.
Jul 05 11:25:03 Marojejy systemd[1370]: Stopped Virtual filesystem service.
Jul 05 11:25:03 Marojejy systemd[1370]: Stopped Virtual filesystem metadata service.
Jul 05 11:25:03 Marojejy systemd[1370]: Stopped Virtual filesystem service - disk device monitor.

The processes (and there are always two) only show up maybe one in 3 or 4 sessions. Perhaps every time that gvfsd-fuse is running at shutdown. I did try running at debug log level and it didn't really shed any new light on to the issue, aside from finding that all the neighboring processes to the misbehaving FUSE twins are something called ((sd-close)).

Last edited by mesaprotector (2025-08-27 03:58:26)

Offline

#2 2025-07-07 07:24:59

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

Some file on the fusefs will still be opened, so the umount fails?
=> what filesystem/devices/files are involved here?

Offline

#3 2025-08-09 13:27:01

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

Apologies for the very slow reply, my laptop's screen decided to overheat shortly after I posted this and I just remembered today.

gvfsd-fuse is as usual mounting /run/user/1000/gvfs. So the usual tmpfs. Here is the /etc/mtab entry:

gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0

I imagine that the failing fusermount processes are running "fusermount3 -u /run/user/1000/gvfs", though the location is always already unmounted when this error occurs. So probably some weird code on the part of gvfs, though I cannot find the exact section. It seems harmless to me.

Offline

#4 2025-08-09 17:27:43

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

sudo fuser -m /run/user/1000/gvfs/

Offline

#5 2025-08-18 02:48:47

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

sudo does not work for that, permission is denied as /run/user/1000 is not readable by root.

Running it as basic user shows nothing.

Offline

#6 2025-08-18 07:10:40

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

/run/user/1000 is not readable by root

Errr… what? How?

Offline

#7 2025-08-20 17:31:30

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

I mean it's definitely supposed to be owned by UID 1000, right? Is 700 not the right permission? I'm pretty sure this is just how gvfs works...

asuka@Marojejy ~$ ls -l /run/user
total 0
drwx------ 10 asuka asuka 360 Aug 20 09:06 1000
asuka@Marojejy ~$ ls -l /run/user/1000
total 8
drwx------ 2 asuka asuka  60 Aug 20 09:06 at-spi
drwx------ 2 asuka asuka  60 Aug 20 09:06 dconf
drwx------ 3 asuka asuka 180 Aug 20 12:25 gnupg
dr-x------ 2 asuka asuka   0 Aug 20 09:06 gvfs
drwx------ 2 asuka asuka  40 Aug 20 12:01 gvfsd
drwxr-xr-x 2 asuka asuka  60 Aug 20 09:06 p11-kit
drwx------ 2 asuka asuka  80 Aug 20 09:06 pulse
drwxr-xr-x 7 asuka asuka 180 Aug 20 09:06 systemd
srw-rw-rw- 1 asuka asuka   0 Aug 20 09:06 bus
-rw-r--r-- 1 asuka asuka   0 Aug 20 09:06 discordstatus
-rw-r--r-- 1 asuka asuka   3 Aug 20 09:06 kbid
-rw-r--r-- 1 asuka asuka   7 Aug 20 13:30 nwkname
srw-rw-rw- 1 asuka asuka   0 Aug 20 09:06 pipewire-0
-rw-r----- 1 asuka asuka   0 Aug 20 09:06 pipewire-0.lock
srw-rw-rw- 1 asuka asuka   0 Aug 20 09:06 pipewire-0-manager
-rw-r----- 1 asuka asuka   0 Aug 20 09:06 pipewire-0-manager.lock
asuka@Marojejy ~$ sudo fuser -m /run/user/1000/gvfs/
[sudo] password for asuka: 
Cannot stat /run/user/1000/gvfs: Permission denied

(I can run fuser on /run/user/1000/ just fine.)

Last edited by mesaprotector (2025-08-20 17:36:24)

Offline

#8 2025-08-20 20:31:13

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

I mean it's definitely supposed to be owned by UID 1000, right?

Sure, but root is god - I'm not sure how this could result in a permission error.

getfattr /run/user/1000/gvfs

Offline

#9 2025-08-20 22:02:41

tekstryder
Member
Registered: 2013-02-14
Posts: 505

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

seth wrote:

Sure, but root is god - I'm not sure how this could result in a permission error.

I believe this is by design of the fuse virtual filesystem and the only way to give root access in this case would be to uncomment:

#user_allow_other

in /etc/fuse.conf.

Offline

#10 2025-08-21 06:25:25

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

Indeed and -teresting.
https://man.archlinux.org/man/mount.fus … llow_other
"… So all users (including root) can access the files…"

@mesaprotector you could https://wiki.archlinux.org/title/Systemd#Drop-in_files gvfs-daemon.service and add

ExecStop=/usr/bin/bash -c 'logger "$(fuser -m /run/user/1000/gvfs/)"; pkill gvfsd'

which will hopefully catch the opened files red-handed then.

Offline

#11 2025-08-27 03:58:08

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

I was unable to find any open files even after repeatedly messing with the gvfs-daemon service (it consistently says nothing is open), but adding a slightly modified drop-in five days ago has seemingly prevented the SIGKILLs from showing up again, so I guess that's... solved? I do wish I better understood what was happening in the first place, and why most other people seemingly don't have this problem.

Offline

#12 2025-08-27 06:47:52

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

adding a slightly modified drop-in

How slightly?

Offline

#13 2025-08-27 16:53:05

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

seth wrote:

adding a slightly modified drop-in

How slightly?

Rather than running the command directly in ExecStop, I put it in a script that's called by ExecStop, since doing the former was causing issues while debugging.

Offline

#14 2025-08-27 17:01:17

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

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

Could just be a race condition if the fuser command takes a considerable amount of time.
Do the bogus processes show up again if you remove the ExecStop entry, resp. can you then block them by replacing the fuser query w/ a simple "/usr/bin/sleep 3"?

Offline

#15 2025-09-25 04:16:18

mesaprotector
Member
Registered: 2024-03-03
Posts: 197

Re: [SOLVED] gvfs spawns FUSE processes at shutdown which then get killed

Replacing fuser with sleep 3, sleep 0.05 (the time that fuser takes to run), and even /usr/bin/true seems to have reintroduced no problems. It may have been some sort of race condition.

Offline

Board footer

Powered by FluxBB