dongren9966 2019-02-13 18:48
浏览 47

在AWS Lambda Function中调试外部软件包

Running aws sam locally and debugging a lambda function that calls an outside package/method. For some reason any debug messages I put in the external package aren't being called. Wondering why that is the case. Any one else run into this?

{
  "errorMessage": "runtime error: invalid memory address or nil pointer dereference",
  "errorType": "errorString",
  "stackTrace": [
    {
      "path": "github.com/aws/aws-lambda-go@v1.6.0/lambda/function.go",
      "line": 27,
      "label": "(*Function).Invoke.func1"
    },
    {
      "path": "runtime/asm_amd64.s",
      "line": 522,
      "label": "call32"
    },
    {
      "path": "runtime/panic.go",
      "line": 513,
      "label": "gopanic"
    },
    {
      "path": "runtime/panic.go",
      "line": 82,
      "label": "panicmem"
    },
    {
      "path": "runtime/signal_unix.go",
      "line": 390,
      "label": "sigpanic"
    },
    {
      "path": "go.uber.org/zap@v1.9.1/logger.go",
      "line": 264,
      "label": "(*Logger).check"
    },
    {
      "path": "go.uber.org/zap@v1.9.1/logger.go",
      "line": 186,
      "label": "(*Logger).Info"
    },
    {
      "path": "github.com/goop/service-wms-snoop/transferorders/handlers.go",
      "line": 76,
      "label": "TransferOrdersPublishHandler"
    },
    {
      "path": "runtime/asm_amd64.s",
      "line": 526,
      "label": "call512"
    },
    {
      "path": "reflect/value.go",
      "line": 447,
      "label": "Value.call"
    },
    {
      "path": "reflect/value.go",
      "line": 308,
      "label": "Value.Call"
    },
    {
      "path": "github.com/aws/aws-lambda-go@v1.6.0/lambda/handler.go",
      "line": 111,
      "label": "newHandler.func1"
    },
    {
      "path": "github.com/aws/aws-lambda-go@v1.6.0/lambda/handler.go",
      "line": 22,
      "label": "lambdaHandler.Invoke"
    },
    {
      "path": "github.com/aws/aws-lambda-go@v1.6.0/lambda/function.go",
      "line": 59,
      "label": "(*Function).Invoke"
    },
    {
      "path": "runtime/asm_amd64.s",
      "line": 523,
      "label": "call64"
    },
    {
      "path": "reflect/value.go",
      "line": 447,
      "label": "Value.call"
    },
    {
      "path": "reflect/value.go",
      "line": 308,
      "label": "Value.Call"
    },
    {
      "path": "net/rpc/server.go",
      "line": 384,
      "label": "(*service).call"
    },
    {
      "path": "runtime/asm_amd64.s",
      "line": 1333,
      "label": "goexit"
    }
  ]
}

The above is the stackTrace. I traced through the handler to find out that it's crashing within the call to an external package/method.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 netty整合springboot之后自动重连失效
    • ¥15 悬赏!微信开发者工具报错,求帮改
    • ¥20 wireshark抓不到vlan
    • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
    • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
    • ¥15 stata安慰剂检验作图但是真实值不出现在图上
    • ¥15 c程序不知道为什么得不到结果
    • ¥40 复杂的限制性的商函数处理
    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效