Files | Admin

Notes:

Release Name: 1.1.2

Notes:
Unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between Unicorn and slow clients.

* http://unicorn.bogomips.org/
* mongrel-unicorn@rubyforge.org
* git://git.bogomips.org/unicorn.git

Changes:

This release is fixes a long-standing bug where the original PID
file is not restored when rolling back from a USR2 upgrade.
Presumably most upgrades aren't rolled back, so it took over a
year to notice this issue.  Thanks to Lawrence Pit for
discovering and reporting this issue.



Changes: GIT-VERSION-GEN | 2 +- lib/unicorn.rb | 5 ++ lib/unicorn/const.rb | 4 +- lib/unicorn/launcher.rb | 6 +-- t/pid.ru | 3 + t/t0008-back_out_of_upgrade.sh | 110 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+), 8 deletions(-) commit d1818d26b0ca491dac861f3c2d9e249b665269a4 Author: Eric Wong Date: Tue Jul 13 13:01:55 2010 -0700 unicorn 1.1.2 - fixing upgrade rollbacks This release is fixes a long-standing bug where the original PID file is not restored when rolling back from a USR2 upgrade. Presumably most upgrades aren't rolled back, so it took over a year to notice this issue. Thanks to Lawrence Pit for discovering and reporting this issue. commit 43b308c53b5e9fa74d3f52de75fc14cf327851bf Merge: 883e76b a965c0b Author: Eric Wong Date: Tue Jul 13 13:03:57 2010 -0700 Merge commit 'v1.0.1' into 1.1.x-stable * commit 'v1.0.1': unicorn 1.0.1 - bugfixes only SIGHUP deals w/ dual master pid path scenario launcher: do not re-daemonize when USR2 upgrading tee_input: safer record separator ($/) handling commit a965c0bb48d5b92373f939865212641d810c97d7 Author: Eric Wong Date: Tue Jul 13 12:54:26 2010 -0700 unicorn 1.0.1 - bugfixes only The first maintenance release of 1.0.x, this release is primarily to fix a long-standing bug where the original PID file is not restored when rolling back from a USR2 upgrade. Presumably most upgrades aren't rolled back, so it took over a year to notice this issue. Thanks to Lawrence Pit for discovering and reporting this issue. There is also a pedantic TeeInput bugfix which shouldn't affect real apps from the 1.1.x series and a test case fix for OSX, too. commit 2a8c4bea2c39d0a551feb79cb471171cf96a55db Author: Eric Wong Date: Tue Jul 13 08:57:37 2010 +0000 SIGHUP deals w/ dual master pid path scenario As described in our SIGNALS documentation, sending SIGHUP to the old master (to respawn SIGWINCH-ed children) while the new master (spawned from SIGUSR2) is active is useful for backing out of an upgrade before sending SIGQUIT to the new master. Unfortunately, the SIGHUP signal to the old master will cause the ".oldbin" pid file to be reset to the non-".oldbin" version and thus attempt to clobber the pid file in use by the to-be-terminated new master process. Thanks to the previous commit to prevent redaemonization in the new master, the old master can reliably detect if the new master is active while it is reloading the config file. Thanks to Lawrence Pit for discovering this bug. ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com (cherry picked from commit c13bec3449396b21795966101367838161612d61) commit ae1f5e2d331d1714dd1b71d4905b296abf7780d0 Author: Eric Wong Date: Tue Jul 13 08:53:48 2010 +0000 launcher: do not re-daemonize when USR2 upgrading This was accidentally enabled when ready_pipe was developed. While re-daemonizing appears harmless in most cases this makes detecting backed-out upgrades from the original master process impossible. (cherry picked from commit 3f0f9d6d72cf17b34c130b86eb933bbc513b24b3) commit 883e76b12d6034e5750d662c9e4f453888dbd154 Author: Eric Wong Date: Tue Jul 13 08:57:37 2010 +0000 SIGHUP deals w/ dual master pid path scenario As described in our SIGNALS documentation, sending SIGHUP to the old master (to respawn SIGWINCH-ed children) while the new master (spawned from SIGUSR2) is active is useful for backing out of an upgrade before sending SIGQUIT to the new master. Unfortunately, the SIGHUP signal to the old master will cause the ".oldbin" pid file to be reset to the non-".oldbin" version and thus attempt to clobber the pid file in use by the to-be-terminated new master process. Thanks to the previous commit to prevent redaemonization in the new master, the old master can reliably detect if the new master is active while it is reloading the config file. Thanks to Lawrence Pit for discovering this bug. ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com (cherry picked from commit c13bec3449396b21795966101367838161612d61) commit 430c8cc9f8b5f1db9395531df4ebab655da5d958 Author: Eric Wong Date: Tue Jul 13 08:53:48 2010 +0000 launcher: do not re-daemonize when USR2 upgrading This was accidentally enabled when ready_pipe was developed. While re-daemonizing appears harmless in most cases this makes detecting backed-out upgrades from the original master process impossible. (cherry picked from commit 3f0f9d6d72cf17b34c130b86eb933bbc513b24b3) commit aad1fdfc17e2fe1a6308690daf74456877796f51 Author: Eric Wong Date: Thu Jul 8 05:45:22 2010 +0000 tee_input: safer record separator ($/) handling Different threads may change $/ during execution, so cache it at function entry to a local variable for safety. $/ may also be of a non-binary encoding, so rely on Rack::Utils.bytesize to portably capture the correct size. Our string slicing is always safe from 1.9 encoding: both our socket and backing temporary file are opened in binary mode, so we'll always be dealing with binary strings in this class (in accordance to the Rack spec). (cherry picked from commit 1cd698f8c7938b1f19e9ba091708cb4515187939)