rclone/vfs
Leo Luan 5f1d5a1897 vfs: Fix a deadlock vulnerability in downloaders.Close
The downloaders.Close() call acquires the downloaders' mutex before
calling the wait group wait and the main downloaders thread has a
periodical (5 seconds interval) call to kick its waiters and the
waiter dispatch function tries to get the mutex. So a deadlock can
occur if the Close() call starts, gets the mutex, while the main
downloader thread already got the timer's tick and proceeded to
call kickWaiters. The deadlock happens when the Close call gets
the mutex between the timer's kick and the main downloader thread
gets the mutex first. So it's a pretty short period of time and
it probably explains why the problem has not surfaced, maybe
something like tens of nanoseconds out of 5 seconds (~10^^-8).
It took 5 days of continued stressing the Close calls for the
deadlock to appear.
2020-10-06 16:35:23 +01:00
..
test_vfs lib/random: unify random string generation into random.String 2019-08-06 12:44:08 +01:00
vfscache vfs: Fix a deadlock vulnerability in downloaders.Close 2020-10-06 16:35:23 +01:00
vfscommon vfs: add --vfs-read-ahead parameter for use with --vfs-cache-mode full 2020-08-06 17:26:18 +01:00
vfsflags vfs: add --vfs-read-ahead parameter for use with --vfs-cache-mode full 2020-08-06 17:26:18 +01:00
vfstest mount: change interface of mount commands to take mount options 2020-07-24 10:48:51 +01:00
dir_handle_test.go vfs: add --vfs-writeback option to delay writes back to cloud storage 2020-06-30 12:01:36 +01:00
dir_handle.go vfs: factor duplicated Open code into vfs from mount/cmount 2017-11-03 13:00:00 +00:00
dir_test.go vfs: make dir.ForgetAll and friends not forget virtual entries 2020-06-30 12:03:39 +01:00
dir.go vfs: fix directory locking caused by slow directory listings 2020-07-18 09:08:18 +01:00
errors_test.go vfs: add tests and subsequent fixes 2017-11-04 10:24:10 +00:00
errors.go build: drop support for go1.8 2019-04-15 21:49:58 +01:00
file_test.go vfs: fix rename tests by waiting for writes to complete 2020-08-19 17:04:17 +01:00
file.go vfs: set the modtime of the cache file immediately 2020-08-20 16:24:04 +01:00
help.go vfs,local: Log an ERROR if we fail to set the file to be sparse 2020-09-11 15:36:47 +01:00
make_open_tests.go vfs: bring DO NOT EDIT comments in line with "go help generate" 2020-04-30 12:24:44 +01:00
open_test.go vfs: bring DO NOT EDIT comments in line with "go help generate" 2020-04-30 12:24:44 +01:00
rc_test.go vfs: add an optional fs parameter to vfs rc methods 2020-06-30 12:01:36 +01:00
rc.go vfs: add an optional fs parameter to vfs rc methods 2020-06-30 12:01:36 +01:00
read_test.go vfs: add --vfs-writeback option to delay writes back to cloud storage 2020-06-30 12:01:36 +01:00
read_write_test.go vfs: Make tests run reliably 2020-06-30 12:01:36 +01:00
read_write.go vfs: support synchronous cache space recovery upon ENOSPC 2020-08-25 21:12:06 +01:00
read.go accounting: add context to Account and propagate changes #3257 2020-07-28 16:41:17 +01:00
vfs_case_test.go vfs: add --vfs-writeback option to delay writes back to cloud storage 2020-06-30 12:01:36 +01:00
vfs_test.go vfs: re-use existing VFS if possible 2020-06-30 12:01:36 +01:00
vfs.go fs: Pin created backends until parents are finalized 2020-09-01 18:21:03 +01:00
vfstest_test.go mount: change interface of mount commands to take mount options 2020-07-24 10:48:51 +01:00
vstate_string.go vfs: stop virtual directory entries dropping out of the directory cache 2020-06-30 12:03:39 +01:00
write_test.go vfs: add --vfs-writeback option to delay writes back to cloud storage 2020-06-30 12:01:36 +01:00
write.go vfs: fix saving from chrome without --vfs-cache-mode writes #4293 2020-07-28 17:18:31 +01:00