21
Decider / Re: WebSockets JSON Communication Protocol
« Last post by Cube on January 30, 2018, 04:48:47 PM »Quite happy with the progress in Decider today on both the cleanup and re-thinking of the vinterface protocol and the newly forming jsonii web socket protocol, I went to update my test container to the latest versions of the code. Quickly I ran into the issue that the version of libwebsockets that ships with Fedora 26 (which I had been running) was 2.2-based. Decider's code now includes features and functionality of the 2.4 series of libwebsockets, so I upgraded the container to Fedora 27, which brought with it libwebsockets 2.3. Still not quite enough. I then installed the 2.4.0-1 package of LWS from Fedora 28 rawhide, compiled and ran, only to be met with this old error (segmentation fault) when I tried to connect to the web socket server:
Ah, the dawning recollection that in order to get it working on my development VM I'd had to compile lws from source with SSL disabled in order to get it to work properly. Here lies the fork now set in the road before me: Do I pursue resolution with the stock standard version of the library, trying to figure out why it crashes with an SSL error even though I am not using encrypted connections in my tests, or do I build lws from source, remove SSL functionality (which I know works) and continue on my merry way?
Quote
Thread 7 "websocket" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee5ea700 (LWP 15462)]
0x00007ffff577fdc0 in SSL_get_SSL_CTX () from /lib64/libssl.so.1.1
Missing separate debuginfos, use: dnf debuginfo-install gsoap-2.8.49-3.fc27.x86_64 json-c-0.12.1-5.fc27.x86_64 libwebsockets-2.4.0-1.fc28.x86_64 libxml2-2.9.7-1.fc27.x86_64 mariadb-libs-10.2.10-2.fc27.x86_64 openssl-libs-1.1.0g-1.fc27.x86_64 xz-libs-5.2.3-4.fc27.x86_64 zlib-1.2.11-4.fc27.x86_64
(gdb) info stack
#0 0x00007ffff577fdc0 in SSL_get_SSL_CTX () from /lib64/libssl.so.1.1
#1 0x00007ffff67ba378 in lws_server_socket_service_ssl () from /lib64/libwebsockets.so.12
#2 0x00007ffff67bd771 in lws_adopt_descriptor_vhost () from /lib64/libwebsockets.so.12
#3 0x00007ffff67bdb13 in lws_server_socket_service () from /lib64/libwebsockets.so.12
#4 0x00007ffff67af529 in lws_service_fd_tsi () from /lib64/libwebsockets.so.12
#5 0x00007ffff67bbc0b in _lws_plat_service_tsi () from /lib64/libwebsockets.so.12
#6 0x0000000000445f3a in websocket_server_main () at ws/ws-serv.c:197
#7 0x00007ffff717d61b in start_thread () from /lib64/libpthread.so.0
#8 0x00007ffff4ffb98f in clone () from /lib64/libc.so.6
(gdb)
Ah, the dawning recollection that in order to get it working on my development VM I'd had to compile lws from source with SSL disabled in order to get it to work properly. Here lies the fork now set in the road before me: Do I pursue resolution with the stock standard version of the library, trying to figure out why it crashes with an SSL error even though I am not using encrypted connections in my tests, or do I build lws from source, remove SSL functionality (which I know works) and continue on my merry way?