Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS (Error code -36) while copying #213

Closed
magnusja opened this issue Feb 20, 2018 · 36 comments
Closed

macOS (Error code -36) while copying #213

magnusja opened this issue Feb 20, 2018 · 36 comments
Labels

Comments

@magnusja
Copy link

magnusja commented Feb 20, 2018

Hey there,

I am getting this (title) message very often while copying data. In the System Console I see:

19/02/18 21:25:51,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:51,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:51,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:51,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:51,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:51,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:52,000 kernel[0]: osxfuse: vnode changed generation
19/02/18 21:25:53,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:53,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:53,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:53,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:53,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
19/02/18 21:25:53,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)

Although this seems to occur sometimes without the error in Finder. When I copy via cpthen some files do not get copied and cp prints Stale NFS file handle

The debug output of gocrypt itself does not show any errors. I am using version gocryptfs v1.4.3; go-fuse [vendored]; 2018-02-02 go1.9.3 (Homebrew) and OSX Fuse version 3.7.1.

Thanks a lot,
Magnus

@rfjakob
Copy link
Owner

rfjakob commented Feb 20, 2018

Hmm, error 22 is EINVAL

Could you mount with -fusedebug?

@magnusja
Copy link
Author

Unfortunately I cannot find anything useful in that output, maybe you can (it is quite big though)

https://pastebin.com/xLMK8s2v

@magnusja
Copy link
Author

Ok I got another one

This is OSX Console:

20/02/18 21:11:05,000 kernel[0]: osxfuse: vnode changed generation
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)
20/02/18 21:11:05,000 kernel[0]: osxfuse: fuse_vnop_readdir failed (err=22)

And this around the same time in the terminal:
https://pastebin.com/9EJHd3EM

Mounted with

gocryptfs -fg -fusedebug -nosyslog PATH /Volumes/gocrypt

@rfjakob
Copy link
Owner

rfjakob commented Feb 21, 2018

I scrolled through it, but did not see anything useful, either.

"fuse_vnop_readdir failed" seems to come from here:
https://github.com/osxfuse/kext/blob/938b6fc5d8f3a28a48bbd15dfbf6575ec1c989a2/osxfuse/fuse_vnops.c#L2956

Tracing the calls a little, this is one candidate for EINVAL: https://github.com/osxfuse/kext/blob/938b6fc5d8f3a28a48bbd15dfbf6575ec1c989a2/osxfuse/fuse_internal.c#L913

Do the gocryptfs self-tests pass on that osxfuse version? You can run them using

.,/build-without-openssl.bash && ./test-without-openssl.bash

(unfortunately, cannot test myself as I don't have a Mac)

@magnusja
Copy link
Author

Following output has been produced, then the script just freezes and I cannot even kill it with Ctrl+C

ok  	github.com/rfjakob/gocryptfs/internal/speed	(cached) [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:218: Wrong mode, have 120755, want 0120777
--- FAIL: TestReadlinkat (0.00s)
	sys_common_test.go:15: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/syscallcompat345937277/readlinkat: file name too long
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.033s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.517s

I installed https://github.com/discoteq/flock to be able to run the test script.

btw, travis ci supports macOS

@magnusja
Copy link
Author

Ok a second run looks a little different but still freezes

Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/058561341/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/712175481/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/314819217/b
Warning: could not determine gocryptfs version
gocryptfs [unknown] without_openssl; go-fuse v20170619-27-g6975cb3; 2018-02-21 go1.10
ok  	github.com/rfjakob/gocryptfs	(cached)
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	6.708s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	(cached)
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	(cached)
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	(cached)
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	(cached)
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	(cached)
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	(cached)
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	(cached)
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	(cached)
ok  	github.com/rfjakob/gocryptfs/internal/speed	(cached) [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:218: Wrong mode, have 120755, want 0120777
--- FAIL: TestReadlinkat (0.00s)
	sys_common_test.go:15: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/syscallcompat489018259/readlinkat: file name too long
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.070s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	2.932s

@dominik-lekse
Copy link

I experienced the same issue as @magnusja when trying to run the test suite on macOS. After the test suite execution froze, three gocryptfs processes were running. As Ctrl+C did not help, killing these 3 gocryptfs processes helped to return to the shell.

The tests have been run on version 1.4.3 and Go 1.10. I could not find the problem why the tests freeze, but can help when pointed to the place to look.

gocryptfs git:(7015a6e) ✗ export GOMAXPROCS=1
gocryptfs git:(7015a6e) ✗ ./test-without-openssl.bash
gocryptfs v1.4.3 without_openssl; go-fuse [vendored]; 2018-02-23 go1.10
vendor directory exists, skipping 'go tool vet'
ok  	github.com/rfjakob/gocryptfs	0.013s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	0.885s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.069s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	0.884s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.010s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.013s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.014s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.015s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.103s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.013s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.013s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:218: Wrong mode, have 120755, want 0120777
--- FAIL: TestReadlinkat (0.00s)
	sys_common_test.go:15: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/syscallcompat735293254/readlinkat: file name too long
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.040s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	2.243s

@rfjakob
Copy link
Owner

rfjakob commented Feb 26, 2018

The test failures smell like hang-on-unmount. Can you

  1. Pull latest master (it disables test result caching)

  2. Run the tests with a shorter timeout (default is 10 minutes), like
    ./test-without-openssl.bash -timeout 60s
    You should get a backtrace after 60 seconds of hanging. If you don't get back to the shell prompt and kill processes, please use
    kill -ABRT
    as ABRT will trigger a Go backtrace before exiting.

@magnusja
Copy link
Author

magnusja commented Feb 27, 2018

I had to kill the processes. Here you go:

Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/628446972/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/811791061/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/577161126/b
gocryptfs v1.4.3-32-g5fcfd30 without_openssl; go-fuse v20170619-27-g6975cb3; 2018-02-26 go1.10
ok  	github.com/rfjakob/gocryptfs	0.056s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	2.526s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.027s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.436s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.073s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.059s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.017s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.019s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.270s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.016s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.037s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:218: Wrong mode, have 120755, want 0120777
--- FAIL: TestReadlinkat (0.00s)
	sys_common_test.go:15: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/syscallcompat269851388/readlinkat: file name too long
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.065s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.228s

CryptoCore.Wipe: Only nil'ing stdlib refs
ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/474785172.sock: use of closed network connection
-wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/474785172.sock: use of closed network connection
panic: -wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/474785172.sock: use of closed network connection

goroutine 17 [running]:
log.(*Logger).Panic(0xc420092230, 0xc42004af28, 0x1, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/log/log.go:212 +0xbe
github.com/rfjakob/gocryptfs/internal/tlog.(*toggledLogger).Printf(0xc42007c6f0, 0x123af6f, 0x19, 0xc42004af78, 0x1, 0x1)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/tlog/log.go:65 +0x233
github.com/rfjakob/gocryptfs/internal/ctlsock.(*ctlSockHandler).acceptLoop(0xc42000a500)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:66 +0xdc
github.com/rfjakob/gocryptfs/internal/ctlsock.Serve(0x125fdc0, 0xc42007c990, 0x161d000, 0xc42021e000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:56 +0x7c
created by main.initFuseFrontend
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:282 +0x142e
CryptoCore.Wipe: Only nil'ing stdlib refs
ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/639994339.sock: use of closed network connection
-wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/639994339.sock: use of closed network connection
panic: -wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/639994339.sock: use of closed network connection

goroutine 4 [running]:
log.(*Logger).Panic(0xc4200a8230, 0xc4200b1f28, 0x1, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/log/log.go:212 +0xbe
github.com/rfjakob/gocryptfs/internal/tlog.(*toggledLogger).Printf(0xc4200806f0, 0x123af6f, 0x19, 0xc4200b1f78, 0x1, 0x1)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/tlog/log.go:65 +0x233
github.com/rfjakob/gocryptfs/internal/ctlsock.(*ctlSockHandler).acceptLoop(0xc42009c4a0)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:66 +0xdc
github.com/rfjakob/gocryptfs/internal/ctlsock.Serve(0x125fdc0, 0xc420080990, 0x147df70, 0xc420218000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:56 +0x7c
created by main.initFuseFrontend
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:282 +0x142e
CryptoCore.Wipe: Only nil'ing stdlib refs
ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/097167334.sock: use of closed network connection
-wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/097167334.sock: use of closed network connection
panic: -wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/282145481/097167334.sock: use of closed network connection

goroutine 17 [running]:
log.(*Logger).Panic(0xc420092230, 0xc42004df28, 0x1, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/log/log.go:212 +0xbe
github.com/rfjakob/gocryptfs/internal/tlog.(*toggledLogger).Printf(0xc42007c6f0, 0x123af6f, 0x19, 0xc42004df78, 0x1, 0x1)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/tlog/log.go:65 +0x233
github.com/rfjakob/gocryptfs/internal/ctlsock.(*ctlSockHandler).acceptLoop(0xc42000a500)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:66 +0xdc
github.com/rfjakob/gocryptfs/internal/ctlsock.Serve(0x125fdc0, 0xc42007c990, 0x147df70, 0xc420212000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:56 +0x7c
created by main.initFuseFrontend
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:282 +0x142e
PASS
umount(/private/tmp/gocryptfs-test-parent/282145481/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc42009c080, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:189 +0xbc
github.com/rfjakob/gocryptfs/tests/defaults.TestMain(0xc4200f8000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/defaults/main_test.go:21 +0xc6
main.main()
	_testmain.go:70 +0x151
SIGABRT: abort
PC=0x1076994 m=0 sigcode=0

goroutine 1 [syscall, 6 minutes]:
syscall.Syscall(0x3, 0x6, 0xc4203f2000, 0x21000, 0x30, 0x0, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5 fp=0xc4200457d0 sp=0xc4200457c8 pc=0x1076965
syscall.read(0x6, 0xc4203f2000, 0x21000, 0x21000, 0x2, 0x0, 0x180)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f fp=0xc420045830 sp=0xc4200457d0 pc=0x10752af
syscall.Read(0x6, 0xc4203f2000, 0x21000, 0x21000, 0x106bdb0, 0xc4200de060, 0xc4204d4100)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/syscall_unix.go:162 +0x49 fp=0xc420045878 sp=0xc420045830 pc=0x1071929
github.com/hanwen/go-fuse/fuse.(*Server).readRequest.func1(0xc4204d4100, 0xc4204d4328)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:259 +0x55 fp=0xc4200458c8 sp=0xc420045878 pc=0x1116d55
github.com/hanwen/go-fuse/fuse.handleEINTR(0xc420045978, 0x11de360, 0xc42027a100)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:235 +0x27 fp=0xc4200458e8 sp=0xc4200458c8 pc=0x1114847
github.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc4200de000, 0x1244900, 0xc4200de000, 0xc4200106c0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:257 +0x153 fp=0xc4200459a8 sp=0xc4200458e8 pc=0x11149e3
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc4200de000, 0x0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x6b fp=0xc4200459f8 sp=0xc4200459a8 pc=0x111542b
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc4200de000)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:324 +0x59 fp=0xc420045a30 sp=0xc4200459f8 pc=0x1115279
main.doMount(0xc420090120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:176 +0x725 fp=0xc420045be0 sp=0xc420045a30 pc=0x11ba1b5
main.main()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/main.go:286 +0x4f7 fp=0xc420045f88 sp=0xc420045be0 pc=0x11b8887
runtime.main()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:198 +0x212 fp=0xc420045fe0 sp=0xc420045f88 pc=0x102b5d2
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420045fe8 sp=0xc420045fe0 pc=0x1057e31

goroutine 5 [chan send, 6 minutes]:
github.com/rfjakob/gocryptfs/internal/cryptocore.(*randPrefetcherT).refillWorker(0x1369900)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:51 +0x64
created by github.com/rfjakob/gocryptfs/internal/cryptocore.init.0
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:16 +0x70

goroutine 6 [syscall, 6 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sigqueue.go:139 +0xa7
os/signal.loop()
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 33 [chan receive, 6 minutes]:
main.handleSigint.func1(0xc42013a000, 0xc4200de000, 0x7fff5fbffabf, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:378 +0x38
created by main.handleSigint
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:377 +0x113

goroutine 17 [select, 6 minutes, locked to thread]:
runtime.gopark(0x1245260, 0x0, 0x1235ec9, 0x6, 0x18, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc42002c750, 0xc42013e060)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/signal_unix.go:549 +0x1c6
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1

rax    0x2000003
rbx    0x0
rcx    0xc4200457c8
rdx    0x21000
rdi    0x6
rsi    0xc4203f2000
rbp    0xc420045820
rsp    0xc4200457c8
r8     0x0
r9     0x0
r10    0x0
r11    0x206
r12    0x0
r13    0x18
r14    0x11
r15    0x100
rip    0x1076994
rflags 0x206
cs     0x7
fs     0x0
gs     0x0
FAIL	github.com/rfjakob/gocryptfs/tests/defaults	395.358s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	7.575s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.591s
touch: illegal option -- -
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
--- FAIL: TestUtimesNanoSymlink (0.01s)
	matrix_test.go:700: exit status 1
--- FAIL: TestUtimesNano (0.00s)
	matrix_test.go:759: Testcase 1: Wrong atime nanoseconds: want=2 actual=0
	matrix_test.go:759: Testcase 2: Wrong atime nanoseconds: want=8 actual=0
	matrix_test.go:759: Testcase 3: Wrong atime seconds: want=7 actual=100
--- FAIL: TestUtimesNanoFd (0.00s)
	matrix_test.go:750: no such file or directory
FAIL
umount(/private/tmp/gocryptfs-test-parent/949161895/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc420016140, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:189 +0xbc
github.com/rfjakob/gocryptfs/tests/matrix.TestMain(0xc4200ca000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/matrix/matrix_test.go:72 +0x4ca
main.main()
	_testmain.go:78 +0x151
SIGABRT: abort
PC=0x10593fb m=0 sigcode=0

goroutine 0 [idle]:
runtime.mach_semaphore_wait(0xa03, 0xe, 0x1369b60, 0x7fff5fbff6a0, 0x105346d, 0x1369b60, 0x7fff5fbff6a8, 0x1053843, 0xffffffffffffffff, 0x7fff5fbff6c0, ...)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sys_darwin_amd64.s:540 +0xb
runtime.semasleep1(0xffffffffffffffff, 0x7fff5fbff6c0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:438 +0x52
runtime.semasleep.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:457 +0x33
runtime.semasleep(0xffffffffffffffff, 0x7fff5fbff718)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:456 +0x44
runtime.notesleep(0x136a3e8)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/lock_sema.go:167 +0xe9
runtime.stoplockedm()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2096 +0x8c
runtime.schedule()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2488 +0x2da
runtime.park_m(0xc420068300)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2599 +0xb6
runtime.mcall(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:351 +0x5b

goroutine 1 [syscall, 5 minutes]:
syscall.Syscall(0x3, 0x6, 0xc4202aa000, 0x21000, 0x30, 0x0, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x6, 0xc4202aa000, 0x21000, 0x21000, 0x18, 0x106c032, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f
syscall.Read(0x6, 0xc4202aa000, 0x21000, 0x21000, 0x106bdb0, 0xc4200de060, 0xc42028a000)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/syscall_unix.go:162 +0x49
github.com/hanwen/go-fuse/fuse.(*Server).readRequest.func1(0xc42028a000, 0xc42038c600)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:259 +0x55
github.com/hanwen/go-fuse/fuse.handleEINTR(0xc420045978, 0x11de360, 0xc4204cd1a0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:235 +0x27
github.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc4200de000, 0x1244900, 0xc4200de000, 0xc42040e480)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:257 +0x153
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc4200de000, 0x0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x6b
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc4200de000)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:324 +0x59
main.doMount(0xc42008e120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:176 +0x725
main.main()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/main.go:286 +0x4f7

goroutine 5 [chan send, 6 minutes]:
github.com/rfjakob/gocryptfs/internal/cryptocore.(*randPrefetcherT).refillWorker(0x1369900)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:51 +0x64
created by github.com/rfjakob/gocryptfs/internal/cryptocore.init.0
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:16 +0x70

goroutine 6 [syscall, 6 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sigqueue.go:139 +0xa7
os/signal.loop()
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 17 [select, 6 minutes, locked to thread]:
runtime.gopark(0x1245260, 0x0, 0x1235ec9, 0x6, 0x18, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc420031f50, 0xc420136060)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/signal_unix.go:549 +0x1c6
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1

goroutine 18 [chan receive, 6 minutes]:
main.handleSigint.func1(0xc4200c40c0, 0xc4200de000, 0x7fff5fbffabe, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:378 +0x38
created by main.handleSigint
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:377 +0x113

rax    0xe
rbx    0x136a2a0
rcx    0x7fff5fbff648
rdx    0x7fff5fbff6c8
rdi    0xa03
rsi    0x1
rbp    0x7fff5fbff680
rsp    0x7fff5fbff648
r8     0x2
r9     0xc420031fc8
r10    0xc420168048
r11    0x246
r12    0xc420031f68
r13    0xff
r14    0xff
r15    0xf
rip    0x10593fb
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
FAIL	github.com/rfjakob/gocryptfs/tests/matrix	363.068s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.273s
name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directoryname="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directoryctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/158203620/reverse_mnt_984901558.sock: use of closed network connection
-wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/158203620/reverse_mnt_984901558.sock: use of closed network connection
panic: -wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/158203620/reverse_mnt_984901558.sock: use of closed network connection

goroutine 18 [running]:
log.(*Logger).Panic(0xc420092230, 0xc4202d1f28, 0x1, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/log/log.go:212 +0xbe
github.com/rfjakob/gocryptfs/internal/tlog.(*toggledLogger).Printf(0xc42007c6f0, 0x123af6f, 0x19, 0xc4202d1f78, 0x1, 0x1)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/tlog/log.go:65 +0x233
github.com/rfjakob/gocryptfs/internal/ctlsock.(*ctlSockHandler).acceptLoop(0xc420230000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:66 +0xdc
github.com/rfjakob/gocryptfs/internal/ctlsock.Serve(0x125fdc0, 0xc42007c990, 0x147df70, 0xc4200c2120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:56 +0x7c
created by main.initFuseFrontend
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:282 +0x142e
--- FAIL: TestTooLongSymlink (0.00s)
	correctness_test.go:192: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/158203620/607700211/TooLongSymlink: file name too long
ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/158203620/reverse_mnt_176418205.sock: use of closed network connection
-wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/158203620/reverse_mnt_176418205.sock: use of closed network connection
panic: -wpanic turns this warning into a panic: ctlsock: Accept error: accept unix /tmp/gocryptfs-test-parent/158203620/reverse_mnt_176418205.sock: use of closed network connection

goroutine 5 [running]:
log.(*Logger).Panic(0xc4200a8230, 0xc420049f28, 0x1, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/log/log.go:212 +0xbe
github.com/rfjakob/gocryptfs/internal/tlog.(*toggledLogger).Printf(0xc4200806f0, 0x123af6f, 0x19, 0xc420049f78, 0x1, 0x1)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/tlog/log.go:65 +0x233
github.com/rfjakob/gocryptfs/internal/ctlsock.(*ctlSockHandler).acceptLoop(0xc420236000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:66 +0xdc
github.com/rfjakob/gocryptfs/internal/ctlsock.Serve(0x125fdc0, 0xc420080990, 0x147df70, 0xc42005c180)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/ctlsock/ctlsock_serve.go:56 +0x7c
created by main.initFuseFrontend
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:282 +0x142e
FAIL
umount(/private/tmp/gocryptfs-test-parent/158203620/b): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc4200e42d0, 0x26)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:189 +0xbc
github.com/rfjakob/gocryptfs/tests/reverse_test.TestMain(0xc4200f8000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/reverse/main_test.go:45 +0x351
main.main()
	_testmain.go:60 +0x151
SIGABRT: abort
PC=0x10593fb m=0 sigcode=0

goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x703, 0xb80000000e, 0x1027f1a, 0x7fff00001a03, 0x0, 0x1369b60, 0x7fff5fbff6f8, 0x1053843, 0xffffffffffffffff, 0x0, ...)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sys_darwin_amd64.s:540 +0xb
runtime.semasleep1(0xffffffffffffffff, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:438 +0x52
runtime.semasleep.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:457 +0x33
runtime.semasleep(0xffffffffffffffff, 0x7fff5fbff768)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:456 +0x44
runtime.notesleep(0x136a3e8)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/lock_sema.go:167 +0xe9
runtime.stoplockedm()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2096 +0x8c
runtime.schedule()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2488 +0x2da
runtime.park_m(0xc420292300)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2599 +0xb6
runtime.mcall(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:351 +0x5b

goroutine 1 [syscall, 3 minutes]:
syscall.Syscall(0x3, 0x6, 0xc42015c000, 0x21000, 0x4d, 0x0, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x6, 0xc42015c000, 0x21000, 0x21000, 0x0, 0x1, 0x100)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f
syscall.Read(0x6, 0xc42015c000, 0x21000, 0x21000, 0x106bdb0, 0xc42023a060, 0xc42054a000)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/syscall_unix.go:162 +0x49
github.com/hanwen/go-fuse/fuse.(*Server).readRequest.func1(0xc42054a000, 0xc42004e228)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:259 +0x55
github.com/hanwen/go-fuse/fuse.handleEINTR(0xc4202f3978, 0x11de360, 0xc420208340)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:235 +0x27
github.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc42023a000, 0x1244900, 0xc42023a000, 0xc4200118c0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:257 +0x153
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc42023a000, 0x0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x6b
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc42023a000)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:324 +0x59
main.doMount(0xc4200a4120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:176 +0x725
main.main()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/main.go:286 +0x4f7

goroutine 18 [chan send, 6 minutes]:
github.com/rfjakob/gocryptfs/internal/cryptocore.(*randPrefetcherT).refillWorker(0x1369900)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:51 +0x64
created by github.com/rfjakob/gocryptfs/internal/cryptocore.init.0
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:16 +0x70

goroutine 19 [syscall, 6 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sigqueue.go:139 +0xa7
os/signal.loop()
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 33 [sleep, 6 minutes]:
time.Sleep(0x34630b8a000)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/time.go:102 +0x166
github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse.longnameCacheCleaner()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse/reverse_longnames.go:41 +0x42
created by github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse.initLongnameCache
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse/reverse_longnames.go:53 +0x5b

goroutine 49 [select, 6 minutes, locked to thread]:
runtime.gopark(0x1245260, 0x0, 0x1235ec9, 0x6, 0x18, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc420266750, 0xc4202bc060)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/signal_unix.go:549 +0x1c6
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1

goroutine 4 [chan receive, 6 minutes]:
main.handleSigint.func1(0xc4202b8000, 0xc42023a000, 0x7fff5fbffacd, 0x26)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:378 +0x38
created by main.handleSigint
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:377 +0x113

rax    0xe
rbx    0x136a2a0
rcx    0x7fff5fbff698
rdx    0x7fff5fbff718
rdi    0x703
rsi    0x1
rbp    0x7fff5fbff6d0
rsp    0x7fff5fbff698
r8     0x2
r9     0xc4202667c8
r10    0xc4200dc528
r11    0x246
r12    0xc420266768
r13    0xff
r14    0xff
r15    0xf
rip    0x10593fb
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	361.700s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]

rfjakob added a commit that referenced this issue Feb 27, 2018
This Warn() is causing panics in the test suite
on MacOS: #213
@rfjakob
Copy link
Owner

rfjakob commented Feb 27, 2018

I have fixed this panic:

panic: -wpanic turns this warning into a panic: ctlsock: Accept error: accept unix
/tmp/gocryptfs-test-parent/282145481/474785172.sock: use of closed network connection

Hopefully tests run further now

@magnusja
Copy link
Author

Hey there,

unfortunately I still had to kill the processes :(


Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/054759005/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/078964491/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/525322081/b
gocryptfs v1.4.3-35-gac8f8bf without_openssl; go-fuse v20170619-27-g6975cb3; 2018-02-27 go1.10
ok  	github.com/rfjakob/gocryptfs	0.017s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	2.428s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.058s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.357s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.016s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.049s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.020s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.021s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.199s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.021s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.047s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:218: Wrong mode, have 120755, want 0120777
--- FAIL: TestReadlinkat (0.00s)
	sys_common_test.go:15: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/syscallcompat631893774/readlinkat: file name too long
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.049s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.230s
CryptoCore.Wipe: Only nil'ing stdlib refs
CryptoCore.Wipe: Only nil'ing stdlib refs
CryptoCore.Wipe: Only nil'ing stdlib refs
PASS
umount(/private/tmp/gocryptfs-test-parent/589393751/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc420016140, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:189 +0xbc
github.com/rfjakob/gocryptfs/tests/defaults.TestMain(0xc4200d2000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/defaults/main_test.go:21 +0xc6
main.main()
	_testmain.go:70 +0x151
SIGABRT: abort
PC=0x10593fb m=0 sigcode=0

goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x803, 0xe, 0x1369b60, 0x7fff5fbff700, 0x105346d, 0x1369b60, 0x7fff5fbff708, 0x1053843, 0xffffffffffffffff, 0x7fff5fbff720, ...)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sys_darwin_amd64.s:540 +0xb
runtime.semasleep1(0xffffffffffffffff, 0x7fff5fbff720)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:438 +0x52
runtime.semasleep.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:457 +0x33
runtime.semasleep(0xffffffffffffffff, 0x7fff5fbff778)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:456 +0x44
runtime.notesleep(0x136a3e8)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/lock_sema.go:167 +0xe9
runtime.stoplockedm()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2096 +0x8c
runtime.schedule()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2488 +0x2da
runtime.park_m(0xc420068300)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2599 +0xb6
runtime.mcall(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:351 +0x5b

goroutine 1 [syscall, 5 minutes]:
syscall.Syscall(0x3, 0x6, 0xc42023a000, 0x21000, 0x30, 0x0, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x6, 0xc42023a000, 0x21000, 0x21000, 0x1, 0x0, 0x100)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f
syscall.Read(0x6, 0xc42023a000, 0x21000, 0x21000, 0x106bdb0, 0xc4200de060, 0xc42005a880)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/syscall_unix.go:162 +0x49
github.com/hanwen/go-fuse/fuse.(*Server).readRequest.func1(0xc42005a880, 0xc4204ea2a8)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:259 +0x55
github.com/hanwen/go-fuse/fuse.handleEINTR(0xc420045978, 0x11de360, 0xc4203b3220)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:235 +0x27
github.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc4200de000, 0x1244900, 0xc4200de000, 0xc420010900)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:257 +0x153
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc4200de000, 0x0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x6b
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc4200de000)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:324 +0x59
main.doMount(0xc420090120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:176 +0x725
main.main()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/main.go:286 +0x4f7

goroutine 5 [chan send, 5 minutes]:
github.com/rfjakob/gocryptfs/internal/cryptocore.(*randPrefetcherT).refillWorker(0x1369900)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:51 +0x64
created by github.com/rfjakob/gocryptfs/internal/cryptocore.init.0
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:16 +0x70

goroutine 6 [syscall, 5 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sigqueue.go:139 +0xa7
os/signal.loop()
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 17 [select, 5 minutes, locked to thread]:
runtime.gopark(0x1245260, 0x0, 0x1235ec9, 0x6, 0x18, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc420031f50, 0xc420126060)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/signal_unix.go:549 +0x1c6
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1

goroutine 18 [chan receive, 5 minutes]:
main.handleSigint.func1(0xc4200c60c0, 0xc4200de000, 0x7fff5fbffabf, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:378 +0x38
created by main.handleSigint
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:377 +0x113

rax    0xe
rbx    0x136a2a0
rcx    0x7fff5fbff6a8
rdx    0x7fff5fbff728
rdi    0x803
rsi    0x1
rbp    0x7fff5fbff6e0
rsp    0x7fff5fbff6a8
r8     0x2
r9     0xc420031fc8
r10    0xc42016c048
r11    0x246
r12    0xc420031f68
r13    0xff
r14    0xff
r15    0xf
rip    0x10593fb
rflags 0x246
cs     0x7
fs     0x0
gs     0x0
FAIL	github.com/rfjakob/gocryptfs/tests/defaults	340.554s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	9.094s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.675s
touch: illegal option -- -
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
--- FAIL: TestUtimesNanoSymlink (0.01s)
	matrix_test.go:700: exit status 1
--- FAIL: TestUtimesNano (0.01s)
	matrix_test.go:759: Testcase 1: Wrong atime nanoseconds: want=2 actual=0
	matrix_test.go:759: Testcase 2: Wrong atime nanoseconds: want=8 actual=0
	matrix_test.go:759: Testcase 3: Wrong atime seconds: want=7 actual=100
--- FAIL: TestUtimesNanoFd (0.00s)
	matrix_test.go:750: no such file or directory
FAIL
umount(/private/tmp/gocryptfs-test-parent/645694823/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc42009c080, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:189 +0xbc
github.com/rfjakob/gocryptfs/tests/matrix.TestMain(0xc4200f0000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/matrix/matrix_test.go:72 +0x4ca
main.main()
	_testmain.go:78 +0x151
SIGABRT: abort
PC=0x10593fb m=0 sigcode=0

goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x803, 0x0, 0xc420516000, 0x7fff5fbff600, 0x101f568, 0x1369b60, 0x7fff5fbff618, 0x1053843, 0xffffffffffffffff, 0x0, ...)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sys_darwin_amd64.s:540 +0xb
runtime.semasleep1(0xffffffffffffffff, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:438 +0x52
runtime.semasleep.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:457 +0x33
runtime.semasleep(0xffffffffffffffff, 0x100ebf3)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:456 +0x44
runtime.notesleep(0x136a3e8)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/lock_sema.go:167 +0xe9
runtime.stopm()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:1947 +0xe5
runtime.findrunnable(0xc420024f00, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2410 +0x50c
runtime.schedule()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2536 +0x13b
runtime.park_m(0xc420069380)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2599 +0xb6
runtime.mcall(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:351 +0x5b

goroutine 1 [syscall, 5 minutes]:
syscall.Syscall(0x3, 0x5, 0xc420120000, 0x21000, 0x30, 0x0, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x5, 0xc420120000, 0x21000, 0x21000, 0x0, 0x0, 0x80)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f
syscall.Read(0x5, 0xc420120000, 0x21000, 0x21000, 0x106bdb0, 0xc4200ea060, 0xc420399000)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/syscall_unix.go:162 +0x49
github.com/hanwen/go-fuse/fuse.(*Server).readRequest.func1(0xc420399000, 0xc420399228)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:259 +0x55
github.com/hanwen/go-fuse/fuse.handleEINTR(0xc420045978, 0x11de360, 0xc4202c63c0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:235 +0x27
github.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc4200ea000, 0x1244900, 0xc4200ea000, 0xc420011200)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:257 +0x153
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc4200ea000, 0x0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x6b
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc4200ea000)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:324 +0x59
main.doMount(0xc4200a2120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:176 +0x725
main.main()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/main.go:286 +0x4f7

goroutine 18 [chan send, 5 minutes]:
github.com/rfjakob/gocryptfs/internal/cryptocore.(*randPrefetcherT).refillWorker(0x1369900)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:51 +0x64
created by github.com/rfjakob/gocryptfs/internal/cryptocore.init.0
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:16 +0x70

goroutine 19 [syscall, 5 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sigqueue.go:139 +0xa7
os/signal.loop()
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 23 [select, 5 minutes, locked to thread]:
runtime.gopark(0x1245260, 0x0, 0x1235ec9, 0x6, 0x18, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc42002f750, 0xc42007a1e0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/signal_unix.go:549 +0x1c6
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1

goroutine 24 [chan receive, 5 minutes]:
main.handleSigint.func1(0xc42009c540, 0xc4200ea000, 0x7fff5fbffabe, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:378 +0x38
created by main.handleSigint
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:377 +0x113

rax    0xe
rbx    0x136a2a0
rcx    0x7fff5fbff5b8
rdx    0x7fff5fbff638
rdi    0x803
rsi    0x1
rbp    0x7fff5fbff5f0
rsp    0x7fff5fbff5b8
r8     0xc42017a001
r9     0x1369f28
r10    0x0
r11    0x286
r12    0x15944027a7134
r13    0xf7
r14    0x77
r15    0x28
rip    0x10593fb
rflags 0x286
cs     0x7
fs     0x0
gs     0x0
FAIL	github.com/rfjakob/gocryptfs/tests/matrix	335.991s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.272s
name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directory--- FAIL: TestLongnameStat (1.81s)
	correctness_test.go:30: failed to verify "/tmp/gocryptfs-test-parent/466364901/c/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
--- FAIL: TestTooLongSymlink (0.00s)
	correctness_test.go:192: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/466364901/575229440/TooLongSymlink: file name too long
FAIL
umount(/private/tmp/gocryptfs-test-parent/466364901/b): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc42001a360, 0x26)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:189 +0xbc
github.com/rfjakob/gocryptfs/tests/reverse_test.TestMain(0xc4200ce000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/reverse/main_test.go:45 +0x351
main.main()
	_testmain.go:60 +0x151
SIGABRT: abort
PC=0x10593fb m=0 sigcode=0

goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x803, 0x0, 0xc420306000, 0x7fff5fbff650, 0x101f568, 0x1369b60, 0x7fff5fbff668, 0x1053843, 0xffffffffffffffff, 0x101c651, ...)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sys_darwin_amd64.s:540 +0xb
runtime.semasleep1(0xffffffffffffffff, 0x101c651)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:438 +0x52
runtime.semasleep.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:457 +0x33
runtime.semasleep(0xffffffffffffffff, 0xc420021770)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/os_darwin.go:456 +0x44
runtime.notesleep(0x136a3e8)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/lock_sema.go:167 +0xe9
runtime.stopm()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:1947 +0xe5
runtime.findrunnable(0xc42001e000, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2410 +0x50c
runtime.schedule()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2536 +0x13b
runtime.park_m(0xc420069680)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:2599 +0xb6
runtime.mcall(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:351 +0x5b

goroutine 1 [syscall, 5 minutes]:
syscall.Syscall(0x3, 0x6, 0xc420220000, 0x21000, 0x4d, 0x0, 0x0)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x6, 0xc420220000, 0x21000, 0x21000, 0x18, 0x106c032, 0x2)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f
syscall.Read(0x6, 0xc420220000, 0x21000, 0x21000, 0x106bdb0, 0xc420208060, 0xc4204a6200)
	/usr/local/Cellar/go/1.10/libexec/src/syscall/syscall_unix.go:162 +0x49
github.com/hanwen/go-fuse/fuse.(*Server).readRequest.func1(0xc4204a6200, 0xc4200b0700)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:259 +0x55
github.com/hanwen/go-fuse/fuse.handleEINTR(0xc420255978, 0x11de360, 0xc42000b6c0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:235 +0x27
github.com/hanwen/go-fuse/fuse.(*Server).readRequest(0xc420208000, 0x1244900, 0xc420208000, 0xc42007f200)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:257 +0x153
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc420208000, 0x0)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:357 +0x6b
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc420208000)
	/Users/magnusja/Library/go/src/github.com/hanwen/go-fuse/fuse/server.go:324 +0x59
main.doMount(0xc4200a4120)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:176 +0x725
main.main()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/main.go:286 +0x4f7

goroutine 18 [chan send, 5 minutes]:
github.com/rfjakob/gocryptfs/internal/cryptocore.(*randPrefetcherT).refillWorker(0x1369900)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:51 +0x64
created by github.com/rfjakob/gocryptfs/internal/cryptocore.init.0
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/cryptocore/randprefetch.go:16 +0x70

goroutine 19 [syscall, 5 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/sigqueue.go:139 +0xa7
os/signal.loop()
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/Cellar/go/1.10/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 22 [sleep, 5 minutes]:
time.Sleep(0x34630b8a000)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/time.go:102 +0x166
github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse.longnameCacheCleaner()
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse/reverse_longnames.go:41 +0x42
created by github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse.initLongnameCache
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse/reverse_longnames.go:53 +0x5b

goroutine 33 [select, 5 minutes, locked to thread]:
runtime.gopark(0x1245260, 0x0, 0x1235ec9, 0x6, 0x18, 0x1)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc420278750, 0xc420272060)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/signal_unix.go:549 +0x1c6
runtime.goexit()
	/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361 +0x1

goroutine 26 [chan receive, 5 minutes]:
main.handleSigint.func1(0xc42026e000, 0xc420208000, 0x7fff5fbffacd, 0x26)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:378 +0x38
created by main.handleSigint
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/mount.go:377 +0x113

rax    0xe
rbx    0x136a2a0
rcx    0x7fff5fbff608
rdx    0x7fff5fbff688
rdi    0x803
rsi    0x1
rbp    0x7fff5fbff640
rsp    0x7fff5fbff608
r8     0x0
r9     0x6
r10    0x1a2c0026
r11    0x286
r12    0x15944027a7134
r13    0x0
r14    0x0
r15    0x1056be0
rip    0x10593fb
rflags 0x286
cs     0x7
fs     0x0
gs     0x0
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	332.764s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]```

@rfjakob
Copy link
Owner

rfjakob commented Feb 28, 2018

Thanks, I can now replicate the hang on Linux. It is a consequence of this unmount failure:

umount(/private/tmp/gocryptfs-test-parent/645694823/default-plain): Resource busy -- try 'diskutil unmount'

The Go test logic will wait for the stdout and stderr file descriptors to be closed, but the gocryptfs mount keeps them open because it does not get unmounted. I'll try to work around this, the tests should not hang even if the unmount fails.

@magnusja
Copy link
Author

Ok sounds good, thanks! Let me know when I should try master again! :)

rfjakob added a commit that referenced this issue Feb 28, 2018
To Go test logic waits for stderr and stdout to close, so
when we share it with a subprocess, it will wait for it to
exit as well.

We don't want the tests to hang when the unmount fails.

Seen on MacOS as reported at
#213
@rfjakob
Copy link
Owner

rfjakob commented Feb 28, 2018

Should be fixed, and the failures in TestEmulateSymlinkat, TestReadlinkat, TestUtimesNanoSymlink, TestUtimesNanoFd as well. Not sure what is going wrong with TestUtimesNano, though.

rfjakob added a commit that referenced this issue Feb 28, 2018
The limit is much lower than on Linux.

#213
@magnusja
Copy link
Author

magnusja commented Mar 1, 2018

Hmm for me these still fail, but it does not freeze anymore!

Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/269777768/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/550896026/default-plain
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/960564543/738061202.mnt
Warning: unmounting leftover filesystem: /private/tmp/gocryptfs-test-parent/415740591/b
gocryptfs v1.4.3-40-g29496ba without_openssl; go-fuse v20170619-27-g6975cb3; 2018-02-28 go1.10
ok  	github.com/rfjakob/gocryptfs	0.019s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	2.612s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.020s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.615s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.057s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.018s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.033s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.049s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.257s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.016s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.020s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:239: Wrong mode, have 120755, want 0120777
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.063s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.476s
PASS
umount(/private/tmp/gocryptfs-test-parent/076370311/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc420016140, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/defaults.TestMain(0xc4200d4000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/defaults/main_test.go:21 +0xc6
main.main()
	_testmain.go:70 +0x151
FAIL	github.com/rfjakob/gocryptfs/tests/defaults	7.168s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	10.879s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.821s
touch: illegal option -- -
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
--- FAIL: TestUtimesNano (0.04s)
	matrix_test.go:763: Testcase 1: Wrong atime nanoseconds: want=2 actual=0
	matrix_test.go:763: Testcase 2: Wrong atime nanoseconds: want=8 actual=0
	matrix_test.go:763: Testcase 3: Wrong atime seconds: want=7 actual=100
FAIL
umount(/private/tmp/gocryptfs-test-parent/374265853/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc420016140, 0x32)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/matrix.TestMain(0xc4200d4000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/matrix/matrix_test.go:72 +0x4ca
main.main()
	_testmain.go:78 +0x151
FAIL	github.com/rfjakob/gocryptfs/tests/matrix	4.265s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.296s
--- FAIL: TestTooLongSymlink (0.00s)
	correctness_test.go:192: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/405751377/091443068/TooLongSymlink: file name too long
FAIL
umount(/private/tmp/gocryptfs-test-parent/405751377/b): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc42001a360, 0x26)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/reverse_test.TestMain(0xc4200c8000)
	/Users/magnusja/Library/go/src/github.com/rfjakob/gocryptfs/tests/reverse/main_test.go:45 +0x351
main.main()
	_testmain.go:60 +0x151
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	3.689s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]

@rfjakob
Copy link
Owner

rfjakob commented Mar 2, 2018

Quick question: are you both on high sierra?

I try to get my hands on a mac box.

@magnusja
Copy link
Author

magnusja commented Mar 2, 2018

I am on El Capitan.

@dominik-lekse
Copy link

I use macOS Sierra 10.12.6. Thanks for improving the support for macOS.

With the recent changes on master, I get the following results when running bash ./test-without-openssl.bash -timeout 60s. The command returns to the shell after 10s without freezing. However, 4 gocryptfs processes remain running afterwards.

gocryptfs v1.4.3-40-g29496ba without_openssl; go-fuse [vendored]; 2018-03-04 go1.10
vendor directory exists, skipping 'go tool vet'
ok  	github.com/rfjakob/gocryptfs	0.016s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	1.805s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.057s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.112s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.015s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.015s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.045s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.018s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.192s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.012s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.016s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
--- FAIL: TestEmulateSymlinkat (0.00s)
	emulate_test.go:239: Wrong mode, have 120755, want 0120777
FAIL
FAIL	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.019s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	1.949s
PASS
umount(/private/tmp/gocryptfs-test-parent/212327163/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc4200ac080, 0x32)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/defaults.TestMain(0xc420106000)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/defaults/main_test.go:21 +0xc6
main.main()
	_testmain.go:70 +0x151
FAIL	github.com/rfjakob/gocryptfs/tests/defaults	2.501s
Skipping OpenSSL tests, I have been compiled without openssl support
umount(/private/tmp/gocryptfs-test-parent/078283133/v1.1-reverse.B): Resource busy -- try 'diskutil unmount'
exit status 1
--- FAIL: TestExampleFSv11reverse (0.15s)
panic: exit status 1 [recovered]
	panic: exit status 1

goroutine 40 [running]:
testing.tRunner.func1(0xc42014c1e0)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:742 +0x29d
panic(0x1189dc0, 0xc42016c320)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/panic.go:505 +0x229
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc42017fc00, 0x33)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/example_filesystems.TestExampleFSv11reverse(0xc42014c1e0)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/example_filesystems/example_filesystems_test.go:184 +0x405
testing.tRunner(0xc42014c1e0, 0x11a41e0)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:824 +0x2e0
FAIL	github.com/rfjakob/gocryptfs/tests/example_filesystems	2.201s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.365s
touch: illegal option -- -
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
--- FAIL: TestUtimesNano (0.00s)
	matrix_test.go:763: Testcase 1: Wrong atime nanoseconds: want=2 actual=0
	matrix_test.go:763: Testcase 2: Wrong atime nanoseconds: want=8 actual=0
	matrix_test.go:763: Testcase 3: Wrong atime seconds: want=7 actual=100
FAIL
umount(/private/tmp/gocryptfs-test-parent/293781741/default-plain): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc420018140, 0x32)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/matrix.TestMain(0xc4200dc000)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/matrix/matrix_test.go:72 +0x4ca
main.main()
	_testmain.go:78 +0x151
FAIL	github.com/rfjakob/gocryptfs/tests/matrix	1.835s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.224s
--- FAIL: TestLongnameStat (0.42s)
	correctness_test.go:30: failed to verify "/tmp/gocryptfs-test-parent/081346269/c/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
--- FAIL: TestTooLongSymlink (0.00s)
	correctness_test.go:192: symlink xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /tmp/gocryptfs-test-parent/081346269/147371672/TooLongSymlink: file name too long
FAIL
umount(/private/tmp/gocryptfs-test-parent/081346269/b): Resource busy -- try 'diskutil unmount'
exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc4200f22a0, 0x26)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/reverse_test.TestMain(0xc420100000)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/reverse/main_test.go:45 +0x351
main.main()
	_testmain.go:60 +0x151
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	1.143s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]

@rfjakob
Copy link
Owner

rfjakob commented Mar 5, 2018

I have a borrowed Mac now, and I believe I have fixed the remaining issues in the tests. Comes back clean now for me on High Sierra:

$ ./test-without-openssl.bash 
flock is not available, skipping
gocryptfs v1.4.3-53-g4732e33-dirty without_openssl; go-fuse v20170619-29-gda8b3e4; 2018-03-05 go1.10
ok  	github.com/rfjakob/gocryptfs	0.014s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	1.221s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.013s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.016s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.015s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.013s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.015s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.025s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.118s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.015s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.015s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.021s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	2.182s
ok  	github.com/rfjakob/gocryptfs/tests/defaults	4.214s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	5.169s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.348s
ok  	github.com/rfjakob/gocryptfs/tests/matrix	9.627s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.196s
ok  	github.com/rfjakob/gocryptfs/tests/reverse	3.829s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]

I'll try to reproduce the copy problems next.

@dominik-lekse
Copy link

Thanks for the effort here @rfjakob

On macOS Sierra, I cannot confirm these results. The shell exists without freezing but 4 gocryptfs mounts remain (see below).

Run gocryptfs tests
flock is not available, skipping
gocryptfs v1.4.3-53-g4732e33 without_openssl; go-fuse [vendored]; 2018-03-06 go1.10
vendor directory exists, skipping 'go tool vet'
ok  	github.com/rfjakob/gocryptfs	0.017s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	1.799s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.015s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	0.876s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.014s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.016s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.014s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.017s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.157s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.012s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.014s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.019s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.158s
ok  	github.com/rfjakob/gocryptfs/tests/defaults	2.826s
Skipping OpenSSL tests, I have been compiled without openssl support
umount(/private/tmp/gocryptfs-test-parent/182060702/v1.1-reverse.B): Resource busy -- try 'diskutil unmount'
exit status 1
--- FAIL: TestExampleFSv11reverse (0.51s)
panic: exit status 1 [recovered]
	panic: exit status 1

goroutine 31 [running]:
testing.tRunner.func1(0xc4200fc690)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:742 +0x29d
panic(0x1189dc0, 0xc4200b48c0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/panic.go:505 +0x229
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc4201a6180, 0x33)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/example_filesystems.TestExampleFSv11reverse(0xc4200fc690)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/example_filesystems/example_filesystems_test.go:196 +0x5ee
testing.tRunner(0xc4200fc690, 0x11a41e0)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:824 +0x2e0
FAIL	github.com/rfjakob/gocryptfs/tests/example_filesystems	2.002s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.406s
ok  	github.com/rfjakob/gocryptfs/tests/matrix	7.267s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.295s
--- FAIL: TestLongnameStat (0.21s)
	correctness_test.go:31: failed to verify "/tmp/gocryptfs-test-parent/503778730/c/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
umount(/private/tmp/gocryptfs-test-parent/503778730/reverse_mnt_859891820): Resource busy -- try 'diskutil unmount'
exit status 1
--- FAIL: TestSymlinkDentrySize (0.36s)
panic: exit status 1 [recovered]
	panic: exit status 1

goroutine 25 [running]:
testing.tRunner.func1(0xc4201202d0)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:742 +0x29d
panic(0x11e18c0, 0xc4200c2b20)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/panic.go:505 +0x229
github.com/rfjakob/gocryptfs/tests/test_helpers.UnmountPanic(0xc420149140, 0x3a)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/test_helpers/helpers.go:199 +0xbc
github.com/rfjakob/gocryptfs/tests/reverse_test.TestSymlinkDentrySize(0xc4201202d0)
	/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/reverse/correctness_test.go:104 +0x4db
testing.tRunner(0xc4201202d0, 0x11fe750)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:824 +0x2e0
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	1.601s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]
make: *** [gocryptfs-test] Error 1

The following mount entries remain after the test run.

/tmp/gocryptfs-test-parent/503778730/889586433 on /private/tmp/gocryptfs-test-parent/503778730/b (osxfuse, nodev, nosuid, read-only, synchronous, mounted by lekse)
/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/example_filesystems/ on /private/tmp/gocryptfs-test-parent/182060702/v1.1-reverse.B (osxfuse, nodev, nosuid, read-only, synchronous, mounted by lekse)
/tmp/gocryptfs-test-parent/503778730/b on /private/tmp/gocryptfs-test-parent/503778730/c (osxfuse, nodev, nosuid, synchronous, mounted by lekse)
/Users/lekse/Projects/cryptfs/src/github.com/rfjakob/gocryptfs/tests/reverse/ctlsock_reve on /private/tmp/gocryptfs-test-parent/503778730/reverse_mnt_859891820 (osxfuse, nodev, nosuid, read-only, synchronous, mounted by lekse)

Due to the Resource busy -- try 'diskutil unmount' messages from the test log, I assume that the umount appears too fast after finishing a single test. Thus, I changed umount "$MNT" to umount -f "$MNT" in fuse-unmount.bash but get the following results from the test run. However, there are no mounts left over after the test run. Since, when forcibly unmount, the error messages in the test results reference missing files, could too early unmount attempts in the tests be the cause?

Run gocryptfs tests
flock is not available, skipping
gocryptfs v1.4.3-53-g4732e33-dirty without_openssl; go-fuse [vendored]; 2018-03-06 go1.10
vendor directory exists, skipping 'go tool vet'
ok  	github.com/rfjakob/gocryptfs	0.034s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	1.776s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.017s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.179s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.022s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.016s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.056s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.018s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.153s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.012s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.016s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.020s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.449s
ok  	github.com/rfjakob/gocryptfs/tests/defaults	3.649s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	4.292s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.373s
PASS
--- FAIL: TestLongNames (0.02s)
	matrix_test.go:581: short is not in directory listing
FAIL
FAIL	github.com/rfjakob/gocryptfs/tests/matrix	4.214s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	1.183s
name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directoryname="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directory--- FAIL: TestLongnameStat (0.62s)
	correctness_test.go:31: failed to verify "/tmp/gocryptfs-test-parent/049184601/c/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
--- FAIL: TestConfigMapping (0.01s)
	correctness_test.go:111: /tmp/gocryptfs-test-parent/049184601/b/gocryptfs.conf missing
FAIL
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	2.336s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]
make: *** [gocryptfs-test] Error 1

@rfjakob
Copy link
Owner

rfjakob commented Mar 6, 2018

Each of the

umount(...): Resource busy -- try 'diskutil unmount'

errors will leave one mounted filesystem behind. The cases that I saw and fixed were file descriptors that are not closed explicitely ( 3064d72 ). I guess there are a few more. Go closes the file descriptors when garbage-collecting, so it depends on the timing if you hit the problem. I'll take another look.

The errors you got later, like

matrix_test.go:581: short is not in directory listing

are caused by test files that have been deleted on the end of the test run. Run git status to see which and git checkout master to restore them.

@rfjakob
Copy link
Owner

rfjakob commented Mar 6, 2018

PS: On linux, this cannot happen, as the tests use rm --one-file-system

rm -Rf --one-file-system $TESTDIR

but this is not available on MacOS. Suggestions welcome for alternatives.

rfjakob added a commit that referenced this issue Mar 6, 2018
macos does not have "rm --one-file-system", so try to unmount
all remaining test filesystems to protect the backing
stores.

#213
@rfjakob
Copy link
Owner

rfjakob commented Mar 6, 2018

Can you give it another go? With 98f735f we will print a list of open files that keep the mount busy.

@magnusja
Copy link
Author

magnusja commented Mar 7, 2018

Output on El Capitan

gocryptfs v1.4.3-56-gc458d99 without_openssl; go-fuse v20170619-27-g6975cb3; 2018-03-06 go1.10
ok  	github.com/rfjakob/gocryptfs	0.058s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	4.053s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.060s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.886s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.058s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.075s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.064s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.058s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.253s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.014s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.060s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.066s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	3.884s
ok  	github.com/rfjakob/gocryptfs/tests/defaults	9.557s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	14.257s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	0.582s
ok  	github.com/rfjakob/gocryptfs/tests/matrix	20.390s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.399s
PASS
name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directoryname="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directory--- FAIL: TestLongnameStat (0.80s)
	correctness_test.go:31: failed to verify "/tmp/gocryptfs-test-parent/043855442/c/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
FAIL
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	4.687s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]

@rfjakob
Copy link
Owner

rfjakob commented Mar 7, 2018

Thanks for testing, looks good besides the

FAIL: TestLongnameStat
FAIL	github.com/rfjakob/gocryptfs/tests/reverse

May be a caching effect, and it's only relevant for reverse mode

@dominik-lekse
Copy link

Test run on Sierra:

flock is not available, skipping
gocryptfs v1.4.3-58-g0269391 without_openssl; go-fuse [vendored]; 2018-03-07 go1.10
vendor directory exists, skipping 'go tool vet'
ok  	github.com/rfjakob/gocryptfs	0.016s
?   	github.com/rfjakob/gocryptfs/gocryptfs-xray	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/configfile	1.850s
ok  	github.com/rfjakob/gocryptfs/internal/contentenc	0.036s
ok  	github.com/rfjakob/gocryptfs/internal/cryptocore	1.052s
ok  	github.com/rfjakob/gocryptfs/internal/ctlsock	0.017s
?   	github.com/rfjakob/gocryptfs/internal/exitcodes	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/fusefrontend_reverse	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/nametransform	0.013s
?   	github.com/rfjakob/gocryptfs/internal/nametransform/dirivcache	[no test files]
?   	github.com/rfjakob/gocryptfs/internal/openfiletable	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/pathiv	0.015s
ok  	github.com/rfjakob/gocryptfs/internal/prefer_openssl	0.032s
ok  	github.com/rfjakob/gocryptfs/internal/readpassword	0.122s
?   	github.com/rfjakob/gocryptfs/internal/serialize_reads	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/siv_aead	0.013s
ok  	github.com/rfjakob/gocryptfs/internal/speed	0.014s [no tests to run]
?   	github.com/rfjakob/gocryptfs/internal/stupidgcm	[no test files]
ok  	github.com/rfjakob/gocryptfs/internal/syscallcompat	0.018s
?   	github.com/rfjakob/gocryptfs/internal/tlog	[no test files]
ok  	github.com/rfjakob/gocryptfs/tests/cli	2.618s
ok  	github.com/rfjakob/gocryptfs/tests/defaults	3.322s
ok  	github.com/rfjakob/gocryptfs/tests/example_filesystems	3.883s
ok  	github.com/rfjakob/gocryptfs/tests/hkdf_sanity	1.155s
ok  	github.com/rfjakob/gocryptfs/tests/matrix	7.898s
ok  	github.com/rfjakob/gocryptfs/tests/plaintextnames	0.202s
name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directoryname="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" err=no such file or directory--- FAIL: TestLongnameStat (1.24s)
	correctness_test.go:31: failed to verify "/tmp/gocryptfs-test-parent/134505975/c/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
FAIL
FAIL	github.com/rfjakob/gocryptfs/tests/reverse	2.061s
?   	github.com/rfjakob/gocryptfs/tests/test_helpers	[no test files]

No left-over mounts afterwards.

@rfjakob
Copy link
Owner

rfjakob commented Mar 7, 2018

I have fixed the extractloop.bash stress test to work on MacOS and I can reproduce the osxfuse: vnode changed generation problem with it.

As it does not only affect gocryptfs, this is probably a problem between the go-fuse library an osxfuse. I have asked for ideas at hanwen/go-fuse#204 .

@magnusja
Copy link
Author

magnusja commented Mar 8, 2018

Sounds good, keep us posted! :)

rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 13, 2018
Implement simpleHandleMap that never reuses handle numbers and
uses a simple map to track handle numbers.

This hopefully works around the

	osxfuse: vnode changed generation

errors we are seeing on darwin, while sacrificing
performance.

rfjakob/gocryptfs#213
hanwen#204
macfuse/macfuse#482
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 13, 2018
Implement simpleHandleMap that never reuses handle numbers and
uses a simple map to track handle numbers.

This seems to get rid of the

	osxfuse: vnode changed generation

errors we are seeing on darwin, while sacrificing
some performance.

I have tested simpleHandleMap on darwin and linux,
seems to work fine.

rfjakob/gocryptfs#213
hanwen#204
macfuse/macfuse#482
@rfjakob
Copy link
Owner

rfjakob commented Mar 13, 2018

I have pushed a change to the go-fuse library that seems to improve the situation. You can apply it like this:

cd ~/go/src/github.com/hanwen/go-fuse
git remote add rfjakob https://github.com/rfjakob/go-fuse.git
git remote update
git checkout simplehandlemap

Then compile gocryptfs again.

Does it fix the problems you see when copying many files?

@magnusja
Copy link
Author

magnusja commented Mar 14, 2018

So the situation definitely improved, but I still get it occasionally :(
Meaning that I cannot copy more than 10 GB usually, also a lot of small files seem to make a lot of problems.

@rfjakob
Copy link
Owner

rfjakob commented Mar 15, 2018

Thanks for testing! Quick cross-check: What is your gocryptfs -version ? You should be getting

gocryptfs v1.4.3-62-g4b75b57 without_openssl; go-fuse v20170619-30-ga009503; 2018-03-15 go1.10

Second question: do you still get the

osxfuse: vnode changed generation

messages?

@benrubson
Copy link

On linux, this cannot happen, as the tests use rm --one-file-system
but this is not available on MacOS. Suggestions welcome for alternatives.

What about something around the following ?
find . -xdev -exec rm -rf {} \;

@magnusja
Copy link
Author

Ouch, my bad! I was still using the executable installed by homebrew. I copied 20GB and used the mount all day for all sorts of stuff and I do not have any issues anymore!

Thanks a lot for your effort, I appreciate it!

@dominik-lekse
Copy link

Many thanks!

@rfjakob
Copy link
Owner

rfjakob commented Mar 18, 2018

The fix has just been merged into the go-fuse library ( hanwen/go-fuse@a9ddcb8 ), will be in gocryptfs v1.4.4. Will release in the next days.

@rfjakob
Copy link
Owner

rfjakob commented Mar 18, 2018

I have just released gocryptfs v1.4.4 that contains the fix. Thanks to everybody involved in reporting and testing!

I guess Homebrew will pick up the new version soon - or, for your convenience, and because the issue is quite disrupting, I have uploaded an MacOS build here: gocryptfs_v1.4.4_macos.tar.gz

@rfjakob rfjakob closed this as completed Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants