Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* [ANN] unicorn 0.96.1 - leak fix for Rainbows!/Zbatery
@ 2010-02-13 10:34 Eric Wong
  2010-02-13 10:37 ` [ANN] Rainbows! 0.90.2 - leak fix from Unicorn Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2010-02-13 10:34 UTC (permalink / raw)
  To: ruby-talk ML, mongrel-unicorn, rainbows-talk

First off, this memory leak doesn't affect Unicorn itself at all
(but it doesn't hurt, either).

Unicorn itself always allocates the HttpParser once and always reuses it
in every sequential request.

This leak only affects applications that repeatedly allocate a new HTTP
parser.  Thus this bug affects _all_ deployments of Rainbows! and
Zbatery.  These servers allocate a new parser for every client
connection to serve clients concurrently, but due to a bug in Unicorn,
never allows the Ruby GC to properly free the memory allocated.

Here's what happened:

  I misread the Data_Make_Struct()/Data_Wrap_Struct()
  documentation and ended up passing NULL as the "free" argument
  instead of -1, causing the memory to never be freed.

  From README.EXT in the MRI source which I misread:
  > The free argument is the function to free the pointer
  > allocation.  If this is -1, the pointer will be just freed.
  > The functions mark and free will be called from garbage
  > collector.

Yes, I suck at reading and can't write code properly as a result.

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

-- 
Eric Wong



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ANN] Rainbows! 0.90.2 - leak fix from Unicorn
  2010-02-13 10:34 [ANN] unicorn 0.96.1 - leak fix for Rainbows!/Zbatery Eric Wong
@ 2010-02-13 10:37 ` Eric Wong
       [not found]   ` <20100213103757.GB7833-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2010-02-13 10:37 UTC (permalink / raw)
  To: ruby-talk ML, rainbows-talk

This release depends on Unicorn 0.96.1 for an updated
Unicorn::HttpParser to avoid leaking memory.

The HttpParser in Unicorn <= 0.96.0 did not setup the parser
object properly to be freed by the garbage collector.

While this bug did not affect Unicorn itself, Rainbows!
allocates a new Unicorn::HttpParser object for every new client
connection and Unicorn did not properly setup the parser object
to be freed by the Ruby garbage collector.

There are also minor cosmetic cleanups and fixes:

Eric Wong (10):
      http_response: disallow blank, multi-value headers
      Fix "rainbows -h" and "rainbows -v"
      Update docs + tests to reflect Rev 0.3.2 release
      local.mk.sample: bump Rack dependency
      Merge branch 'rack-1.1'
      add Cramp integration tests
      Rakefile: autoload Gem
      t/bin/*: encoding should be the first line after shebang
      gemspec: bump dependency on Unicorn to avoid leak
      Rainbows! 0.90.2

* http://rainbows.rubyforge.org/
* rainbows-talk@rubyforge.org
* git://git.bogomips.org/rainbows.git

-- 
Eric Wong



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ANN] Zbatery 0.1.1 - leak fix from Unicorn
       [not found]   ` <20100213103757.GB7833-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
@ 2010-02-13 10:39     ` Eric Wong
  2010-03-01 18:55       ` [ANN] Rainbows! 0.91.0 - Unicorn resync Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2010-02-13 10:39 UTC (permalink / raw)
  To: ruby-talk, rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Unicorn had a memory leak that didn't affect Unicorn, but only
Rainbows!, so we bumped the dependency on Rainbows!  which in turn
bumped the dependency on Unicorn...

Also some minor documentation updates.

* http://zbatery.bogomip.org/
* rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
* git://git.bogomips.org/zbatery.git

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ANN] Rainbows! 0.91.0 - Unicorn resync
@ 2010-03-01 18:55       ` Eric Wong
  2010-03-01 18:58         ` [ANN] Zbatery 0.2.0 - Unicorn/Rainbows! resync Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2010-03-01 18:55 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw, ruby-talk

Rainbows! is an HTTP server for sleepy Rack applications.  It is based on
Unicorn, but designed to handle applications that expect long
request/response times and/or slow clients.  For Rack applications not
heavily bound by slow external network dependencies, consider Unicorn
instead as it simpler and easier to debug.

* http://rainbows.rubyforge.org/
* rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
* git://git.bogomips.org/rainbows.git

Changes:

Unicorn 0.97.0 has a bunch of internal cleanups and small fixes
and this is mainly to resync with those changes.

keepalive_timeout now defaults to 5 seconds (from 2 seconds
previous).  This should help out clients on slower connections.

Some small fixes and cleanups:

* Rainbows::Fiber::IO objects may leak if a rare app uses them
  explicitly with FiberSpawn/FiberPool-only (not RevFiberSpawn)

* quiet down ENOTCONN handling, there's nothing we can do about
  this error so we won't fill our logs with it.

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ANN] Zbatery 0.2.0 - Unicorn/Rainbows! resync
  2010-03-01 18:55       ` [ANN] Rainbows! 0.91.0 - Unicorn resync Eric Wong
@ 2010-03-01 18:58         ` Eric Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2010-03-01 18:58 UTC (permalink / raw)
  To: ruby-talk ML, rainbows-talk

Zbatery is an HTTP server for Rack applications on systems that either
do not support fork(), or have no memory (nor need) to run the
master/worker model.  It is based on Rainbows! (which is based on
Unicorn (which is based on Mongrel)) and inherits parts of each.
Zbatery supports your choice of all the thread/fiber/event/actor-based
concurrency models and Rack middleware that Rainbows! supports (or will
ever support) in a single process.

* http://zbatery.bogomip.org/
* rainbows-talk@rubyforge.org
* git://git.bogomips.org/zbatery.git

This release resyncs against the latest features/cleanups
in Unicorn 0.97.0 and Rainbows! 0.91.0

-- 
Eric Wong



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-01 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13 10:34 [ANN] unicorn 0.96.1 - leak fix for Rainbows!/Zbatery Eric Wong
2010-02-13 10:37 ` [ANN] Rainbows! 0.90.2 - leak fix from Unicorn Eric Wong
     [not found]   ` <20100213103757.GB7833-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2010-02-13 10:39     ` [ANN] Zbatery 0.1.1 " Eric Wong
2010-03-01 18:55       ` [ANN] Rainbows! 0.91.0 - Unicorn resync Eric Wong
2010-03-01 18:58         ` [ANN] Zbatery 0.2.0 - Unicorn/Rainbows! resync Eric Wong

Code repositories for project(s) associated with this inbox:

	../../../rainbows.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).