akrabat opened a new issue #62: Panic with zip file URL: https://github.com/apache/incubator-openwhisk-runtime-go/issues/62 When uploading a zip file to the new PHP7.3 runtime which uses the action proxy I get a panic. The contents of the zip file are: ```php <?php function niam(array $args) { return [result => "it works"]; } ``` I'm uploading it using: ``` $ $OPENWHISK_HOME/tools/actionProxy/invoke.py init niam niam.zip ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) ``` I'm running the proxy using: `/bin/proxy -debug` and the output is: ``` root@e36df89dee22:/phpAction# /bin/proxy -debug 2018/12/01 22:04:20 OpenWhisk Go Proxy: starting 2018/12/01 22:04:25 compiler: /bin/compile 2018/12/01 22:04:25 init: decoding {"value": {"code": "UEsDBAoAAAAAAIGwgU0t9qVmSAAAAEgAAAAJABwAaW5kZXgucGhwVVQJAANRBQNcVAUDXHV4CwABBPUBAAAEFAAAADw/cGhwCmZ1bmN0aW9uIG5pYW0oYXJyYXkgJGFyZ3MpIHsKICAgIHJldHVybiBbcmVzdWx0ID0+ICJpdCB3b3JrcyJdOwp9ClBLAQIeAwoAAAAAAIGwgU0t9qVmSAAAAEgAAAAJABgAAAAAAAEAAAC0gQAAAABpbmRleC5waHBVVAUAA1EFA1x1eAsAAQT1AQAABBQAAABQSwUGAAAAAAEAAQBPAAAAiwAAAAAA", "binary": true, "main": "niam"}} 2018/12/01 22:04:25 it is binary code 2018/12/01 22:04:25 http: panic serving 172.17.0.1:42600: runtime error: slice bounds out of range goroutine 19 [running]: net/http.(*conn).serve.func1(0xc0000ae8c0) /home/travis/.gimme/versions/go1.11.2.linux.amd64/src/net/http/server.go:1746 +0xd0 panic(0x6aee00, 0x9324f0) /home/travis/.gimme/versions/go1.11.2.linux.amd64/src/runtime/panic.go:513 +0x1b9 github.com/apache/incubator-openwhisk-runtime-go/vendor/gopkg.in/h2non/filetype.v1/matchers.Xlsx(0xc00016c000, 0xf0, 0xf0, 0x671ef0) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/vendor/gopkg.in/h2non/filetype.v1/matchers/document.go:50 +0xd4 github.com/apache/incubator-openwhisk-runtime-go/vendor/gopkg.in/h2non/filetype.v1/matchers.NewMatcher.func1(0xc00016c000, 0xf0, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/vendor/gopkg.in/h2non/filetype.v1/matchers/matchers.go:23 +0x69 github.com/apache/incubator-openwhisk-runtime-go/vendor/gopkg.in/h2non/filetype%2ev1.Match(0xc00016c000, 0xf0, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/vendor/gopkg.in/h2non/filetype.v1/match.go:25 +0x106 github.com/apache/incubator-openwhisk-runtime-go/openwhisk.(*ActionProxy).ExtractAction(0xc0000ad450, 0xc0000a1cf0, 0x705368, 0x3, 0x140, 0x140, 0x3, 0x0) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/openwhisk/extractor.go:113 +0x23c github.com/apache/incubator-openwhisk-runtime-go/openwhisk.(*ActionProxy).ExtractAndCompile(0xc0000ad450, 0xc0000a1cf0, 0xc0001380b8, 0x4, 0xf0, 0xf0, 0x0, 0x0) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/openwhisk/initHandler.go:137 +0x75 github.com/apache/incubator-openwhisk-runtime-go/openwhisk.(*ActionProxy).initHandler(0xc0000ad450, 0x754a80, 0xc000148000, 0xc00012e000) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/openwhisk/initHandler.go:112 +0x405 github.com/apache/incubator-openwhisk-runtime-go/openwhisk.(*ActionProxy).ServeHTTP(0xc0000ad450, 0x754a80, 0xc000148000, 0xc00012e000) /home/travis/gopath/src/github.com/apache/incubator-openwhisk-runtime-go/openwhisk/actionProxy.go:110 +0x85 net/http.serverHandler.ServeHTTP(0xc00008b040, 0x754a80, 0xc000148000, 0xc00012e000) /home/travis/.gimme/versions/go1.11.2.linux.amd64/src/net/http/server.go:2741 +0xab net/http.(*conn).serve(0xc0000ae8c0, 0x754cc0, 0xc0000982c0) /home/travis/.gimme/versions/go1.11.2.linux.amd64/src/net/http/server.go:1847 +0x646 created by net/http.(*Server).Serve /home/travis/.gimme/versions/go1.11.2.linux.amd64/src/net/http/server.go:2851 +0x2f5 ``` Zip file attached. [niam.zip](https://github.com/apache/incubator-openwhisk-runtime-go/files/2636357/niam.zip)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services