Re: mod_websocket ownership (and fixes)

2015-09-12 Thread Alex Bligh
On 11 Sep 2015, at 23:49, Jacob Champion wrote: > Hi Alex, > > On 09/11/2015 10:02 AM, Alex Bligh wrote: >> mod_proxy_wstunnel forwards the websocket connection without >> interpreting the protocol (i.e. needs to be directed at a websocket >> server); my mo

Re: mod_websocket ownership (and fixes)

2015-09-11 Thread Alex Bligh
On 10 Sep 2015, at 23:26, Jacob Champion wrote: > On 09/10/2015 02:50 PM, Alex Bligh wrote: >> Here: https://github.com/abligh/apache-websocket >> >> in the vncproxy directory you will find a vncproxy (which is actually >> a generic tcpproxy as well, though it co

Re: mod_websocket ownership (and fixes)

2015-09-10 Thread Alex Bligh
ng / FD processing / bucket brigade runs now. Crucially you've put all the bucket brigade handling into a single thread (I think) which I take it is the same thread as apache itself uses - that's what I reckoned I needed to do to get it to work reliably with SSL. -- Alex Bligh

Re: [PATCH 0/5] Fix mod_websocket segfaults under load

2015-05-04 Thread Alex Bligh
On 30 Apr 2015, at 19:19, Jacob Champion wrote: > Quick bump to this thread. Have any interested parties (Alex?) been able > to give these patches a try? Not yet - sorry. -- Alex Bligh

Re: [PATCH 0/5] Fix mod_websocket segfaults under load

2015-03-09 Thread Alex Bligh
t; License 2.0. Thanks for these. I'll try to find some time to look through them. Note mod_websocket is not (currently) in the list of apache supported modules, though for one would love it to be. So for most people they can't see what you are patching against. Do you have this in git somewhere (e.g. github?) -- Alex Bligh

Re: Debugging mod_websocket -- any others out there?

2015-03-03 Thread Alex Bligh
is any objection from the mailing list; I don't see a > lot of patch mail in the archives). It would make more sense to > contribute directly to the original author, if said author were still > around... I for one would be interested in this. Feel free to fork my repo on github. -- Alex Bligh

Re: Debugging mod_websocket -- any others out there?

2015-02-25 Thread Alex Bligh
On 25 Feb 2015, at 22:40, Jacob Champion wrote: > Maybe APR has an abstraction > for socketpair()? 2 x apr_file_pipe_create ? -- Alex Bligh

Re: Debugging mod_websocket -- any others out there?

2015-02-25 Thread Alex Bligh
ever from more threads? Yes > Are there any existing modules in Apache that take a similar approach? Not to my knowledge. Which is why I backed off doing it! I couldn't even find any real documentation for the thing that ended a brigade in a pipe/socketpair; I found the code by accident while hunting the above bug. The other thing I was planning to look at was how modproxy-wstunnel and friends work - they must face a similar problem. -- Alex Bligh

Re: Debugging mod_websocket -- any others out there?

2015-02-25 Thread Alex Bligh
ping the encode/decode function for libwebsockets, but the "LGPL2+ static link exception" bit may create an issue. TBH I never had any issues with the actual encode/decode code. -- Alex Bligh

Re: Mod_proxy is truncating Response Header size

2014-11-26 Thread Alex Bligh
ard back the response to the initial caller. > Did somebody face that kind of problem? Does increasing ProxyIOBufferSize help? -- Alex Bligh

Re: tcp/ip sockets in apache module

2014-05-24 Thread Alex Bligh
oes anyone have a small working > example of this or am I just way off base in using TCP/IP for external > communication to a module. Thanks. Not that small, but: https://github.com/abligh/apache-websocket -- Alex Bligh

Re: problem with different version of openssl in Apache and apache module

2013-12-20 Thread Alex Bligh
e version of openssl. But if Apache was built with openssl > 0.9.8x, segfault occurred. Is there anything I can do for my built so it > also works in the Apache which was built with older version of openssl? Static link to openssl? -- Alex Bligh

Re: Mutex protection of output bucket brigade

2013-06-12 Thread Alex Bligh
db on apr_bucket_destroy_noop works fine, but apr_brigade_cleanup will not 'finish' as it repeatedly calls apr_bucket_destroy_noop) as it goes around in an infinite loop. Sometimes we see SEGVs too. Typically the stack trace looks the same (i.e. it's ap_core_output_fil

Re: Mutex protection of output bucket brigade

2013-06-12 Thread Alex Bligh
cket brigade. Or are you saying the output bucket brigade is only actually written to the client during an ap_fwrite()? In which case are all the filters (primarily mod_ssl) guaranteed to be thread safe if a different thread is doing input from that doing output? -- Alex Bligh

Mutex protection of output bucket brigade

2013-06-12 Thread Alex Bligh
how to do the read in a non-blocking way. Any ideas? -- Alex Bligh

Re: thread safety and mpm-prefork

2013-06-11 Thread Alex Bligh
( apr_pool_create_ex(&opool, NULL, NULL, oallocator) == APR_SUCCESS) && /* WARNING: pool has no parent */ ( NULL != (obucketallocator = apr_bucket_alloc_create(opool))) && ( NULL != (obb = apr_brigade_create(opool, obucketallocator))) ) { -- Alex Bligh

Re: thread safety and mpm-prefork

2013-06-11 Thread Alex Bligh
t pointers being unhappy. -- Alex Bligh

Re: thread safety and mpm-prefork

2013-06-11 Thread Alex Bligh
eation of bucket brigades. The issue seems to be linked to bucket brigade processing (which is unsurprising as that's what's written to by one thread but read by the other). Any help (paid if necessary) welcome. It's an apache licensed tcp proxy module. -- Alex Bligh

thread safety and mpm-prefork

2013-06-11 Thread Alex Bligh
tives actually do anything in mpm-prefork? I'm using apr_thread_create to create a thread, then providing a separate allocator, mutex, pool and similar (all as recommended). But if the mutex stuff is 'optimised out' of my apr library - specifically the pool stuff - all this will be in vain. -- Alex Bligh

Re: Bucket brigade & filter thread safety

2012-09-10 Thread Alex Bligh
it's non-blocking it needs to wait on a condwait or something for /apache/ to produce more data from the client, not on the other thread. -- Alex Bligh

Re: Bucket brigade & filter thread safety

2012-09-10 Thread Alex Bligh
igade_get (if I understood how to do it) but what I really need is the equivalent of a select() which I can do with the mutex not held (or some way to drop the mutex during the raw reads). Any ideas? -- Alex Bligh

Bucket brigade & filter thread safety

2012-09-09 Thread Alex Bligh
mutex held during ap_get_brigade, as the latter blocks (and I can't see how to use the non-blocking version without spinning). [apologies for the partial dupe on the apache-users mailing list - I think I've got nearer the problem since then and this list seems more appropriate] -- Alex Bligh