jruby 220.127.116.11 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.72-b15 on 1.8.0_72-b15 +jit [darwin-x86_64]
Darwin veritas.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
Long strings passed to UNIXSocket#write writes the data and returns the number of bytes written.
#write writes a subset of the data and raises an exception: #<SystemCallError: Unknown error - >}. The amount of data varies but I've seen 8192 show up not-randomly, almost like there was a 8k buffer somewhere.
#<SystemCallError: Unknown error - >}
The git repo linked to above shows the behavior. The exception in question is raise inside #fast_write. Changing the code to use #write instead of #syswrite does not change the behavior.
Nice, haven't had a good UNIXSocket bug in a while. What are UNIX sockets used for in a puma set up?
I've got some long flights today so I may have time to look into this.
Puma can use a UNIX socket to listen/respond to HTTP requests. For example, you can proxy requests from Nginx to Puma over a UNIX socket.
@headius What @TheKidCoder said.
Ok that makes sense.
Does this issue correspond to this constant?
@ericqweinstein Seems plausible...I'm not familiar with that value.
We may be able to make progress on this with @etehtsea helping work on sockets. Sadly it won't be in 18.104.22.168.
Hopefully, I have a fix for this.
IO#syswrite should always block. Fixes #3799
Do the same as in 857b76f
@etehtsea Got that fix in a releasable state? We're hoping to push 22.214.171.124 tomorrow.
@headius no, I don't have better solution for now.
@etehtsea I guess what I was asking is if the commit above is a "good enough" fix. If so, do you want to throw it in a PR for testing?
Status of testing is unclear and this is a key core API. Punting.
@headius you said earlier that this fix couldn't be "good enough" because possibly it masks real issue.
As far as I remember I tested this issue using this app so if needed I could try to convert it to regression spec.
Bump jnr-enxio and add regression test
@headius I'm still not getting consistent behaviour with 126.96.36.199 for the puma_big_response_test example app created by @evanphx.
@headius we never merged following commit to master. etehtsea@613c99f