AWL Lambda CGO不确定SIGILL:非法指令

时间:2018-09-09 11:55:16

标签: amazon-web-services go aws-lambda cgo

我试图用golang和cgo测试AWS lambda函数。我在Amazon Linux AMI 2018.03.0(HVM)上编译了所有内容,并附加了所有必需的库。当我运行时,它看起来像lambda函数是不确定的。有时它工作正常,有时我在下面附加一个异常。看起来lambda具有两个不同的环境(体系结构)。当它正常工作时,lambda会正确响应每个查询,直到将死或我将部署一个新版本。相同的二进制文件现在可以正常工作,半小时内无法工作。

SIGILL: illegal instruction
PC=0xb94571 m=10 sigcode=2

goroutine 0 [idle]:
runtime: unknown pc 0xb94571
stack: frame={sp:0x7f8957ffcef0, fp:0x0} stack=[0x7f89577fd830,0x7f8957ffd430)
00007f8957ffcdf0: 00007f8950000078 00007f8968e64de2 
00007f8957ffce00: 0000000800000002 0000000000001000 
00007f8957ffce10: 3ff0000000000000 0000000000000000 
00007f8957ffce20: 0000000100000000 0000000000000001 
00007f8957ffce30: 0000000100000002 0000000000000100 
00007f8957ffce40: 0000000000000000 00000000014351f8 
00007f8957ffce50: 00000000000000fa 00007f8950000078 
00007f8957ffce60: 00007f8950000020 000000000002d97e 
00007f8957ffce70: 0000000000002710 000000000002d990 
00007f8957ffce80: 00007f8950000078 00007f8968e65ba5 
00007f8957ffce90: 000000000002d97e 00007f896c05b5c4 
00007f8957ffcea0: 0000000000000b66 00007f89693c3678 
00007f8957ffceb0: 0000000000000005 000000000000000b 
00007f8957ffcec0: 000000000f71e367 00007f896c05bcfb 
00007f8957ffced0: 0000007c0000009b 00007f8957ffcf10 
00007f8957ffcee0: 00007f89693c30ec 00007f89693c3c48 
00007f8957ffcef0: <00007f8957ffd020 00007f8957ffd010 
00007f8957ffcf00: d04e2b6900000027 eeba4bc401709342 
00007f8957ffcf10: 0000000000000000 3fdfdf19b3eb7010 
00007f8957ffcf20: 00000000000005e2 00007f8964663010 
00007f8957ffcf30: 00000000000000f8 00000000000001f6 
00007f8957ffcf40: 00000000000001f3 00000000000002ee 
00007f8957ffcf50: 0000000000000000 00007f896c107010 
00007f8957ffcf60: 0000000000000000 bfdfdf19b3eb7010 
00007f8957ffcf70: 00007f896c26aca8 00007f896c2754a8 
00007f8957ffcf80: 00007f896c275150 00007f896c05bfdf 
00007f8957ffcf90: 00000000000000f9 00007f896c26aca8 
00007f8957ffcfa0: 0000000000000005 0000000000000000 
00007f8957ffcfb0: 00007f8900000001 00007f896c275150 
00007f8957ffcfc0: 00007f8957ffd0f0 00007f8957ffd0e0 
00007f8957ffcfd0: 00007f8900000029 0000000000b7652d 
00007f8957ffcfe0: 0000000000000000 00007f896c2754a8 
runtime: unknown pc 0xb94571
stack: frame={sp:0x7f8957ffcef0, fp:0x0} stack=[0x7f89577fd830,0x7f8957ffd430)
00007f8957ffcdf0: 00007f8950000078 00007f8968e64de2 
00007f8957ffce00: 0000000800000002 0000000000001000 
00007f8957ffce10: 3ff0000000000000 0000000000000000 
00007f8957ffce20: 0000000100000000 0000000000000001 
00007f8957ffce30: 0000000100000002 0000000000000100 
00007f8957ffce40: 0000000000000000 00000000014351f8 
00007f8957ffce50: 00000000000000fa 00007f8950000078 
00007f8957ffce60: 00007f8950000020 000000000002d97e 
00007f8957ffce70: 0000000000002710 000000000002d990 
00007f8957ffce80: 00007f8950000078 00007f8968e65ba5 
00007f8957ffce90: 000000000002d97e 00007f896c05b5c4 
00007f8957ffcea0: 0000000000000b66 00007f89693c3678 
00007f8957ffceb0: 0000000000000005 000000000000000b 
00007f8957ffcec0: 000000000f71e367 00007f896c05bcfb 
00007f8957ffced0: 0000007c0000009b 00007f8957ffcf10 
00007f8957ffcee0: 00007f89693c30ec 00007f89693c3c48 
00007f8957ffcef0: <00007f8957ffd020 00007f8957ffd010 
00007f8957ffcf00: d04e2b6900000027 eeba4bc401709342 
00007f8957ffcf10: 0000000000000000 3fdfdf19b3eb7010 
00007f8957ffcf20: 00000000000005e2 00007f8964663010 
00007f8957ffcf30: 00000000000000f8 00000000000001f6 
00007f8957ffcf40: 00000000000001f3 00000000000002ee 
00007f8957ffcf50: 0000000000000000 00007f896c107010 
00007f8957ffcf60: 0000000000000000 bfdfdf19b3eb7010 
00007f8957ffcf70: 00007f896c26aca8 00007f896c2754a8 
00007f8957ffcf80: 00007f896c275150 00007f896c05bfdf 
00007f8957ffcf90: 00000000000000f9 00007f896c26aca8 
00007f8957ffcfa0: 0000000000000005 0000000000000000 
00007f8957ffcfb0: 00007f8900000001 00007f896c275150 
00007f8957ffcfc0: 00007f8957ffd0f0 00007f8957ffd0e0 
00007f8957ffcfd0: 00007f8900000029 0000000000b7652d 
00007f8957ffcfe0: 0000000000000000 00007f896c2754a8 

goroutine 12 [syscall]:
runtime.cgocall(0xb20bc0, 0xc420144af0, 0x240)
/usr/local/go/src/runtime/cgocall.go:128 +0x64 fp=0xc420144ab0 sp=0xc420144a78 pc=0x4b7c84
github.com/app/vectorization._Cfunc_GetFaceRectangles(0xc420413680, 0x7f89500008c0, 0xc, 0x0)
_cgo_gotypes.go:99 +0x4e fp=0xc420144af0 sp=0xc420144ab0 pc=0xb1df8e
github.com/app/vectorization.GetFaceBoundingRectangles(0xc420402f40, 0x32, 0xc40000000c, 0x0, 0x0, 0x0, 0x0, 0x0)
...

0 个答案:

没有答案