kahing / catfs

Cache AnyThing filesystem written in Rust
Apache License 2.0
851 stars 54 forks source link

File appears truncated #22

Closed isarandi closed 3 years ago

isarandi commented 5 years ago

Scenario: a remote file changes. Problem: While the cache content is good and up-to date, the view presented at the mountpoint (third argument to catfs) is truncated. The file is there, but it's only partially present if I display it via cat. Other times a bunch of NULL bytes appear at the end.

So the cache directory content is fine, but through the mountpoint I get garbage.

mikkorantalainen commented 4 years ago

Is it still possible to reproduce this issue?

isarandi commented 4 years ago

Sorry, I no longer use this program or have the configuration set up.

hamann commented 3 years ago

Just ran into the same issue with 0.7.0

# catfs -f --free 1G -- /tmp/.goofys-mnt789144897 /mnt/.certificate-bucket-cache /etc/xxx/certs
❯ md5sum /tmp/.goofys-mnt789144897/acme/common.pem
48ed276b1065aa80addacf0ade73b0e7  /tmp/.goofys-mnt789144897/acme/common.pem

❯ md5sum /mnt/.certificate-bucket-cache/acme/common.pem
48ed276b1065aa80addacf0ade73b0e7  /mnt/.certificate-bucket-cache/acme/common.pem

❯ md5sum /etc/xxx/certs/acme/common.pem
8aa5997908a9dcc817e1f5919d2b1721  /etc/xxx/certs/acme/common.pem

May 27 04:49:41 goofys[17900]: 2021/05/27 04:49:41.190994 catfs.INFO 2021-05-27 04:49:41 ERROR - "acme/common.pem" is not a valid cache file, deleting
May 27 04:49:41 goofys[17900]: 2021/05/27 04:49:41.195693 catfs.INFO 2021-05-27 04:49:41 ERROR - <-- !write 0x00000000000024ba "-----BEGIN RSA PRIVATE KEY-----\n" @ 0 = Operation canceled (os error 125)
May 28 04:41:57 goofys[17900]: 2021/05/28 04:41:57.176599 catfs.INFO 2021-05-28 04:41:57 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 28 04:41:57 goofys[17900]: 2021/05/28 04:41:57.181079 catfs.INFO 2021-05-28 04:41:57 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 28 04:42:00 goofys[17900]: 2021/05/28 04:42:00.366764 catfs.INFO 2021-05-28 04:42:00 WARN  - Ignoring unknown FUSE operation 39
May 28 04:42:00 goofys[17900]: 2021/05/28 04:42:00.426198 catfs.INFO 2021-05-28 04:42:00 WARN  - Ignoring unknown FUSE operation 39
May 28 04:42:00 goofys[17900]: 2021/05/28 04:42:00.477326 catfs.INFO 2021-05-28 04:42:00 WARN  - Ignoring unknown FUSE operation 39
May 28 04:42:00 goofys[17900]: 2021/05/28 04:42:00.609935 catfs.INFO 2021-05-28 04:42:00 WARN  - Ignoring unknown FUSE operation 39
May 28 04:42:01 goofys[17900]: 2021/05/28 04:42:01.136163 catfs.INFO 2021-05-28 04:42:01 ERROR - "acme/common.pem" is not a valid cache file, deleting
May 28 04:42:01 goofys[17900]: 2021/05/28 04:42:01.140840 catfs.INFO 2021-05-28 04:42:01 ERROR - <-- !write 0x00000000000024de "-----BEGIN RSA PRIVATE KEY-----\n" @ 0 = Operation canceled (os error 125)
May 29 04:23:23 goofys[17900]: 2021/05/29 04:23:23.971516 catfs.INFO 2021-05-29 04:23:23 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 29 04:23:23 goofys[17900]: 2021/05/29 04:23:23.975553 catfs.INFO 2021-05-29 04:23:23 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 29 04:23:26 goofys[17900]: 2021/05/29 04:23:26.939954 catfs.INFO 2021-05-29 04:23:26 WARN  - Ignoring unknown FUSE operation 39
May 29 04:23:27 goofys[17900]: 2021/05/29 04:23:27.113407 catfs.INFO 2021-05-29 04:23:27 WARN  - Ignoring unknown FUSE operation 39
May 29 04:23:27 goofys[17900]: 2021/05/29 04:23:27.264624 catfs.INFO 2021-05-29 04:23:27 WARN  - Ignoring unknown FUSE operation 39
May 29 04:23:27 goofys[17900]: 2021/05/29 04:23:27.404860 catfs.INFO 2021-05-29 04:23:27 WARN  - Ignoring unknown FUSE operation 39
May 29 04:23:27 goofys[17900]: 2021/05/29 04:23:27.851121 catfs.INFO 2021-05-29 04:23:27 ERROR - "acme/common.pem" is not a valid cache file, deleting
May 29 04:23:27 goofys[17900]: 2021/05/29 04:23:27.855742 catfs.INFO 2021-05-29 04:23:27 ERROR - <-- !write 0x0000000000002502 "-----BEGIN RSA PRIVATE KEY-----\n" @ 0 = Operation canceled (os error 125)
May 30 04:16:09 goofys[17900]: 2021/05/30 04:16:09.615329 catfs.INFO 2021-05-30 04:16:09 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 30 04:16:09 goofys[17900]: 2021/05/30 04:16:09.619701 catfs.INFO 2021-05-30 04:16:09 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 30 04:16:12 goofys[17900]: 2021/05/30 04:16:12.519232 catfs.INFO 2021-05-30 04:16:12 WARN  - Ignoring unknown FUSE operation 39
May 30 04:16:12 goofys[17900]: 2021/05/30 04:16:12.647786 catfs.INFO 2021-05-30 04:16:12 WARN  - Ignoring unknown FUSE operation 39
May 30 04:16:12 goofys[17900]: 2021/05/30 04:16:12.734003 catfs.INFO 2021-05-30 04:16:12 WARN  - Ignoring unknown FUSE operation 39
May 30 04:16:12 goofys[17900]: 2021/05/30 04:16:12.848842 catfs.INFO 2021-05-30 04:16:12 WARN  - Ignoring unknown FUSE operation 39
May 30 04:16:13 goofys[17900]: 2021/05/30 04:16:13.117428 catfs.INFO 2021-05-30 04:16:13 ERROR - "acme/common.pem" is not a valid cache file, deleting
May 30 04:16:13 goofys[17900]: 2021/05/30 04:16:13.121929 catfs.INFO 2021-05-30 04:16:13 ERROR - <-- !write 0x0000000000002526 "-----BEGIN RSA PRIVATE KEY-----\n" @ 0 = Operation canceled (os error 125)
May 31 04:48:30 goofys[17900]: 2021/05/31 04:48:30.246389 catfs.INFO 2021-05-31 04:48:30 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 31 04:48:30 goofys[17900]: 2021/05/31 04:48:30.250561 catfs.INFO 2021-05-31 04:48:30 ERROR - "acme.conf.d/xxx/xxx.conf" is not a valid cache file, deleting
May 31 04:48:33 goofys[17900]: 2021/05/31 04:48:33.083284 catfs.INFO 2021-05-31 04:48:33 WARN  - Ignoring unknown FUSE operation 39
May 31 04:48:33 goofys[17900]: 2021/05/31 04:48:33.145723 catfs.INFO 2021-05-31 04:48:33 WARN  - Ignoring unknown FUSE operation 39
May 31 04:48:33 goofys[17900]: 2021/05/31 04:48:33.227478 catfs.INFO 2021-05-31 04:48:33 WARN  - Ignoring unknown FUSE operation 39
May 31 04:48:33 goofys[17900]: 2021/05/31 04:48:33.394232 catfs.INFO 2021-05-31 04:48:33 WARN  - Ignoring unknown FUSE operation 39
May 31 04:48:33 goofys[17900]: 2021/05/31 04:48:33.837106 catfs.INFO 2021-05-31 04:48:33 ERROR - "acme/common.pem" is not a valid cache file, deleting
May 31 04:48:33 goofys[17900]: 2021/05/31 04:48:33.841675 catfs.INFO 2021-05-31 04:48:33 ERROR - <-- !write 0x000000000000254a "-----BEGIN RSA PRIVATE KEY-----\n" @ 0 = Operation canceled (os error 125)
May 31 11:20:51 goofys[17900]: 2021/05/31 11:20:51.625799 catfs.INFO 2021-05-31 11:20:51 ERROR - "acme/common.pem" is not a valid cache file, deleting
May 31 11:25:43 goofys[17900]: 2021/05/31 11:25:43.822972 catfs.INFO 2021-05-31 11:25:43 ERROR - "acme/common.cer" is not a valid cache file, deleting
May 31 11:25:55 goofys[17900]: 2021/05/31 11:25:55.584396 catfs.INFO 2021-05-31 11:25:55 ERROR - "acme/common.pem" is not a valid cache file, deleting