Bug 187421 - /sys/fs/fuse/connections not available after returning from its initialization function
Summary: /sys/fs/fuse/connections not available after returning from its initializatio...
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-10 22:55 UTC by Michael Biebl
Modified: 2016-11-10 22:55 UTC (History)
0 users

See Also:
Kernel Version: 4.8.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Michael Biebl 2016-11-10 22:55:29 UTC
This is on Debian unstable, uname -a
Linux pluto 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28) x86_64 GNU/Linux

I've originally reported this as https://github.com/systemd/systemd/issues/4574 and was told to file it as a kernel bug.

I have the following udev rule /etc/udev/rules.d/60-fuse.rules:

ACTION=="add", SUBSYSTEM=="module", KERNEL=="fuse", RUN+="/usr/local/bin/fuse-log.sh"

The shell script is /usr/local/bin/fuse-log.sh:

#!/bin/sh

LOG=/run/log-fuse.txt
SLEEP=0
sleep $SLEEP 
if [ -d /sys/fs/fuse/connections ] ; then
	echo "$(date) : /sys/fs/fuse/connections found after sleep $SLEEP" >> $LOG
else
	echo "$(date) : no /sys/fs/fuse/connections found after sleep $SLEEP" >> $LOG
fi


Without a sleep, /sys/fs/fuse/connections is not available. Adding a sleep of .1 or higher, the directory is available.

Thu Nov 10 23:42:10 CET 2016 : no /sys/fs/fuse/connections found after sleep 0
Thu Nov 10 23:42:29 CET 2016 : /sys/fs/fuse/connections found after sleep .1


The /sys/fs/fuse/connections directory should be setup, before the fuse module returns from it's initialization function. Otherwise it breaks userspace which tries to react on this, like say systemd, which tries to run
SUBSYSTEM=="module", KERNEL=="fuse", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount" 
to mount the fusectl filesystem.

Note You need to log in before you can comment on or make changes to this bug.