<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/tests/cluster, branch LockSharedStorage_rebase1</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage_rebase1</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage_rebase1'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2024-12-13T20:21:15+00:00</updated>
<entry>
<title>tests/cluster: enable TestClusterConcurrentRW per default</title>
<updated>2024-12-13T20:21:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:35:04+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=059f842e732a690f8684cb24d0a663cb7907ae92'/>
<id>urn:sha1:059f842e732a690f8684cb24d0a663cb7907ae92</id>
<content type='text'>
Add the -sharedstorage flag to the mounts and make it more
severe by adjusting the I/O and file sizes to arbitrary unaligned
values.

It passes *most of the time*.

If it fails, it's like this, and the reason is that there is no
fcntl locks in the READ path yet.

gocryptfs/tests/cluster$ go test -run TestClusterConcurrentRW -v
=== RUN   TestClusterConcurrentRW
doRead 2895433: corrupt block #0: cipher: message authentication failed
doRead 2895433: corrupt block #0: cipher: message authentication failed
doRead 2895433: corrupt block #0: cipher: message authentication failed
    cluster_test.go:98: readThread iteration 9165: ReadAt failed: read /var/tmp/gocryptfs-test-parent-1026/3021427391/TestClusterConcurrentRW.366469887.mnt1/foo: input/output error
 --- FAIL: TestClusterConcurrentRW (0.40s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.406s
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCTornWriteLocked</title>
<updated>2024-12-13T20:21:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=57bdab71237f76d1dd0bbb067e66076f970327d1'/>
<id>urn:sha1:57bdab71237f76d1dd0bbb067e66076f970327d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: note that ext4 provides no atomicity</title>
<updated>2024-12-13T20:21:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T05:50:11+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=0008ce3f789d2db581920a8cb859f74be1b650fc'/>
<id>urn:sha1:0008ce3f789d2db581920a8cb859f74be1b650fc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCTornWrite</title>
<updated>2024-12-13T20:21:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T13:50:05+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=3868f63fbdb97d61c7ff78a9a5b1ba805741aa50'/>
<id>urn:sha1:3868f63fbdb97d61c7ff78a9a5b1ba805741aa50</id>
<content type='text'>
Scary. But explains why TestConcurrentCreate fails.

gocryptfs/tests/cluster$ go test -run TestPoCTornWrite
 --- FAIL: TestPoCTornWrite (0.00s)
    poc_test.go:210: iteration 214: inconsistent block: d6d6d6d6d6d6d6d6d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1
FAIL
</content>
</entry>
<entry>
<title>tests/cluster: add TestOpenTruncate</title>
<updated>2024-12-13T20:21:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T11:43:23+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=fac5a37bb3216648ed75ba97839e9cca952a79e5'/>
<id>urn:sha1:fac5a37bb3216648ed75ba97839e9cca952a79e5</id>
<content type='text'>
This fails right now:

1 jakob@brikett:~/go/src/github.com/rfjakob/gocryptfs/tests/cluster$ go test -run TestOpenTruncate -v
=== RUN   TestOpenTruncate
    cluster_test.go:235: POSIX compliance issue: non-exlusive create failed with err=file exists
doWrite 2898550: corrupt header: ParseHeader: header is all-zero. Header hexdump: 000000000000000000000000000000000000
    cluster_test.go:240: iteration 1: WriteAt: write /var/tmp/gocryptfs-test-parent-1026/1896094179/TestOpenTruncate.4202105280.mnt2/foo: input/output error
 --- FAIL: TestOpenTruncate (0.10s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.099s
1 jakob@brikett:~/go/src/github.com/rfjakob/gocryptfs/tests/cluster$ go test -run TestOpenTruncate -v
=== RUN   TestOpenTruncate
    cluster_test.go:235: POSIX compliance issue: non-exlusive create failed with err=file exists
doRead 2898565: corrupt block #0: cipher: message authentication failed
ino2898565 fh9: RMW read failed: errno=5
    cluster_test.go:240: iteration 8: WriteAt: write /var/tmp/gocryptfs-test-parent-1026/652691834/TestOpenTruncate.281532388.mnt1/foo: input/output error
 --- FAIL: TestOpenTruncate (0.09s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.095s
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCHeaderCreation</title>
<updated>2024-12-04T18:53:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T11:28:11+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=f28ba04ef42f32f0383285efe99ec875ae5c8b8f'/>
<id>urn:sha1:f28ba04ef42f32f0383285efe99ec875ae5c8b8f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: add TestConcurrentCreate</title>
<updated>2024-12-04T18:53:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T10:42:33+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=f089268daa3745f2c7e8d17b1876fc58f6b49f46'/>
<id>urn:sha1:f089268daa3745f2c7e8d17b1876fc58f6b49f46</id>
<content type='text'>
This exercises the byte-range locks we just added.
</content>
</entry>
<entry>
<title>fusefrontend: sharedstorage: use byte-range lock on file header creation</title>
<updated>2024-12-04T18:53:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-02T12:24:44+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=8f76d1ea0a63f546ad09fa70be1ed7b6a7d29fe6'/>
<id>urn:sha1:8f76d1ea0a63f546ad09fa70be1ed7b6a7d29fe6</id>
<content type='text'>
Multiple host writing to the same empty file at the same time
could have overwritten each other's newly created file header,
leading to data corruption.

Fix the race by placing a byte-range lock on the file when
creating the file header.
</content>
</entry>
<entry>
<title>tests: add cluster test</title>
<updated>2023-05-30T07:43:45+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-05-30T07:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=3058b7978fd8dabd3e8565c9be816b1367bd196a'/>
<id>urn:sha1:3058b7978fd8dabd3e8565c9be816b1367bd196a</id>
<content type='text'>
finds out what happens if multiple
gocryptfs mounts write to one file concurrently
(usually, nothing good).

This use case is relevant for HPC clusters.
</content>
</entry>
</feed>
