[Libwebsockets] assert in client connection
vijay.khurdiya at gmail.com
Mon Aug 21 14:26:35 CEST 2017
- are you using lws from multiple threads?
I am doing lws_client_connect_via_info() in separate thread. I have taken
this decision because client connect will take long time & I need to keep
serving in service loop for server.
- does this problem exist in the test client?
I think so not because test client is doing client connect when not in
- try setting LWS_MAX_SMP=1 in cmake (and if using multiple service
I have tried but problem persist.
On Thu, Aug 17, 2017 at 5:23 AM, Andy Green <andy at warmcat.com> wrote:
> On 08/17/2017 12:42 AM, Vijay Khurdiya wrote:
>> I am getting one assert when my client trying to connect with server.
>> Could you please give me hint what was wrong which cause assert.
>> Please find below snapshot of lws log.
>> [2017/08/14 17:58:41:0070] NOTICE: wsi 0x5aaae0: TIMEDOUT WAITING on 25
>> (did hdr 0, ah 0x5cb540, wl 0, pfd events 0) 1502713721 vs 1502713720
>> [2017/08/14 17:58:41:0075] NOTICE: lws_header_table_detach: wsi 0x5aaae0:
>> ah held 11s, ah.rxpos -1, ah.rxlen -1, mode/state 32 4,wsi->more_rx_waiting
>> [2017/08/14 17:58:50:5725] ERR: getaddrinfo failed
>> [2017/08/14 17:58:50:5729] NOTICE: lws_header_table_detach: wsi 0x5aaae0:
>> ah held 1502713596s, ah.rxpos -1, ah.rxlen -1, mode/state 32
>> 4,wsi->more_rx_waiting 0
>> /libwebsockets/2.0.3-r0/git/lib/parsers.c:313: lws_header_table_detach:
>> Assertion `pt->ah_count_in_use > 0' failed.
> The assert is saying there's a mismatch in the count of the number of ah
> in use.
> However I haven't seen that even on v2.0, and the ah counting is all done
> in internal apis in one place.
> - does this still exist in current master (or v2.3-stable which is nearly
> identical atm)?
> - are you using lws from multiple threads?
> - does this problem exist in the test client?
> - try setting LWS_MAX_SMP=1 in cmake (and if using multiple service
> threads, don't)
> I eyeballed the 2.0.3 code but it cleans up after getaddrinfo failure
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets