Skip to content
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

fatal error: runtime: name offset out of range #7

Closed
fiatjaf opened this issue May 13, 2022 · 4 comments
Closed

fatal error: runtime: name offset out of range #7

fiatjaf opened this issue May 13, 2022 · 4 comments

Comments

@fiatjaf
Copy link

fiatjaf commented May 13, 2022

I'm getting this amazing error on go version go1.18.1 linux/amd64:

runtime: nameOff 0x1276120 out of range 0x1029000 - 0x17d770e
fatal error: runtime: name offset out of range
goroutine 57 [running]:
runtime.throw({0x1317f5a?, 0xc0001aec20?})
        /usr/lib/go/src/runtime/panic.go:992 +0x71 fp=0xc00060ca70 sp=0xc00060ca40 pc=0x435751
runtime.resolveNameOff(0x11c5e60?, 0x1276120)
        /usr/lib/go/src/runtime/type.go:198 +0x265 fp=0xc00060cac8 sp=0xc00060ca70 pc=0x45ba25
reflect.resolveNameOff(0x12ccb80?, 0x179e620?)
        /usr/lib/go/src/runtime/runtime1.go:498 +0x19 fp=0xc00060cae8 sp=0xc00060cac8 pc=0x460ed9
reflect.(*rtype).nameOff(...)
        /usr/lib/go/src/reflect/type.go:729
reflect.(*rtype).String(0x179e620)
        /usr/lib/go/src/reflect/type.go:799 +0x25 fp=0xc00060cb08 sp=0xc00060cae8 pc=0x4af745
reflect.(*rtype).ptrTo(0x179e620)
        /usr/lib/go/src/reflect/type.go:1456 +0x65 fp=0xc00060cb98 sp=0xc00060cb08 pc=0x4b29e5
reflect.PointerTo(...)
        /usr/lib/go/src/reflect/type.go:1442
reflect.PtrTo(...)
        /usr/lib/go/src/reflect/type.go:1437
github.com/wI2L/jettison.newMarshalerTypeInstr({0x17b0fe0, 0x179e620}, 0x0)
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/instruction.go:139 +0x58 fp=0xc00060cbd0 sp=0xc00060cb98 pc=0x9a2638
github.com/wI2L/jettison.newInstruction({0x17b0fe0?, 0x179e620}, 0x20?, 0xe6?)
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/instruction.go:94 +0x52 fp=0xc00060cc08 sp=0xc00060cbd0 pc=0x9a21f2
github.com/wI2L/jettison.cachedInstr({0x17b0fe0?, 0x179e620})
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/instruction.go:45 +0x85 fp=0xc00060cc40 sp=0xc00060cc08 pc=0x9a1f85
github.com/wI2L/jettison.encodeInterface(0xc000022d00?, {0xc00037d000, 0xf, 0x1000}, {{0x17a6490, 0xc000040068}, {0x131a373, 0x23}, 0x5, 0xb1, ...})
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/encode.go:70 +0x87 fp=0xc00060ccd0 sp=0xc00060cc40 pc=0x99bec7
github.com/wI2L/jettison.encodeStruct(0xc0001e50e0, {0xc00037d000?, 0x99b885?, 0x2021b00?}, {{0x17a6490, 0xc000040068}, {0x131a373, 0x23}, 0x5, 0xb1, ...}, ...)
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/encode.go:244 +0x4f0 fp=0xc00060cdf0 sp=0xc00060ccd0 pc=0x99d1b0
github.com/wI2L/jettison.newStructFieldsInstr.func2(0x1346e501a90b46?, {0xc00037d000?, 0x7f2645981538?, 0x40?}, {{0x17a6490, 0xc000040068}, {0x131a373, 0x23}, 0x5, 0xb1, ...})
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/instruction.go:319 +0x65 fp=0xc00060ce78 sp=0xc00060cdf0 pc=0x9a3a25
github.com/wI2L/jettison.marshalJSON({0x12a17a0?, 0xc0001e50e0?}, {{0x17a6490, 0xc000040068}, {0x131a373, 0x23}, 0x5, 0xb1, 0x0, 0x0})
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/json.go:167 +0xd9 fp=0xc00060cf40 sp=0xc00060ce78 pc=0x9a5499
github.com/wI2L/jettison.MarshalOpts({0x12a17a0, 0xc0001e50e0}, {0xc00060d028, 0x4, 0xc0003cbc00?})
        /home/fiatjaf/comp/go/pkg/mod/github.com/w!i2!l/jettison@v0.7.4/json.go:142 +0x1a9 fp=0xc00060d000 sp=0xc00060cf40 pc=0x9a5289
github.com/lnbits/infinity/utils.JSONMarshal({0x12a17a0?, 0xc0001e50e0?})
        /home/fiatjaf/comp/infinity/utils/json.go:24 +0x6c fp=0xc00060d058 sp=0xc00060d000 pc=0x9ad2cc
github.com/lnbits/infinity/api/apiutils.SendJSON({0x17a57a8, 0xc00002e2a0}, {0x12a17a0?, 0xc0001e50e0?})
        /home/fiatjaf/comp/infinity/api/apiutils/jsonresponse.go:10 +0x33 fp=0xc00060d088 sp=0xc00060d058 pc=0xb7c733
github.com/lnbits/infinity/api.LnurlScan({0x17a57a8, 0xc00002e2a0}, 0xc0005ecb00)
        /home/fiatjaf/comp/infinity/api/wallet.go:347 +0x786 fp=0xc00060d5c8 sp=0xc00060d088 pc=0xf14ba6
net/http.HandlerFunc.ServeHTTP(0xc0003a28f0?, {0x17a57a8?, 0xc00002e2a0?}, 0xc0005ecb00?)
        /usr/lib/go/src/net/http/server.go:2084 +0x2f fp=0xc00060d5f0 sp=0xc00060d5c8 pc=0x6d8e6f
@fiatjaf
Copy link
Author

fiatjaf commented May 13, 2022

I can't reproduce this anywhere except in one VPS I'm using. Tried other VPS, tried my home desktop, the same procedure works fine in both.

@fiatjaf fiatjaf closed this as completed May 13, 2022
@wI2L
Copy link
Owner

wI2L commented May 13, 2022

Do you know which platform/os the VPS was running on?

@fiatjaf
Copy link
Author

fiatjaf commented May 14, 2022

Ubuntu 20.04.3 LTS

@fiatjaf
Copy link
Author

fiatjaf commented May 14, 2022

This is the codebase generating the error, just in case you wanna look: https://github.com/lnbits/infinity (but I'm not asking you to).

Here is the JSON function: https://github.com/lnbits/infinity/blob/5a135a3c9942841fc5d3e3a005d3767f1f674957/utils/json.go#L23-L30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants