fisxoj / cl-aws-lambda Goto Github PK
View Code? Open in Web Editor NEWAn implementation of the AWS lambda runtime for common lisp... :cry: lambdas.
An implementation of the AWS lambda runtime for common lisp... :cry: lambdas.
Not entirely sure what causes this. Seemed like it got better when I added the chdir
call to set the directory to the lambda runtime dir. This issue is to track the problem and collect data.
Update 5-3-2019:
I believe this is related to the lambda runtime 'freezing' the process and 'thawing' it out. Some state is lost and it seems like usocket chokes on a file descriptor that isn't available anymore (or something like that, note the reference to file descriptor 3 in the backtrace below).
A cloudwatch log of the problem:
START RequestId: bb3f8e16-f7d9-4060-a1fb-e8ba316aa2e0 Version: $LATEST
Unhandled DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN in thread #<SB-THREAD:THREAD "main thread" RUNNING
{10005905B3}>:
An HTTP request to "http://127.0.0.1:9001/2018-06-01/runtime/init/error" returned 403 forbidden.
{
"errorMessage": "Transition from STATE_INVOKE_NEXT to STATE_INIT_ERROR is not allowed.",
"errorType": "InvalidStateTransition"
}
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005905B3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN {1003550CA3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN {1003550CA3}>)
2: (INVOKE-DEBUGGER #<DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN {1003550CA3}>)
3: (UIOP/IMAGE:HANDLE-FATAL-CONDITION #<DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN {1003550CA3}>)
4: (SB-KERNEL::%SIGNAL #<DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN {1003550CA3}>)
5: (ERROR DEXADOR.ERROR:HTTP-REQUEST-FORBIDDEN :BODY "{\"errorMessage\":\"Transition from STATE_INVOKE_NEXT to STATE_INIT_ERROR is not allowed.\",\"errorType\":\"InvalidStateTransition\"}
" :STATUS 403 :HEADERS #<HASH-TABLE :TEST EQUAL :COUNT 3 {1003430A73}> :URI #<QURI.URI.HTTP:URI-HTTP http://127.0.0.1:9001/2018-06-01/runtime/init/error> :METHOD :POST)
6: (DEXADOR.ERROR:HTTP-REQUEST-FAILED 403 :BODY "{\"errorMessage\":\"Transition from STATE_INVOKE_NEXT to STATE_INIT_ERROR is not allowed.\",\"errorType\":\"InvalidStateTransition\"}
" :HEADERS #<HASH-TABLE :TEST EQUAL :COUNT 3 {1003430A73}> :URI #<QURI.URI.HTTP:URI-HTTP http://127.0.0.1:9001/2018-06-01/runtime/init/error> :METHOD :POST)
7: (DEXADOR.BACKEND.USOCKET:REQUEST #<unavailable argument> :METHOD :POST :CONTENT "{\"errorMessage\":\"Uncaught error signaled during initialization:\\n Syscall poll(2) failed: Operation not permitted\\n\\n\",\"errorType\":\"UNCAUGHT-ERROR\"}")
8: ((FLET "H1" :IN CL-AWS-LAMBDA/RUNTIME:MAIN) #<SIMPLE-ERROR "Syscall poll(2) failed: ~A" {10031A1D83}>)
9: (SB-KERNEL::%SIGNAL #<SIMPLE-ERROR "Syscall poll(2) failed: ~A" {10031A1D83}>)
10: (ERROR "Syscall poll(2) failed: ~A" "Operation not permitted")
11: (SB-UNIX:UNIX-SIMPLE-POLL 3 :INPUT -1)
12: (SB-SYS:WAIT-UNTIL-FD-USABLE 3 :INPUT NIL NIL)
13: (SB-IMPL::REFILL-INPUT-BUFFER #<SB-SYS:FD-STREAM for "socket 127.0.0.1:37728, peer: 127.0.0.1:9001" {100319BCC3}>)
14: (SB-IMPL::INPUT-UNSIGNED-8BIT-BYTE #<SB-SYS:FD-STREAM for "socket 127.0.0.1:37728, peer: 127.0.0.1:9001" {100319BCC3}> NIL NIL)
15: (READ-BYTE #<SB-SYS:FD-STREAM for "socket 127.0.0.1:37728, peer: 127.0.0.1:9001" {100319BCC3}> NIL NIL)
16: (DEXADOR.BACKEND.USOCKET::READ-UNTIL-CRLF*2 #<SB-SYS:FD-STREAM for "socket 127.0.0.1:37728, peer: 127.0.0.1:9001" {100319BCC3}>)
17: (DEXADOR.BACKEND.USOCKET::READ-RESPONSE #<SB-SYS:FD-STREAM for "socket 127.0.0.1:37728, peer: 127.0.0.1:9001" {100319BCC3}> T NIL T)
18: (DEXADOR.BACKEND.USOCKET:REQUEST #<unavailable argument> :METHOD :GET)
19: (CL-AWS-LAMBDA/RUNTIME-INTERFACE:NEXT-INVOCATION)
20: (CL-AWS-LAMBDA/RUNTIME:MAIN)
21: ((LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE))
22: (UIOP/IMAGE:CALL-WITH-FATAL-CONDITION-HANDLER #<CLOSURE (LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE) {1002DBFA6B}>)
23: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
24: ((FLET "WITHOUT-INTERRUPTS-BODY-7" :IN SAVE-LISP-AND-DIE))
25: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
unhandled condition in --disable-debugger mode, quitting
END RequestId: bb3f8e16-f7d9-4060-a1fb-e8ba316aa2e0
REPORT RequestId: bb3f8e16-f7d9-4060-a1fb-e8ba316aa2e0 Init Duration: 341.04 ms Duration: 1313.80 ms Billed Duration: 1700 ms Memory Size: 128 MB Max Memory Used: 104 MB
It would be nice to have an idiomatic way of allowing errors to bubble up to the runtime. Probably worth researching a bit how others handle this.
eg.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.