-
Notifications
You must be signed in to change notification settings - Fork 328
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
panic: "Unknown opcode 2016" - only on GCP (GKE) #276
Comments
Hi! Looks like there are two things happening here: (1) The kernel sends opcode 2016, which does not exist in the mainline FUSE protocol. What kernel version are you running ( (2) go-fuse crashes on the unknown opcode. Crash is here Line 220 in 161a164
This will be fixed. |
On unknown opcodes, r.handler is nil and r.status is ENOSYS. Reverse the order and only look at r.handler when status == OK. Fixes hanwen#276
Can you try this patch? |
that is really odd. Can you post a dump that uses --debug ? |
I work at google, but never used GKE. I would be interested in a repro scenario, but I need more details. |
(especially a debug dump after the fix that rfjakob proposed.) |
This fix actually worked for me as long as I didn't have debug turned on. I created a PR: #27 that'll fix debug mode as well. There's just a few nil checks that were needed on InputDebug() and OutputDebug(). Let me know what you think. I'll come back with the steps to reproduce in a bit as well. It is a little concerning that the 2016 op code is even coming in, right? |
yes, I can't make sense of 2016, and would be interested to see if the other fields are garbage too. |
I printed them out and everything else seemed to be OK. I did have one implementation question though. I noticed in types.go |
oversight. cc423d1 |
Ryan, I double checked internally, and nobody had any sensible explanation for seeing '2016'. Could you provide a reproduction scenario, so I can file a proper bug report? Thanks! |
Definitely. I'm working on it. I'm trying to put together the easiest
repoduction steps as possible. I'll get back to you soon.
…On Mon, Apr 1, 2019 at 2:08 AM Han-Wen Nienhuys ***@***.***> wrote:
Ryan, I double checked internally, and nobody had any sensible explanation
for seeing '2016'. Could you provide a reproduction scenario, so I can file
a proper bug report?
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#276 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABo7cschrVAiINejmYK-yHVZqFkBF1-Uks5vccx9gaJpZM4cM58i>
.
|
any news? |
ping? @ryanlamore |
So sorry for the lack of response. It's been a tough last two weeks. I'm
going to get back to this ASAP. I promise. Hopefully by the end of the
week.
…On Mon, Apr 1, 2019 at 2:05 AM Han-Wen Nienhuys ***@***.***> wrote:
Reopened #276 <#276>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#276 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABo7cmLMZv57484RgLdJSW1jGfsQCifOks5vccvGgaJpZM4cM58i>
.
|
I just got
|
Where's the kernel source for this? |
when did this happen? Near initialization of the FS, or during normal use? 2016 is 0x7e0, ie. 1111110000 binary. Maybe a bitmask? |
Thanks for the link. The rest was easy:
|
@ryanlamore I think we don't need repro steps anymore ;) |
origin: https://android-review.googlesource.com/c/kernel/common/+/219870 looks like something that might handle case-insensitive paths. Regardless, aside from the panic, there is nothing to do here. (I think we should not support this opcode for now.) |
So the patch adding outlier opcode 2016 was merged for 2016. Classy. For posterity, my crash was when log
Recompiling my binary with |
Go-FUSE has been trailing the kernel, and the kernel (usually) is careful to only send opcodes that are recognized. However, on GKE (GCP) the undefined opcode 2016 has been seen, leading to a crash. Fixes hanwen#276.
TL;DR
Getting this while running examples/loopback in GKE:
`$ fusermount -u mount
$ ./main mount data&
[1] 4469
$ Mounted!
cat data/test.txt
hi
$ cat mount/test.txt
03:44:30.074840 Unknown opcode 2016
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4f21cc]
goroutine 1 [running]:
github.com/hanwen/go-fuse/fuse.(*request).serializeHeader(0xc0000c6000, 0x0, 0xc00007dc60, 0xc00007dc68, 0x56b620)
/home/rlamore/dev/git/other/go-fuse/fuse/request.go:220 +0x1c
github.com/hanwen/go-fuse/fuse.(*Server).write(0xc0000b6000, 0xc0000c6000, 0x0)
/home/rlamore/dev/git/other/go-fuse/fuse/server.go:494 +0x7f
github.com/hanwen/go-fuse/fuse.(*Server).handleRequest(0xc0000b6000, 0xc0000c6000, 0xc0000c6000)
/home/rlamore/dev/git/other/go-fuse/fuse/server.go:462 +0xb3
github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc0000b6000, 0x0)
/home/rlamore/dev/git/other/go-fuse/fuse/server.go:431 +0x18f
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc0000b6000)
/home/rlamore/dev/git/other/go-fuse/fuse/server.go:359 +0x6d
main.main()
/home/rlamore/dev/git/other/go-fuse/example/loopback/main.go:112 +0x678
cat: mount/test.txt: Transport endpoint is not connected
cat: mount/test.txt: Transport endpoint is not connected
[1]+ Exit 2 ./main mount data
`
I've been using go-fuse for years now and it's been an extremely valuable and stable for me. So thank you for that! I'm working in GKE and can't get it to work. The container has all the correct permissions. I've used libfuse and jacobsa libraries and they appear to work without any issues. I've tried with go 1.9 and go 11 and it makes no difference. I realize this might be hard for you to reproduce unless you are setup in GKE. Let me know if there's any more information I can provide. I'm working to try to pinpoint the issue as well. I could try to provide instructions on how to reproduce with a free GKE account if that would be beneficial as well.
The text was updated successfully, but these errors were encountered: