[Libwebsockets] Upgraded from 3.2 to v4.2.0 and getting an error
andy at warmcat.com
Tue Apr 20 17:07:02 CEST 2021
On 4/20/21 12:50 PM, Dave Horton wrote:
> I am running on an AWS EC2 instance running debian buster, would that account for this behavior?
Not the buster part, netlink is a user-accessible thing on buster generally.
It might be that AWS kernel won't let you touch AF_NETLINK as a user...
unless they filter it, it will contain the true info about all the
interfaces on the server. The might have decided it's safer to just
deny access to it.
Its main use is optimizing against dynamic networking changes, that's
not what you're normally getting from AWS.
I pushed a patch that lets this fail more gracefully if it can't bind
instead of just refusing to start.
> I recompiled with that flag, and it seems to work better now, but I am seeing this logging now (below, with a read error) when I try to send data over the socket, and the socket appears to not be in a writable state frequently, as I notice my sending process is having to wait and buffer a lot of data.
> 2021-04-20 11:46:30.085950 [NOTICE] lws_glue.cpp:287 ++ [wsicli|0|WS/h1/test-apps.jambonz.us] (1)
> 2021-04-20 11:46:30.125962 [NOTICE] lws_glue.cpp:287 rops_handle_POLLIN_pipe: eventfd read 7 bailed errno 11
> 2021-04-20 11:46:30.125962 [NOTICE] lws_glue.cpp:287 -- [wsi|0|pipe] (0) 21.162s
The error you're showing is about eventfd instead of pipe, that's
another thing that was introduced a long while ago and not made any
trouble until this. Lws uses eventfd if it sees it's available at
buildtime, if it isn't, it uses pipe2().
I pushed a patch that adds LWS_WITHOUT_EVENTFD so you can force it to
use pipe2() and hopefully avoid whatever that is. If you don't delete
CMakeCache.txt, you'll have to manually set this to equal empty
//Have function eventfd_read
More information about the Libwebsockets