[Libwebsockets] SegFault for Websocket Server on Multiple Network Interface

techi eth techieth at gmail.com
Mon Jul 10 11:57:17 CEST 2017


I have tried test as suggested by you now I don’t see segfault anymore
however I am not able to connect over server.
Could you please check attached test code & detaild lws log & give me hint
what is wrong in code.

Thanks for your input.

On Sat, Jul 8, 2017 at 4:28 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> On 07/08/2017 06:51 PM, techi eth wrote:
>
>> Thanks for your input.
>> Having two context is not right or technically complex ?
>>
>> I was running two server without SSL mode from past 1 month & it is
>> working fine with two context.
>>
>
> Well... if you want two contexts you better fix your segfault.  You're
> always free to do what you prefer (and I am free to ignore your problems
> with it).
>
> From:
>
>  - the POV SNI won't work sharing port 443, because the two vhosts you
> created by having two contexts don't know about each other
>
>  - the POV you only have one set of fds in your process, the context holds
> a lookup table for all of them
>
>  - the POV you only need to service (ie, wait in poll or epoll) for one
> set of fds, not have an idle context increase your service latency on
> handling service for an active context every time
>
> ...you should have one context and two vhosts.
>
> That's literally what the vhosts are for.  It's easy to do, and from lws
> perspective "the right thing".
>
> -Andy
>
> On Sat, Jul 8, 2017 at 3:59 PM, Andy Green <andy at warmcat.com <mailto:
>> andy at warmcat.com>> wrote:
>>
>>
>>
>>     On 07/08/2017 06:12 PM, techi eth wrote:
>>
>>         It is with two context.One context each for one network interface.
>>
>>
>>     I can suggest you don't do that.
>>
>>     Let's leave aside how I am supposed to guess what you have done to
>>     service both.
>>
>>     The network interface to bind to is an attribute of the vhost, not
>>     the context.
>>
>>     By default, for compatibility lws creates you one vhost called
>>     "default" when you create the context.
>>
>>     If you set the option bit LWS_SERVER_OPTION_EXPLICIT_VHOSTS when you
>>     create the context, creating the context does not create any vhosts.
>>
>>     Instead you can use the same lws_context_creation_info struct to
>>     create as many vhosts as you want and attach them to the context
>>     yourself, using
>>
>>     LWS_EXTERN LWS_VISIBLE struct lws_vhost *
>>     lws_create_vhost(struct lws_context *context,
>>                       struct lws_context_creation_info *info);
>>
>>     You can mostly re-use your existing info struct contents, changing
>>     .iface and .name to reflect the vhost hostname (ie, "warmcat.com
>>     <http://warmcat.com>" if people reached it by typing "warmcat.com
>>     <http://warmcat.com>" in their browser).  And changing the
>>     protocols, mounts etc according to what you want to be available.
>>
>>     Both can be on port 443, lws will use SNI to match the hostname the
>>     client had used to reach it to decide which vhost to give them.
>>
>>     Each vhost can be told to use different SSL certs and keys.  Lws
>>     will sort it out.
>>
>>     So... one context.  Two vhosts.
>>
>>     https://warmcat.com and https://libwebsockets.org are two vhosts on
>>     the same lws server using this method.
>>
>>     -Andy
>>
>>
>>
>>         On Sat, Jul 8, 2017 at 3:31 PM, Andy Green <andy at warmcat.com
>>         <mailto:andy at warmcat.com> <mailto:andy at warmcat.com
>>         <mailto:andy at warmcat.com>>> wrote:
>>
>>
>>
>>              On 07/08/2017 05:44 PM, techi eth wrote:
>>
>>                  OpenSSL version : 1.0.2h
>>
>>
>>              Supposedly the new OpenSSL init / destroy api was introduced
>> in
>>              1.0.2g, so it shouldn't be the problem.
>>
>>                  I have tried libwebsocket from master & i am getting same
>>                  error.I will do the setup to get the trace.
>>                  Do you confirm libwebsokcet works in above mentioned
>>         use case ?
>>
>>
>>              I have no idea what your use case looks like.
>>
>>              Two contexts?  One context?
>>
>>                  Is their any running sample then it would be good for
>>         me to test ?
>>
>>
>>              Find out the line of source and reason for the segfault.  "A
>>              segfault" by itself is like saying "an error" or "a
>>         problem", it can
>>              mean anything.  Related to lws, related to your code,
>>         something else...
>>
>>              -Andy
>>
>>
>>                  On Sat, Jul 8, 2017 at 2:51 PM, Andy Green
>>         <andy at warmcat.com <mailto:andy at warmcat.com>
>>                  <mailto:andy at warmcat.com <mailto:andy at warmcat.com>>
>>         <mailto:andy at warmcat.com <mailto:andy at warmcat.com>
>>
>>                  <mailto:andy at warmcat.com <mailto:andy at warmcat.com>>>>
>>
>>         wrote:
>>
>>
>>
>>                       On 07/08/2017 05:16 PM, techi eth wrote:
>>
>>                           I was facing segfault over below use case with
>>                  libwebsocket.
>>
>>
>>                       It's usually of zero use to hear there is a segfault
>>                  without getting
>>                       a backtrace.
>>
>>                           I have two network interface & i am trying to
>>         run SSL
>>                  server on
>>                           port 443 for each network interface.When i run
>>                  independently
>>                           each server by separate programme for each it
>>         works
>>                  great but
>>                           when i run both in same programme one is
>>         giving segfault.
>>
>>
>>                       Is this by any remote chance with two contexts?
>>
>>                       What version is your OpenSSL?
>>
>>                       -Andy
>>
>>                           Last line i am getting is (inserted SSL accept
>>         into
>>                  fds, trying
>>                           SSL_accept).
>>
>>                           Note : Same programme when i run without SSL
>>         it works
>>                  great.
>>
>>
>>
>>
>>                           _______________________________________________
>>                           Libwebsockets mailing list
>>         Libwebsockets at ml.libwebsockets.org
>>         <mailto:Libwebsockets at ml.libwebsockets.org>
>>                  <mailto:Libwebsockets at ml.libwebsockets.org
>>         <mailto:Libwebsockets at ml.libwebsockets.org>>
>>                           <mailto:Libwebsockets at ml.libwebsockets.org
>>         <mailto:Libwebsockets at ml.libwebsockets.org>
>>                  <mailto:Libwebsockets at ml.libwebsockets.org
>>         <mailto:Libwebsockets at ml.libwebsockets.org>>>
>>         https://libwebsockets.org/mailman/listinfo/libwebsockets
>>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>
>>                         <https://libwebsockets.org/mai
>> lman/listinfo/libwebsockets
>>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>>
>>                                         <https://libwebsockets.org/mai
>> lman/listinfo/libwebsockets
>>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>
>>                         <https://libwebsockets.org/mai
>> lman/listinfo/libwebsockets
>>         <https://libwebsockets.org/mailman/listinfo/libwebsockets>>>
>>
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170710/7441e476/attachment-0002.html>
-------------- next part --------------
[2017/07/10 15:13:45:6686] NOTICE: Initial logging level 2047
[2017/07/10 15:13:45:6696] NOTICE: Libwebsockets version: 2.2.0 unknown-build-hash
[2017/07/10 15:13:45:6698] NOTICE: IPV6 not compiled in
[2017/07/10 15:13:45:6700] NOTICE: libev support not compiled in
[2017/07/10 15:13:45:6702] NOTICE: libuv support not compiled in
[2017/07/10 15:13:45:6705] INFO:  LWS_DEF_HEADER_LEN    : 4096
[2017/07/10 15:13:45:6708] INFO:  LWS_MAX_PROTOCOLS     : 5
[2017/07/10 15:13:45:6709] INFO:  LWS_MAX_SMP           : 1
[2017/07/10 15:13:45:6711] INFO:  SPEC_LATEST_SUPPORTED : 13
[2017/07/10 15:13:45:6713] INFO:  sizeof (*info)        : 256
[2017/07/10 15:13:45:6715] INFO:  SYSTEM_RANDOM_FILEPATH: '/dev/urandom'
[2017/07/10 15:13:45:6720] INFO:  default timeout (secs): 20
[2017/07/10 15:13:45:6726] NOTICE:  Threads: 1 each 1024 fds
[2017/07/10 15:13:45:6728] INFO:  mem: context:          4584 bytes (488 ctx + (1 thr x 4096))
[2017/07/10 15:13:45:6730] INFO:  mem: http hdr rsvd:   30880 bytes (1 thr x (4096 + 3624) x 4))
[2017/07/10 15:13:45:6735] INFO:  mem: pollfd map:       8192
[2017/07/10 15:13:45:6738] NOTICE:  mem: platform fd map:  4096 bytes
[2017/07/10 15:13:45:6744] NOTICE:  Compiled with OpenSSL support
[2017/07/10 15:13:45:6748] NOTICE: Doing SSL library init
[2017/07/10 15:13:45:7103] INFO:  LWS_MAX_EXTENSIONS_ACTIVE: 2
[2017/07/10 15:13:45:7106] NOTICE:  mem: per-conn:          464 bytes + protocol rx buf
[2017/07/10 15:13:45:7114] NOTICE:  canonical_hostname = BB_BBG000229
[2017/07/10 15:13:45:7117] NOTICE: Creating Vhost 'default' port 443, 1 protocols, IPv6 off
[2017/07/10 15:13:45:7125] INFO: binding listen skt to wlan1 using SO_BINDTODEVICE
[2017/07/10 15:13:45:7162] INFO:  interface lo vs wlan1
[2017/07/10 15:13:45:7169] INFO:  interface wlan0 vs wlan1
[2017/07/10 15:13:45:7171] INFO:  interface wlan1 vs wlan1
[2017/07/10 15:13:45:7173] INFO:  interface lo vs wlan1
[2017/07/10 15:13:45:7175] INFO:  interface wlan0 vs wlan1
[2017/07/10 15:13:45:7177] INFO:  interface wlan1 vs wlan1
[2017/07/10 15:13:45:7184] DEBUG: insert_wsi_socket_into_fds: 0x3c9c8: tsi=0, sock=6, pos-in-fds=1
lws_create_contextfWebsocketWrapServer1CB : callback reason = 35
fWebsocketWrapServer1CB : callback reason = 32
fWebsocketWrapServer1CB : callback reason = 36
[2017/07/10 15:13:45:7194] NOTICE:  Listening on port 443
[2017/07/10 15:13:45:7197] NOTICE: Creating Vhost 'default' port 443, 1 protocols, IPv6 off
[2017/07/10 15:13:45:7201] INFO: binding listen skt to wlan0 using SO_BINDTODEVICE
[2017/07/10 15:13:45:7230] INFO:  interface lo vs wlan0
[2017/07/10 15:13:45:7233] INFO:  interface wlan0 vs wlan0
[2017/07/10 15:13:45:7238] INFO:  interface wlan1 vs wlan0
[2017/07/10 15:13:45:7240] INFO:  interface lo vs wlan0
[2017/07/10 15:13:45:7242] INFO:  interface wlan0 vs wlan0
[2017/07/10 15:13:45:7245] DEBUG: insert_wsi_socket_into_fds: 0x3cd90: tsi=0, sock=7, pos-in-fds=2
fWebsocketWrapServer0CB : callback reason = 35
fWebsocketWrapServer0CB : callback reason = 32
fWebsocketWrapServer0CB : callback reason = 36
[2017/07/10 15:13:45:7254] NOTICE:  Listening on port 443
[2017/07/10 15:13:45:7761] INFO: lws_protocol_init
starting lws_servicefWebsocketWrapServer1CB : callback reason = 27
fWebsocketWrapServer0CB : callback reason = 27
[2017/07/10 15:13:45:7893] NOTICE: Set privs to user 'root'
[2017/07/10 15:13:45:7897] NOTICE:    RETAINING CAPABILITY -1228674056
[2017/07/10 15:13:45:7899] NOTICE:    RETAINING CAPABILITY -1227489280
[2017/07/10 15:13:45:7901] NOTICE:    RETAINING CAPABILITY -1094574700
[2017/07/10 15:13:45:7906] NOTICE:    RETAINING CAPABILITY 1
[2017/07/10 15:13:45:7908] NOTICE:    RETAINING CAPABILITY 128
[2017/07/10 15:13:45:7910] NOTICE:    RETAINING CAPABILITY -1094575940
[2017/07/10 15:13:45:7912] NOTICE:    RETAINING CAPABILITY -1225553104
[2017/07/10 15:13:45:7914] NOTICE:    RETAINING CAPABILITY 67580
[2017/07/10 15:13:45:7916] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7920] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7922] NOTICE:    RETAINING CAPABILITY 134608
[2017/07/10 15:13:45:7924] NOTICE:    RETAINING CAPABILITY 28
[2017/07/10 15:13:45:7926] NOTICE:    RETAINING CAPABILITY -1225247392
[2017/07/10 15:13:45:7927] NOTICE:    RETAINING CAPABILITY 135696
[2017/07/10 15:13:45:7929] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7933] NOTICE:    RETAINING CAPABILITY 67580
[2017/07/10 15:13:45:7935] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7937] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7939] NOTICE:    RETAINING CAPABILITY -1225503052
[2017/07/10 15:13:45:7941] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7943] NOTICE:    RETAINING CAPABILITY -1227600460
[2017/07/10 15:13:45:7944] NOTICE:    RETAINING CAPABILITY -1225424460
[2017/07/10 15:13:45:7948] NOTICE:    RETAINING CAPABILITY -1225424416
[2017/07/10 15:13:45:7950] NOTICE:    RETAINING CAPABILITY -1094576312
[2017/07/10 15:13:45:7952] NOTICE:    RETAINING CAPABILITY 135696
[2017/07/10 15:13:45:7954] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7956] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7958] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7963] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7965] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7967] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7969] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7971] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:45:7975] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1326] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1328] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1330] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1332] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1334] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1336] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1338] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1340] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1342] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1343] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1345] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1347] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1349] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1351] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1353] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1355] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1357] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1362] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1366] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1368] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1370] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1371] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1373] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1375] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1377] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1381] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1383] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1385] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1386] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1388] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1390] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1394] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1396] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1398] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1400] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1402] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1403] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1407] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1409] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1411] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1413] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1415] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1417] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1418] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1422] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1424] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1426] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1428] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1430] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1432] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1435] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1437] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1439] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1441] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1443] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1445] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1447] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1450] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1452] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1454] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1456] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1458] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1463] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1465] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:1467] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4813] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4815] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4817] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4819] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4821] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4823] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4825] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4827] NOTICE:    RETAINING CAPABILITY 135696
[2017/07/10 15:13:46:4829] NOTICE:    RETAINING CAPABILITY 248736
[2017/07/10 15:13:46:4831] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4833] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4835] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4837] NOTICE:    RETAINING CAPABILITY 134608
[2017/07/10 15:13:46:4839] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4841] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4843] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4845] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4846] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4848] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4850] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4852] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4854] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4856] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4858] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4865] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4869] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4871] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4873] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:13:46:4875] NOTICE:    RETAINING CAPABILITY 0
[2017/07/10 15:14:50:6344] INFO: binding listen skt to wlan0 using SO_BINDTODEVICE
[2017/07/10 15:14:50:6351] DEBUG: accepted new conn port 39942 on fd=8
fWebsocketWrapServer0CB : callback reason = 17
[2017/07/10 15:14:50:6355] DEBUG: Accepted wsi 0x3e1e0 to context 0x21210, tsi 0
fWebsocketWrapServer0CB : callback reason = 29
[2017/07/10 15:14:50:6358] DEBUG: lws_adopt_descriptor_vhost: new wsi 0x3e1e0, sockfd 8
[2017/07/10 15:14:50:6364] DEBUG: lws_set_timeout: 0x3e1e0: 20 secs
[2017/07/10 15:14:50:6367] DEBUG: insert_wsi_socket_into_fds: 0x3e1e0: tsi=0, sock=8, pos-in-fds=3
fWebsocketWrapServer0CB : callback reason = 35
fWebsocketWrapServer0CB : callback reason = 32
fWebsocketWrapServer0CB : callback reason = 36
fWebsocketWrapServer0CB : callback reason = 19
[2017/07/10 15:14:50:6375] INFO: lws_header_table_attach: wsi 0x3e1e0: ah (nil) (tsi 0, count = 0) in
fWebsocketWrapServer0CB : callback reason = 34
[2017/07/10 15:14:50:6379] INFO: lws_header_table_attach: did attach wsi 0x3e1e0: ah 0x26410: count 1 (on exit)
[2017/07/10 15:14:50:6381] DEBUG: Attached ah immediately
[2017/07/10 15:14:50:6558] DEBUG: lws_read: incoming len 184  state 0
[2017/07/10 15:14:50:6572] PARSER: issuing 184 bytes to parser
[2017/07/10 15:14:50:6574] PARSER: WSI_TOKEN_NAME_PART '' (mode=0)
[2017/07/10 15:14:50:6576] INFO: Unknown method - dropping
[2017/07/10 15:14:50:6578] NOTICE:  forbidding on uri sanitation
[2017/07/10 15:14:50:6594] INFO: lws_parse failed
[2017/07/10 15:14:50:6599] INFO: lws_header_table_detach: wsi 0x3e1e0: ah 0x26410 (tsi=0, count = 1)
[2017/07/10 15:14:50:6601] INFO: lws_header_table_detach: wsi 0x3e1e0: ah 0x26410 (tsi=0, count = 0)
fWebsocketWrapServer0CB : callback reason = 5
[2017/07/10 15:14:50:6605] INFO: lws_close_free_wsi: shutting down connection: 0x3e1e0 (sock 8, state 0)
fWebsocketWrapServer0CB : callback reason = 35
fWebsocketWrapServer0CB : callback reason = 34
fWebsocketWrapServer0CB : callback reason = 36
[2017/07/10 15:14:50:6632] DEBUG: lws_set_timeout: 0x3e1e0: 20 secs
[2017/07/10 15:14:50:7401] DEBUG: pollhup
[2017/07/10 15:14:50:7404] DEBUG: 0x3e1e0: Close and handled
[2017/07/10 15:14:50:7406] INFO: lws_close_free_wsi: real just_kill_connection: 0x3e1e0 (sockfd 8)
fWebsocketWrapServer0CB : callback reason = 35
[2017/07/10 15:14:50:7410] INFO: lws_same_vh_protocol_remove: removing same prot wsi 0x3e1e0
[2017/07/10 15:14:50:7412] DEBUG: remove_wsi_socket_from_fds: wsi=0x3e1e0, sock=8, fds pos=3, end guy pos=4, endfd=0
fWebsocketWrapServer0CB : callback reason = 33
fWebsocketWrapServer0CB : callback reason = 36
[2017/07/10 15:14:50:7416] DEBUG: not calling back closed mode=0 state=0
fWebsocketWrapServer0CB : callback reason = 30
[2017/07/10 15:14:50:7423] INFO: ah det due to close
[2017/07/10 15:14:50:7425] DEBUG: lws_free_wsi: 0x3e1e0, remaining wsi 2

[2017/07/10 15:16:40:8196] INFO: binding listen skt to wlan1 using SO_BINDTODEVICE
[2017/07/10 15:16:40:8208] DEBUG: accepted new conn port 37483 on fd=8
fWebsocketWrapServer1CB : callback reason = 17
[2017/07/10 15:16:40:8224] DEBUG: Accepted wsi 0x3e1e0 to context 0x21210, tsi 0
fWebsocketWrapServer1CB : callback reason = 29
[2017/07/10 15:16:40:8230] DEBUG: lws_adopt_descriptor_vhost: new wsi 0x3e1e0, sockfd 8
[2017/07/10 15:16:40:8232] DEBUG: lws_set_timeout: 0x3e1e0: 20 secs
[2017/07/10 15:16:40:8234] DEBUG: insert_wsi_socket_into_fds: 0x3e1e0: tsi=0, sock=8, pos-in-fds=3
fWebsocketWrapServer1CB : callback reason = 35
fWebsocketWrapServer1CB : callback reason = 32
fWebsocketWrapServer1CB : callback reason = 36
fWebsocketWrapServer1CB : callback reason = 19
[2017/07/10 15:16:40:8244] INFO: lws_header_table_attach: wsi 0x3e1e0: ah (nil) (tsi 0, count = 0) in
fWebsocketWrapServer1CB : callback reason = 34
[2017/07/10 15:16:40:8247] INFO: lws_header_table_attach: did attach wsi 0x3e1e0: ah 0x26410: count 1 (on exit)
[2017/07/10 15:16:40:8249] DEBUG: Attached ah immediately
[2017/07/10 15:16:40:8256] DEBUG: lws_read: incoming len 163  state 0
[2017/07/10 15:16:40:8258] PARSER: issuing 163 bytes to parser
[2017/07/10 15:16:40:8262] PARSER: WSI_TOKEN_NAME_PART '' (mode=0)
[2017/07/10 15:16:40:8264] INFO: Unknown method - dropping
[2017/07/10 15:16:40:8266] NOTICE:  forbidding on uri sanitation
[2017/07/10 15:16:40:8287] INFO: lws_parse failed
[2017/07/10 15:16:40:8289] INFO: lws_header_table_detach: wsi 0x3e1e0: ah 0x26410 (tsi=0, count = 1)
[2017/07/10 15:16:40:8319] INFO: lws_header_table_detach: wsi 0x3e1e0: ah 0x26410 (tsi=0, count = 0)
fWebsocketWrapServer1CB : callback reason = 5
[2017/07/10 15:16:40:8323] INFO: lws_close_free_wsi: shutting down connection: 0x3e1e0 (sock 8, state 0)
fWebsocketWrapServer1CB : callback reason = 35
fWebsocketWrapServer1CB : callback reason = 34
fWebsocketWrapServer1CB : callback reason = 36
[2017/07/10 15:16:40:8373] DEBUG: lws_set_timeout: 0x3e1e0: 20 secs
[2017/07/10 15:16:40:8376] DEBUG: pollhup
[2017/07/10 15:16:40:8378] DEBUG: 0x3e1e0: Close and handled
[2017/07/10 15:16:40:8383] INFO: lws_close_free_wsi: real just_kill_connection: 0x3e1e0 (sockfd 8)
fWebsocketWrapServer1CB : callback reason = 35
[2017/07/10 15:16:40:8386] INFO: lws_same_vh_protocol_remove: removing same prot wsi 0x3e1e0
[2017/07/10 15:16:40:8388] DEBUG: remove_wsi_socket_from_fds: wsi=0x3e1e0, sock=8, fds pos=3, end guy pos=4, endfd=0
fWebsocketWrapServer1CB : callback reason = 33
fWebsocketWrapServer1CB : callback reason = 36
[2017/07/10 15:16:40:8392] DEBUG: not calling back closed mode=0 state=0
fWebsocketWrapServer1CB : callback reason = 30
[2017/07/10 15:16:40:8400] INFO: ah det due to close
[2017/07/10 15:16:40:8402] DEBUG: lws_free_wsi: 0x3e1e0, remaining wsi 2
[2017/07/10 15:17:37:5506] INFO: binding listen skt to wlan1 using SO_BINDTODEVICE
[2017/07/10 15:17:37:5512] DEBUG: accepted new conn port 53290 on fd=8
fWebsocketWrapServer1CB : callback reason = 17
[2017/07/10 15:17:37:5515] DEBUG: Accepted wsi 0x3e1e0 to context 0x21210, tsi 0
fWebsocketWrapServer1CB : callback reason = 29
[2017/07/10 15:17:37:5529] DEBUG: lws_adopt_descriptor_vhost: new wsi 0x3e1e0, sockfd 8
[2017/07/10 15:17:37:5532] DEBUG: lws_set_timeout: 0x3e1e0: 20 secs
[2017/07/10 15:17:37:5534] DEBUG: insert_wsi_socket_into_fds: 0x3e1e0: tsi=0, sock=8, pos-in-fds=3
fWebsocketWrapServer1CB : callback reason = 35
fWebsocketWrapServer1CB : callback reason = 32
fWebsocketWrapServer1CB : callback reason = 36
fWebsocketWrapServer1CB : callback reason = 19
[2017/07/10 15:17:37:5543] INFO: lws_header_table_attach: wsi 0x3e1e0: ah (nil) (tsi 0, count = 0) in
fWebsocketWrapServer1CB : callback reason = 34
[2017/07/10 15:17:37:5546] INFO: lws_header_table_attach: did attach wsi 0x3e1e0: ah 0x26410: count 1 (on exit)
[2017/07/10 15:17:37:5548] DEBUG: Attached ah immediately
[2017/07/10 15:17:37:5572] DEBUG: lws_read: incoming len 184  state 0
[2017/07/10 15:17:37:5584] PARSER: issuing 184 bytes to parser
[2017/07/10 15:17:37:5587] PARSER: WSI_TOKEN_NAME_PART '' (mode=0)
[2017/07/10 15:17:37:5589] INFO: Unknown method - dropping
[2017/07/10 15:17:37:5591] NOTICE:  forbidding on uri sanitation
[2017/07/10 15:17:37:5609] INFO: lws_parse failed
[2017/07/10 15:17:37:5611] INFO: lws_header_table_detach: wsi 0x3e1e0: ah 0x26410 (tsi=0, count = 1)
[2017/07/10 15:17:37:5644] INFO: lws_header_table_detach: wsi 0x3e1e0: ah 0x26410 (tsi=0, count = 0)
fWebsocketWrapServer1CB : callback reason = 5
[2017/07/10 15:17:37:5650] INFO: lws_close_free_wsi: shutting down connection: 0x3e1e0 (sock 8, state 0)
[2017/07/10 15:17:37:5653] DEBUG: closing: shutdown (state 0) ret 107
fWebsocketWrapServer1CB : callback reason = 35
fWebsocketWrapServer1CB : callback reason = 34
fWebsocketWrapServer1CB : callback reason = 36
[2017/07/10 15:17:37:5659] DEBUG: lws_set_timeout: 0x3e1e0: 20 secs
[2017/07/10 15:17:37:5666] DEBUG: pollhup
[2017/07/10 15:17:37:5668] DEBUG: 0x3e1e0: Close and handled
[2017/07/10 15:17:37:5670] INFO: lws_close_free_wsi: real just_kill_connection: 0x3e1e0 (sockfd 8)
fWebsocketWrapServer1CB : callback reason = 35
[2017/07/10 15:17:37:5673] INFO: lws_same_vh_protocol_remove: removing same prot wsi 0x3e1e0
[2017/07/10 15:17:37:5677] DEBUG: remove_wsi_socket_from_fds: wsi=0x3e1e0, sock=8, fds pos=3, end guy pos=4, endfd=0
fWebsocketWrapServer1CB : callback reason = 33
fWebsocketWrapServer1CB : callback reason = 36
[2017/07/10 15:17:37:5681] DEBUG: not calling back closed mode=0 state=0
fWebsocketWrapServer1CB : callback reason = 30
[2017/07/10 15:17:37:5687] INFO: ah det due to close
[2017/07/10 15:17:37:5692] DEBUG: lws_free_wsi: 0x3e1e0, remaining wsi 2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Servertest.c
Type: text/x-csrc
Size: 3361 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170710/7441e476/attachment-0002.bin>


More information about the Libwebsockets mailing list