Date | Commit message (Collapse) |
|
It is causing _blocked_zombie to fail on rtype=11 due to the
addition of Content-Length making the client persistent when
we didn't actually want it to be (for the test).
|
|
Rack::ContentLength now unconditionally captures bodies and
doesn't dup the data yield by body#each. Thus we can't reuse
buffers anymore.
|
|
Needed for Ruby 3.1, and likely 3.2, as well...
|
|
This is the size used by Ruby internally for IO.copy_stream.
8192 seems too small nowadays with the higher cost of syscalls.
|
|
We don't want to overread in case a broken HTTP backend
sends us excessive data.
|
|
When tweaking buffer sizes, another IN_CREATE event can
happen soon after the delete.
|
|
8 changes since 1.17.0 (2019-04-22):
worker: workaround old F_SETPIPE_SZ bug
doc: favor File.read over IO.read to ease review
proxy_pass: document as a public API
doc: include Yahns/ directory on website
extras/try_gzip_static: set "Vary: Accept-Encoding" on gzip
do not sleep if signals are pending
server: workaround Linux v5.5..v5.13 epoll bug
gemspec: allow unicorn 6.x
|
|
The changes in unicorn 6.x don't affect us
|
|
epoll_wait() wakeups from QueueQuitter got lost during graceful
shutdown since there's multiple worker threads operating off the
same FD. Workaround the problem by re-arming the eventfd for
every worker thread reaped.
Link: https://yhbt.net/lore/lkml/20210405231025.33829-1-dave@stgolabs.net/
|
|
This should prevent missed/delayed wakeups if repeatedly
kill(2)-ed.
|
|
Some rare clients may not support gzip. So ensure cache layers
don't inadvertantly serve cached content to them.
|
|
Otherwise, https://yhbt.net/yahns/Yahns/ProxyPass.html won't
be accessible
|
|
Might as well... this has been in use at YHBT.net for ~4 years
at this point. And given nginx has new corporate overlords,
maybe a decidedly non-enterprisey alternative is worth
"marketing" :P
Previous discussion from 2016:
https://YHBT.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/
|
|
IO.read may invoke subprocesses, which can set off
security warnings.
|
|
Linux before 4.9 (and before 3.16.57) failed to account
for the existing size of a pipe before checking system
resource limits and would return EPERM in that case.
https://80x24.org/mirrors/linux.git/commit?id=b0b91d18e2e97b741b294af9333824ecc3fadfd8
https://lore.kernel.org/lkml/?q=s%3A%22fix+limit+checking+in+pipe_set_size%22
Based on a patch by Stephen Demjanenko for unicorn:
https://bogomips.org/unicorn-public/1556922018-24096-1-git-send-email-sdemjanenko@gmail.com/
|
|
This releases includes a few kqueue-related bugfixes from
Lin Jen-Shin <godfat@godfat.org>. There's also some
shutdown_timeout-related bugfixes and some cleanups to
reduce dependencies on kgio.
extras/exec_cgi and extras/autoindex both got some minor
updates; the latter of which defaults to a dark scheme to save
power on OLED and CRT displays (it is Earth Day, after all :>)
Eric Wong (25):
doc: fix git URLs in README and HACKING
http_client: do not warn on do_pread overreach
remove IO#close_on_exec= calls
yahns/worker: shrink pipe under Linux
test/test_extras_exec_cgi.rb: improve test reliability
extras/exec_cgi: remove kgio dependency
extras/exec_cgi: update copyright year and use SPDX
extras/exec_cgi: @body_tip is always set
extras/exec_cgi: support Process.spawn options (e.g. RLIMIT_*)
server_mp: favor "Kernel#select" instead of "IO.select"
server_mp: remove redundant srand call
extras/exec_cgi: remove unecessary .freeze calls
server: respect shutdown_timeout
server: extra shutdown timeout debugging
wbuf: use IO#write directly in Ruby 2.5+ for writev
worker: rely on F_SETPIPE_SZ to set mininum value
remove calls to kgio_wait_* able
do not shutdown until listeners are all stopped
README: remove SMTP-based subscription info
sigevent_*: fixup non-eventfd path
README: note HTTPS support for HTTP/1.1
extras/autoindex: use dark colors by default
doc: update homepage to point to cgit install
doc: update wording to avoid "mailing list"
doc: remove inaccurate comment about "GNU-ism"
Lin Jen-Shin (2):
Add QueueQuitter#closed? to queue_quitter_pipe.rb
@srv.shutdown could raise Errno::ENOTCONN
|
|
touch(1posix) documents the presence of "-r"
|
|
The concept of a "mailing list" infers the existence of a
centralized subscriber list, and hurts forkability. The
"public inbox" concept is a more accurate description and
mostly centralization-resistant, aside from domain names.
|
|
I've gotten cgit to work well for browsers without CSS
support (patches posted to <cgit@lists.zx2c4.com>).
For browsers with CSS support, the color scheme
is now dark and can help save electricity for users
of OLED and CRT displays.
|
|
Some browsers (e.g. Firefox 67.0a1 via "ui.systemUsesDarkTheme") are
adding support for the "prefers-color-scheme" @media query. So this
allows pages to respect user choice when it comes to dark or light
schemes.
OLED and CRT displays measure significant power savings when using
dark schemes. Dark themes work better with less ambient light, so
favoring darkness can lead to overall power savings even with CCFL
and LED-lit displays.
|
|
We've had HTTPS support for several years, now.
|
|
And slightly cleanup the Kgio::DefaultWaiters include for
the eventfd path, too.
Fixes: 96825e8ca734cfbb ("remove calls to kgio_wait_* able")
|
|
There's no point in advertising the mlmmj subscription: Nobody's
subscribed in ~5 years and I never wanted to deal with
delivering mail over SMTP, anyways.
The subscriber list is a point-of-centralization, anyways.
Furthermore, the NNTP, Atom, and HTML interfaces all allow
reading archives anonymously without needing a throwaway email
address.
|
|
Otherwise, listeners may still be injecting into the queue
and new clients may be accepted.
Fixes: 86ea6ed1417b ("server: respect shutdown_timeout")
|
|
IO#wait_readable existed since Ruby 2.0, so we don't need
to use the "kgio_"-prefixed version.
|
|
Old kernels running on alpha may EINVAL, here; but
modern kernels will automatically increase the passed
value to the minimum size supported by the kernel.
This only affects alpha, since all other arches use 4K
page size on Linux.
|
|
Slowly removing kgio dependencies...
|
|
Still not sure what's going on with the proxy_pass code,
but something in the Fdmap code is causing shutdowns to
take way longer than expected...
|
|
It seems there is still a bug in the proxy code which causes
this timeout expiries to be missed.
|
|
Operations via Array#map are NOT optimized away by opt_str_lit
in the VM, and they're unnecessary anyways with the
"frozen_string_literal: true" comment in Ruby 2.3+.
|
|
Ruby itself has tests for RNG reseeding at fork, so no need for
belt-and-suspenders code on our end.
|
|
Golfing to eliminate a constant lookup and inline-constant-cache entry
|
|
These options can be useful for limiting CGI process runtime and
memory usage.
|
|
No point in increasing the complexity for cases it's not.
|
|
Machine-parseability is useful for licenses.
|
|
We don't need non-blocking I/O at all in this module and it's
not coupled with the rest of yahns at all.
|
|
Make the this test less multi-core/scheduler dependent.
|
|
We use eventfd whereever possible, but workers still require
a pipe to the parent for death detection.
|
|
Since we've required Ruby 2.0+ for a while, we can assume
descriptors are created with IO#close_on_exec=true and
avoid bloating our code with calls to it.
|
|
Without sendfile, we can hit EOFError on IO#pread
if a file we're serving gets truncated mid-response.
This was causing test_truncated_sendfile failures;
but I didn't notice before because I forgot to set
SENDFILE_BROKEN=1 to disable the test.
|
|
After this fix, all tests except test_client_expire are
passing on my system (macos 10.12.6). Honestly, I don't
really care if it's working perfectly fine. It's just
nice to be able to run the same server on development
machine. Production is of course Linux.
|
|
Since we rely on this class being an IO-like class,
in Yahns::Queue#worker_thread we're using this method.
This fixes an actual error on lib/yahns/queue_kqueue.rb:56
|
|
Oops :x
|
|
This release fixes warnings for users combining Rack::Deflater
with HTTPS support:
https://yhbt.net/yahns-public/20180714005630.11812-1-e@80x24.org/
yahns-rackup(1) users may not specify "-O listen=inherit"
when spawning from systemd. The "listen" directive may
be omitted entirely from the yahns-config(5) files.
A few other cleanups and nothing interesting, otherwise.
20 yawn-worthy changes since v1.15.0 (2017-03-23):
config: more descriptive variable name
proxy_pass: comment explaining what rack.hijack calls
USR2 upgrades may use Process.spawn for vfork
avoid Thread#[] and Thread#[]= across threads
gemspec: declare Ruby 2.0+ dependency, here
test_bin: SO_KEEPALIVE value only needs to be true
rackup_handler: remove unnecessary branch
test_bin: use RbConfig.ruby for non-standard names
allow omitting specifying socket name when inheriting listen socket
server: fix incomplete comment about SSLContext#setup
test_rack_env: additional test for Rack environment
test: allow setting TAIL env to watch error logs
fix some unused variables
tests: thread-safety fixes
test/server_helper: describe reason for termination
test/test_ssl: set SSLContext#security_level=0
doc: https:// URLs instead of git://
http_client: clear backtrace on "wrong version number" in OpenSSL
openssl_client: do not attempt writes after SystemCallError
use IO#pread if available in Ruby 2.5
*ZZZZZZ*
|
|
In the future, this will allow sharing open files across
different clients when serving static files. For now, it
saves us one syscall.
|
|
Whenever @ssl.write_nonblock fails due to ECONNRESET/EPIPE in
Rack::Deflater#each; Rack::Deflater#each will still attempt to
write again in the "ensure" statement via Zlib::GzipWriter#close.
This causes SSL_write to complain of "bad length" or
"bad write retry" errors. Now, re-raise any SystemCallError
we caught from previous write_nonblock calls to prevent
calls to SSL_write which would trigger such an exception.
|
|
Errors which are the fault of the client should not generate
backtraces which can lead to dinky servers running out-of-space.
|
|
Might as well eat our own dogfood w.r.t. yahns TLS support
|
|
This is apparently needed to pass tests with a newer version of
OpenSSL found in Debian 9
|
|
A test failure was causing SIGQUIT to be delivered before
the forked process had a chance to hit trap(:QUIT).
|