You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Application Server may panic while running the JavaScript message decoder. This is obviously not the intended behavior but tracking the bug has proven to be non-trivial.
Run an uplink through the JavaScript message decoder.
Have a particularly bad day.
The AS panics and no recovers help it anymore.
What do you see now?
As part of the panic report, the following frames stand out:
1595501567843,runtime: unexpected return pc for go.thethings.network/lorawan-stack/v3/pkg/messageprocessors/javascript.(*host).Decode called from 0x0,ttes/ttes/267215b77e66421386fdaf295b67b1e0
I don't have a good reproduction for this, so no good fix for this.
Go 1.14 introduced some optimizations regarding defers . A follow up to these changes has been golang/go#37664, which describes an issue that looks like ours: a defer/recover chain, which we do have as part of the JavaScript message processor:
The (temporary) fix there was to disable optimizations, by compiling the binaries using -gcflags="all=-N". Note that we can make this part of goreleaser:
golang/go#37664 has been closed and fixed as part of go 1.14.1, and 3.8.7 has been compiled with go 1.14.5, which means that we are probably encountering another issue. But golang/go#35158 claims some remnants still exist, so I'm not sure if it's fully fixed - if we encounter this crash too often we may want to experiment with optimizations-disabled builds. prysmaticlabs/prysm#5131 (comment) is another reference.
How do you propose to test this?
This is a heisenbug. Unless we have a good reproduction system we cannot really test it reliably.
Can you do this yourself and submit a Pull Request?
Yes, when additional information becomes available (more crashes, more details from the Go team due to someone else encountering this).
The text was updated successfully, but these errors were encountered:
Summary
The Application Server may panic while running the JavaScript message decoder. This is obviously not the intended behavior but tracking the bug has proven to be non-trivial.
References https://github.com/TheThingsIndustries/lorawan-stack/issues/2262
Steps to Reproduce
What do you see now?
As part of the
panic
report, the following frames stand out:What do you want to see instead?
No panic, obviously.
Environment
Cloud Hosted,
3.8.7
How do you propose to implement this?
I don't have a good reproduction for this, so no good fix for this.
Go
1.14
introduced some optimizations regardingdefers
. A follow up to these changes has been golang/go#37664, which describes an issue that looks like ours: adefer
/recover
chain, which we do have as part of the JavaScript message processor:lorawan-stack/pkg/scripting/javascript/javascript.go
Lines 61 to 81 in f53fefc
(this sequence is used for execution time limits, and it's encouraged by
otto
- https://github.com/robertkrimen/otto#halting-problem)The (temporary) fix there was to disable optimizations, by compiling the binaries using
-gcflags="all=-N"
. Note that we can make this part ofgoreleaser
:golang/go#37664 has been closed and fixed as part of
go 1.14.1
, and3.8.7
has been compiled withgo 1.14.5
, which means that we are probably encountering another issue. But golang/go#35158 claims some remnants still exist, so I'm not sure if it's fully fixed - if we encounter this crash too often we may want to experiment with optimizations-disabled builds. prysmaticlabs/prysm#5131 (comment) is another reference.How do you propose to test this?
This is a heisenbug. Unless we have a good reproduction system we cannot really test it reliably.
Can you do this yourself and submit a Pull Request?
Yes, when additional information becomes available (more crashes, more details from the Go team due to someone else encountering this).
The text was updated successfully, but these errors were encountered: