websocket errors during disconnect

17 views
Skip to first unread message

ihail...@gmail.com

unread,
Dec 19, 2014, 5:33:10 PM12/19/14
to onio...@coralbits.com
Hi, 

I find that it is quite easy to the crash websocket onion example if I repeatedly reload the main page.

Is this a known issue or is it more likely something specific to my environment (Ubuntu + Safari 8 client)?

I have the same problem in my own websocket enabled application, every time the client closes the websocket TCP connection I see the error and warnings below and if your unlucky the application crashes.

Regards,

Ian.

(gdb) run

Starting program: onion-master/build/examples/websockets/websockets 

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

[New Thread 0xb7fe3b40 (LWP 9123)]

[New Thread 0xb77e2b40 (LWP 9124)]

[New Thread 0xb6fe1b40 (LWP 9125)]

[New Thread 0xb67e0b40 (LWP 9126)]

[New Thread 0xb5fdfb40 (LWP 9127)]

[New Thread 0xb57deb40 (LWP 9128)]

[New Thread 0xb4fddb40 (LWP 9129)]

[B5FDFB40] [2014-12-17 03:39:37] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:38] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:38] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:38] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:38] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:38] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:38] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:38] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:38] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:39] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:39] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:39] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:39] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:39] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:39] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:39] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:39] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:40] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:40] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:40] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:40] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:43] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:43] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:43] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:43] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:43] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:43] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:43] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:43] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:44] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:44] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:44] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:44] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:44] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:44] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:44] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:44] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:44] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:44] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:44] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:44] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:45] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:45] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:45] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:45] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:45] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:45] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:45] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:45] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:46] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:46] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:46] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:46] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:46] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:46] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:46] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:46] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:46] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:47] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:47] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:47] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:47] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:47] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:47] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:47] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:47] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:47] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:47] [ERROR websocket.c:434] Error reading websocket header

[B57DEB40] [2014-12-17 03:39:47] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B57DEB40] [2014-12-17 03:39:47] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:48] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:48] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:48] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:48] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:48] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:48] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:48] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:48] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.

[B5FDFB40] [2014-12-17 03:39:48] [INFO response.c:182] [192.168.88.125] "GET /" 500 73 (Keep-Alive)

[B57DEB40] [2014-12-17 03:39:49] [INFO response.c:182] [192.168.88.125] "GET /" 200 437 (Keep-Alive)

[B5FDFB40] [2014-12-17 03:39:49] [ERROR websocket.c:434] Error reading websocket header

[B5FDFB40] [2014-12-17 03:39:49] [WARNING response.c:206] Trying to set length after headers sent. Undefined onion behaviour.


Program received signal SIGPIPE, Broken pipe.

[Switching to Thread 0xb5fdfb40 (LWP 9127)]

0x001111b2 in ?? () from /lib/ld-linux.so.2

(gdb) bt

#0  0x001111b2 in ?? () from /lib/ld-linux.so.2

#1  0x0015b95b in write () from /lib/i386-linux-gnu/libpthread.so.0

#2  0x001423ae in onion_http_write () from onion-master/build/src/onion/libonion.so.0

#3  0x0013c915 in onion_response_flush () from onion-master/build/src/onion/libonion.so.0

#4  0x0013c7a8 in onion_response_write_headers () from onion-master/build/src/onion/libonion.so.0

#5  0x0013806a in onion_default_error () from onion-master/build/src/onion/libonion.so.0

#6  0x0013d39a in onion_handler_handle () from onion-master/build/src/onion/libonion.so.0

#7  0x0013bd75 in onion_request_process () from onion-master/build/src/onion/libonion.so.0

#8  0x00141338 in parse_headers_KEY () from onion-master/build/src/onion/libonion.so.0

#9  0x001422d9 in onion_request_write () from onion-master/build/src/onion/libonion.so.0

#10 0x0014242d in onion_http_read_ready () from onion-master/build/src/onion/libonion.so.0

#11 0x0013f8df in onion_listen_point_read_ready () from onion-master/build/src/onion/libonion.so.0

#12 0x001452dc in onion_poller_poll () from onion-master/build/src/onion/libonion.so.0

#13 0x00137fdf in onion_poller_poll_start () from onion-master/build/src/onion/libonion.so.0

#14 0x00154d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0

#15 0x00258bae in clone () from /lib/i386-linux-gnu/libc.so.6

(gdb) 


David Moreno Montero

unread,
Dec 20, 2014, 6:47:54 AM12/20/14
to ihail...@gmail.com, onion-dev
Hi,

thanks for the report, can you add it to the issue traker.

I see you added another one, about not properly disconnecting clients. I will try to look on both ASAP.

Thanks!

--
You received this message because you are subscribed to the Google Groups "onion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onion-dev+...@coralbits.com.
To post to this group, send email to onio...@coralbits.com.
Visit this group at http://groups.google.com/a/coralbits.com/group/onion-dev/.
For more options, visit https://groups.google.com/a/coralbits.com/d/optout.



--

ihail...@gmail.com

unread,
Dec 21, 2014, 7:23:15 AM12/21/14
to onio...@coralbits.com, ihail...@gmail.com
Hi David, 

Thanks for fixing this.

Ian.
Reply all
Reply to author
Forward
0 new messages