theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
270 stars 48 forks source link

bootstrap: c_poll: permission denied (Operation not permitted) #43

Closed Unisay closed 5 years ago

Unisay commented 5 years ago

First of all I want to thank authors for the runtime and doc-site: great job, thank you!

I've deployed runtime https://github.com/Unisay/haskell-aws-lambda-template and able to successfully invoke my function (Yay!) but I am worried about the following error message in the logs:

__bootstrap: c_poll: permission denied (Operation not permitted)__

sls invoke -f haskell-aws-lambda -l -d '{ "personName": "Chuck Norris", "personAge": 79 }'                               2533ms  Fri 23 Aug 17:51:52 2019
{
    "personAge": 79,
    "personName": "Chuck Norris"
}
--------------------------------------------------------------------
START RequestId: 5c64dd18-ef19-43a9-b241-1e1047bdc290 Version: $LATEST
bootstrap: c_poll: permission denied (Operation not permitted)
END RequestId: 5c64dd18-ef19-43a9-b241-1e1047bdc290
REPORT RequestId: 5c64dd18-ef19-43a9-b241-1e1047bdc290  Init Duration: 58.85 ms Duration: 28.64 ms      Billed Duration: 100 ms         Memory Size: 1024 MB    Max Memory Used: 47 MB

Do you have an idea of what causes it, and what are the consequences?

Thank you.

mbj commented 5 years ago

I've tried to find its origin and found it in the GHC RTS. It appears that when GHC is starting to boot the IO manager it iteratively walks through a number of possible backend options. Eventually trying c_poll which appears to not be supported by the environment lambda functions are invoked within.

AFAIK, eventually it settles with epoll. In summary I'd argue the message is harmless. But my knowlege of the GHC RTS is slim, so this answer is far not authoritative.

Unisay commented 5 years ago

@mbj appreciate you sharing your findings, I do see this error periodically, good to know that it is harmless (not 100%)

mbj commented 5 years ago

@Unisay I assume you see this errors periodically as the RTS gets periodically started after the lambda container outlived its idle period.

NickSeagull commented 5 years ago

Yes, as @mbj noted, the error is harmless (or at least, it should be), I'm gonna add a note to the docs, so it doesn't get anyone else by surprise. Thank you a lot for pointing this out!! 🙏 😄