{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/164","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/164/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/164/events","html_url":"https://github.com/GoogleCloudPlatform/gcsfuse/issues/164","id":139077740,"number":164,"title":"panic: interface conversion: inode.Inode is nil, not *inode.FileInode","user":{"login":"joshk0","id":5368926,"avatar_url":"https://avatars.githubusercontent.com/u/5368926?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk0","html_url":"https://github.com/joshk0","followers_url":"https://api.github.com/users/joshk0/followers","following_url":"https://api.github.com/users/joshk0/following{/other_user}","gists_url":"https://api.github.com/users/joshk0/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk0/subscriptions","organizations_url":"https://api.github.com/users/joshk0/orgs","repos_url":"https://api.github.com/users/joshk0/repos","events_url":"https://api.github.com/users/joshk0/events{/privacy}","received_events_url":"https://api.github.com/users/joshk0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-07T19:58:24Z","updated_at":"2016-03-08T15:33:52Z","closed_at":null,"body":"We have a sftp server hooked up to gcsfuse 0.17.0. Recently, a user was able to make it panic. It seems that the user was uploading files and gcsfuse crashed right after a StatObject call. Our log times aren't super accurate, but it looks like all this happened within about 5 seconds. Let me know what other data I can provide which might help here. Obviously, we don't have accurate repro steps, but have some plans to increase sftp's internal logging so we can see what the user was doing to cause the crash. Knee jerk reaction, it looks like a race condition or stale cache of some sort.\r\n\r\n```\r\nsshd: Accepted password for some_user from 10.60.3.1 port 50541 ssh2#015\r\nsshd: pam_unix(sshd:session): session opened for user some_user by (uid=0)\r\nsshd: pam_env(sshd:session): Unable to open env file: /etc/default/locale: No such file or directory\r\ngcsfuse: gcs: Req            0x2be: <- StatObject(\"some_user/foobar_20160304.csv/\")\r\ngcsfuse: gcs: Req            0x2bf: <- StatObject(\"some_user/foobar_20160304.csv\")\r\ngcsfuse: gcs: Req            0x2be: -> StatObject(\"some_user/foobar_20160304.csv/\") (25.132669ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound\r\ngcsfuse: gcs: Req            0x2bf: -> StatObject(\"some_user/foobar_20160304.csv\") (140.249602ms): OK \r\ngcsfuse: gcs: Req            0x2c0: <- UpdateObject(\"some_user/foobar_20160304.csv\")\r\ngcsfuse: gcs: Req            0x2c0: -> UpdateObject(\"some_user/foobar_20160304.csv\") (213.891389ms): OK \r\ngcsfuse: gcs: Req            0x2c1: <- Read(\"some_user/foobar_20160304.csv\", <nil>)\r\ngcsfuse: gcs: Req            0x2c1: -> Read(\"some_user/foobar_20160304.csv\", <nil>) (1.078678466s): OK \r\ngcsfuse: gcs: Req            0x2c2: <- CreateObject(\"some_user/foobar_20160304.csv\")\r\ngcsfuse: gcs: Req            0x2c2: -> CreateObject(\"some_user/foobar_20160304.csv\") (1.93310676s): OK \r\nsshd: Received disconnect from 10.60.3.1: 11: disconnected by user#015\r\nsshd: pam_unix(sshd:session): session closed for user some_user\r\nsshd: Accepted password for some_user from 10.240.0.16 port 50542 ssh2#015\r\nsshd: pam_unix(sshd:session): session opened for user some_user by (uid=0)\r\nsshd: pam_env(sshd:session): Unable to open env file: /etc/default/locale: No such file or directory\r\ngcsfuse: gcs: Req            0x2c3: <- StatObject(\"some_user/other_data_20160304.csv/\")\r\ngcsfuse: gcs: Req            0x2c4: <- StatObject(\"some_user/other_data_20160304.csv\")\r\ngcsfuse: gcs: Req            0x2c3: -> StatObject(\"some_user/other_data_20160304.csv/\") (26.681731ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound\r\ngcsfuse: gcs: Req            0x2c4: -> StatObject(\"some_user/other_data_20160304.csv\") (59.193025ms): OK\r\ngcsfuse: panic: interface conversion: inode.Inode is nil, not *inode.FileInode\r\ngcsfuse: \r\ngcsfuse: goroutine 32640 [running]:\r\ngcsfuse: panic(0x8f6200, 0xc8200d5a80)\r\ngcsfuse: #011/home/jacobsa/clients/go/src/runtime/panic.go:464 +0x3e6\r\ngcsfuse: github.com/googlecloudplatform/gcsfuse/internal/fs.(*fileSystem).OpenFile(0xc8204f6300, 0x7efd8bd17c60, 0xc820a06060, 0xc820c659a0, 0x0, 0x0)\r\ngcsfuse: #011/tmp/build_gcsfuse_gopath620360990/src/github.com/googlecloudplatform/gcsfuse/internal/fs/fs.go:1471 +0x1d2\r\ngcsfuse: github.com/googlecloudplatform/gcsfuse/vendor/github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).handleOp(0xc82044ca80, 0xc8201938c0, 0x7efd8bd17c60, 0xc820a06060, 0x7f5c80, 0xc820c659a0)\r\ngcsfuse: #011/tmp/build_gcsfuse_gopath620360990/src/github.com/googlecloudplatform/gcsfuse/vendor/github.com/jacobsa/fuse/fuseutil/file_system.go:170 +0x9d2\r\ngcsfuse: created by github.com/googlecloudplatform/gcsfuse/vendor/github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).ServeOps\r\ngcsfuse: #011/tmp/build_gcsfuse_gopath620360990/src/github.com/googlecloudplatform/gcsfuse/vendor/github.com/jacobsa/fuse/fuseutil/file_system.go:108 +0x18f\r\nsshd: Received disconnect from 10.240.0.16: 11: disconnected by user#015\r\nsshd: pam_unix(sshd:session): session closed for user some_user\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/comments/193826015","html_url":"https://github.com/GoogleCloudPlatform/gcsfuse/issues/164#issuecomment-193826015","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/164","id":193826015,"user":{"login":"joshk0","id":5368926,"avatar_url":"https://avatars.githubusercontent.com/u/5368926?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk0","html_url":"https://github.com/joshk0","followers_url":"https://api.github.com/users/joshk0/followers","following_url":"https://api.github.com/users/joshk0/following{/other_user}","gists_url":"https://api.github.com/users/joshk0/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk0/subscriptions","organizations_url":"https://api.github.com/users/joshk0/orgs","repos_url":"https://api.github.com/users/joshk0/repos","events_url":"https://api.github.com/users/joshk0/events{/privacy}","received_events_url":"https://api.github.com/users/joshk0/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T15:33:52Z","updated_at":"2016-03-08T15:33:52Z","body":"Cool. --debug_invariants isn't great for us if it'll crash more often and be slower. The performance hit is also a concern because this is used for a customer facing requirement. Will --debug_fuse significantly impact performance?"}}