Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Crashes with the latest shim version #5

Closed
cristim opened this issue Mar 3, 2017 · 7 comments
Closed

Crashes with the latest shim version #5

cristim opened this issue Mar 3, 2017 · 7 comments

Comments

@cristim
Copy link

cristim commented Mar 3, 2017

I used the latest example code and I'm getting this crash:


23:56:13
START RequestId: d10de6a0-ffa3-11e6-9a01-0108fefdc89d Version: $LATEST

23:56:13
panic: runtime error: invalid memory address or nil pointer dereference

23:56:13
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x7f01b6396db3]

23:56:13
goroutine 17 [running, locked to thread]:

23:56:13
github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy.(*Server).Handle(0xc420014ee0, 0xc420014f30, 0x2, 0x8, 0xc420072280, 0x0, 0xc4200c7940, 0x7f01bcad0e6c)

23:56:13
/go/src/github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy/server.go:87 +0x1c3

23:56:13
github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy.(*Server).Handle-fm(0xc420014f30, 0x2, 0x8, 0xc420072280, 0x0, 0x0, 0x0)

23:56:13
/tmp/handler.go:17 +0x54

23:56:13
reflect.Value.call(0x7f01b66445a0, 0x7f01b67dc440, 0x193, 0x7f01bcb90db8, 0x4, 0xc4200c7de0, 0x2, 0x2, 0xc4200bb680, 0x7f01bce59850, ...)

23:56:13
/usr/local/go/src/reflect/value.go:434 +0x921

23:56:13
reflect.Value.Call(0x7f01b66445a0, 0x7f01b67dc440, 0x193, 0xc4200c7de0, 0x2, 0x2, 0x0, 0x193, 0x13)

23:56:13
/usr/local/go/src/reflect/value.go:302 +0xa6

23:56:13
main.handle(0x7f01be09c054, 0x2161694, 0x20c5a94, 0xc400000008)

23:56:13
/tmp/src/runtime.go:127 +0x5ff

23:56:13
main._cgoexpwrap_7d7ac51857d8_handle(0x7f01be09c054, 0x2161694, 0x20c5a94, 0x0)

23:56:13
_/tmp/src/_obj/_cgo_gotypes.go:125 +0x74

23:56:13
END RequestId: d10de6a0-ffa3-11e6-9a01-0108fefdc89d

23:56:13
REPORT RequestId: d10de6a0-ffa3-11e6-9a01-0108fefdc89d	Duration: 30.44 ms	Billed Duration: 100 ms Memory Size: 1024 MB	Max Memory Used: 17 MB

23:56:13
RequestId: d10de6a0-ffa3-11e6-9a01-0108fefdc89d Process exited before completing request
@fsenart fsenart closed this as completed Mar 3, 2017
@ameech
Copy link

ameech commented May 17, 2017

@cristim were you able to figure out a fix for this?

@cristim
Copy link
Author

cristim commented May 18, 2017

@ameech I had this fixed with help from @fsenart, I just don't remember what was wrong there

@awsong
Copy link

awsong commented Aug 25, 2017

I'm having the exact same problem now. With latest shim and net. Wondering what the fix is.

@awsong
Copy link

awsong commented Aug 25, 2017

My error message:
 12:14:11 START RequestId: 9255bbdc-87fc-11e7-a281-9bd5720e6d21 Version: $LATEST  12:14:11 panic: runtime error: invalid memory address or nil pointer dereference  12:14:11 [signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x7fdc73396bf0]  12:14:11 goroutine 17 [running, locked to thread]:  12:14:11 github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy.(*Server).Handle(0xc4200ec840, 0xc42001a400, 0x36, 0x40, 0xc420068280, 0x0, 0xc4200bf958, 0x7fdc7956ed0c)  12:14:11 /public/development/go/src/github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy/server.go:115 +0xef0  12:14:11 github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy.(*Server).Handle-fm(0xc42001a400, 0x36, 0x40, 0xc420068280, 0x0, 0x0, 0x0) github.com/eawsy/aws-lambda-go-net/service/lambda/runtime/net/apigatewayproxy.(*Server).Handle-fm(0xc42001a400, 0x36, 0x40, 0xc420068280, 0x0, 0x0, 0x0)  12:14:11 /naz/public/development/lambda/handler.go:36 +0x54  12:14:11 reflect.Value.call(0x7fdc73644ae0, 0x7fdc737de440, 0x193, 0x7fdc7962f078, 0x4, 0xc4200bfe10, 0x2, 0x2, 0x7fdc798619c0, 0x7fdc79889368, ...)  12:14:11 /usr/local/go/src/reflect/value.go:434 +0x921  12:14:11 reflect.Value.Call(0x7fdc73644ae0, 0x7fdc737de440, 0x193, 0xc4200bfe10, 0x2, 0x2, 0xc4200682f8, 0x193, 0x7fdc79585b48)  12:14:11 /usr/local/go/src/reflect/value.go:302 +0xa6  12:14:11 main.handle(0x7fdc7a9fffb4, 0x129ec54, 0x129ef74, 0xc4200bfeb0, 0xc4200bfeb8, 0x0)  12:14:11 /build/src/runtime.go:140 +0x4e1  12:14:11 main._cgoexpwrap_dd780bcacc70_handle(0x7fdc7a9fffb4, 0x129ec54, 0x129ef74, 0x0, 0x0, 0x0)  12:14:11 _/build/src/_obj/_cgo_gotypes.go:127 +0x9a  12:14:11 END RequestId: 9255bbdc-87fc-11e7-a281-9bd5720e6d21  12:14:11 REPORT RequestId: 9255bbdc-87fc-11e7-a281-9bd5720e6d21 Duration: 14.04 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 22 MB  12:14:11 RequestId: 9255bbdc-87fc-11e7-a281-9bd5720e6d21 Process exited before completing request

@fsenart
Copy link
Contributor

fsenart commented Aug 25, 2017

@awsong can you please verify that you haven't more than 8 exported functions. This is a known limitations with Go 1.8. We will update the shim with the new Go 1.9 in the coming days.

@hasJerry
Copy link

hasJerry commented Sep 6, 2017

I'm getting the same result. Was able to run successfully with the base shim, moved to go-net to get APIGateway compatibility.

@fsenart
Copy link
Contributor

fsenart commented Sep 6, 2017

@hasJerry we've recently update the shim to go 1.9 and this kind of problem should not happen. If you encounter any problem after updating your docker image and your makefile please report.

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

No branches or pull requests

5 participants