Bug 208841

Summary: sshfs prevents suspend
Product: Power Management Reporter: Konstantin Kharlamov (hi-angel)
Component: Hibernation/SuspendAssignee: Rafael J. Wysocki (rjw)
Status: RESOLVED UNREPRODUCIBLE    
Severity: normal CC: yu.c.chen
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.7.9 Subsystem:
Regression: No Bisected commit-id:
Attachments: journalctl log upon reproducing the issue

Description Konstantin Kharlamov 2020-08-07 11:56:03 UTC
Created attachment 290809 [details]
journalctl log upon reproducing the issue

When sshfs is trying to reconnect, but the IP it tries to connect to does not answer, upon suspending the machine, maching gets frozen for ≈20 seconds, and then just wakes up.

It is a frequent annoyance: I use sshfs through VPN, and then VPN gets disconnected, then I try to suspend my laptop, and it doesn't get suspended. Sometimes I notice it, other times laptop stays running without me being aware. So this is pretty bad.

# Steps to reproduce (in terms of terminal commands)

    $ mkdir /tmp/foo
    $ nc -vlk 22 &
    $ sshfs root@localhost:/ /tmp/foo &
    $ systemctl suspend

## Expected

The system gets suspended, and stays at it.

## Actual

Screen blinks but stays lit, and the system does not react to anything. After ≈20 seconds it continues running as usual.

# Additional information

Log from `journalctl -f` upon reproducing the steps is attached.
Comment 1 Chen Yu 2020-08-26 06:51:40 UTC
Looks like fuse stunk at fuse_get_req(), is this the latest kernel version?
Comment 2 Konstantin Kharlamov 2020-08-26 07:02:07 UTC
(In reply to Chen Yu from comment #1)
> Looks like fuse stunk at fuse_get_req(), is this the latest kernel version?

Oh, wow, I'm right now on 5.8.3, and sshfs seems no longer prevents suspend! Thank you!

(sorry, not sure what second status to set along with "RESOLVED")
Comment 3 Chen Yu 2020-08-26 08:44:28 UTC
(In reply to Konstantin Kharlamov from comment #2)
> (In reply to Chen Yu from comment #1)
> > Looks like fuse stunk at fuse_get_req(), is this the latest kernel version?
> 
> Oh, wow, I'm right now on 5.8.3, and sshfs seems no longer prevents suspend!
> Thank you!
> 
> (sorry, not sure what second status to set along with "RESOLVED")

Unreproducible on newer kernel might apply.