Skip to content

Fixed possible deadlock after cleaning up lambda server#355

Open
bridgetwu33 wants to merge 3 commits intoopen-lambda:mainfrom
bridgetwu33:fix/lambda-deadlock
Open

Fixed possible deadlock after cleaning up lambda server#355
bridgetwu33 wants to merge 3 commits intoopen-lambda:mainfrom
bridgetwu33:fix/lambda-deadlock

Conversation

@bridgetwu33
Copy link
Contributor

Originally, main would not return nil on success. During server cleanup, we acquire a lock and never unlock it to stop accepting new requests.

Since main now returns nil on success, we now unlock after killing sandbox and zygotes. Any requests to the lambda server now check if the lambda server is closed.

Copy link
Member

@tylerharter tylerharter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

// components represent run[0]/<name_of_sandbox>[1]/<extra_things>...
// ergo we want [1] for name of sandbox
urlParts := getURLComponents(r)
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? When we do f.Invoke, isn't it possible the user code might want to use a different content type (e.g., json)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants