{"action":"opened","issue":{"url":"https://api.github.com/repos/osxfuse/osxfuse/issues/229","labels_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/229/comments","events_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/229/events","html_url":"https://github.com/osxfuse/osxfuse/issues/229","id":102029501,"number":229,"title":"3.0.4 invalidate notifications do not update size until getattr is called","user":{"login":"tv42","id":419909,"avatar_url":"https://avatars.githubusercontent.com/u/419909?v=3","gravatar_id":"","url":"https://api.github.com/users/tv42","html_url":"https://github.com/tv42","followers_url":"https://api.github.com/users/tv42/followers","following_url":"https://api.github.com/users/tv42/following{/other_user}","gists_url":"https://api.github.com/users/tv42/gists{/gist_id}","starred_url":"https://api.github.com/users/tv42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tv42/subscriptions","organizations_url":"https://api.github.com/users/tv42/orgs","repos_url":"https://api.github.com/users/tv42/repos","events_url":"https://api.github.com/users/tv42/events{/privacy}","received_events_url":"https://api.github.com/users/tv42/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-20T00:23:40Z","updated_at":"2015-08-20T00:23:40Z","closed_at":null,"body":"Supporting files are at https://gist.github.com/tv42/b6aa442e79c2f3514475\r\n\r\n`clockfs` is an example FUSE filesystem that uses cache invalidate notifications to update the contents of a file, containing an update counter and a timestamp. The point is that the file content can be cached in between the updates.\r\n\r\nhttps://github.com/bazil/fuse/blob/ad1470dabe5811dae6e49a45c6d4da39fc879f95/examples/clockfs/clockfs.go\r\n\r\nThe size of the file changes as more digits are added to the update counter, and sometimes due to the fractional seconds needing different amount of digits.\r\n\r\nWith OSXFUSE 3.0.4, the file content changes, but the size is \"stuck\". Causes a Getattr (via `stat(2)` etc) causes the size to update. This is similar to https://github.com/osxfuse/osxfuse/issues/224 but slightly different.\r\n\r\nThis does not reproduce 100% of the time. If you are having trouble, I can write a more aggressive demonstration; I just happened to have `clockfs` ready.\r\n\r\nHow to reproduce:\r\n\r\n```console\r\n### terminal A\r\n$ ./clockfs -fuse.debug mnt\r\n### terminal B\r\n$ while sleep 0.1; do cat ~/mnt/clock|hexdump -C; done\r\n```\r\n\r\nNote how at some point, the content change causes the newline at the end to go missing.\r\nThe other way, with extra zero padding, is invisible in the terminal. To make it visible,\r\ntry:\r\n\r\n```console\r\n$ while sleep 0.1; do cat ~/mnt/clock|hexdump -C; done\r\n```\r\n\r\nThe `cat` seems to be needed to ensure `hexdump` does not do a `stat(2)` and hide the bug.\r\n\r\nExample output:\r\n\r\n```console\r\n$ while sleep 0.1; do cat ~/mnt/clock; done\r\n4       2015-08-19 17:20:31.328868336 -0700 PDT\r\n4       2015-08-19 17:20:31.328868336 -0700 PDT\r\n4       2015-08-19 17:20:31.328868336 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n5       2015-08-19 17:20:32.328791091 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n6       2015-08-19 17:20:33.328626129 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n7       2015-08-19 17:20:34.327974147 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n8       2015-08-19 17:20:35.328813319 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n9       2015-08-19 17:20:36.328796398 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n10      2015-08-19 17:20:37.32877384 -0700 PDT\r\n11      2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT11       2015-08-19 17:20:38.328894971 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT12       2015-08-19 17:20:39.328992325 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT13       2015-08-19 17:20:40.328788466 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT14       2015-08-19 17:20:41.328581728 -0700 PDT^C\r\n```\r\n"}}