From: Zed Shaw Date: 2006-08-26T21:45:36+09:00 Subject: Re: [ANN] Mongrel 0.3.13.4 Pre-Release -- Ruby's LEAK Fixed (Death To Mutex!) On Sat, 2006-08-26 at 18:12 +0900, ara.t.howard@noaa.gov wrote: > On Sat, 26 Aug 2006, Zed Shaw wrote: > > > Howdy Folks, > > > > This release is after painstaking analysis of a memory leak that was > > reported by Bradley Taylor, reduced by myself, and then fixed after much > > work. You should all thank Bradley for finding the bizarre fix. > > if you are really serious about fixing your leak i suggest you re-work your > tests. as i mentioned before they have several race conditions, not least of > which that they both start a random number of threads, not 1000 as the code > suggests (you can easily confirm by printing out the number of times the > thread init loop executes). further, sync.rb is the single ruby lib i've had > memory issues with on production systems. i have never managed to figure out > why that is... Ara, this is uncool. Seriously man, don't e-mail me personally and then e-mail the list the exact same e-mail. Pick one and fight your battle there. As I mentioned to you before, the evidence shows you are wrong. Sure you've cooked up a script that has a memory leak with Sync, but that script doesn't operate the way Mongrel does. The sample I developed does operate the way Mongrel does. It's called a "bug reduction". I'm not going to test the leak in Mongrel with a reduction that doesn't simulate Mongrel. Also, as I said before, this shows the leak: http://pastie.caboo.se/10194 And this script, with just 3 lines changed to use Sync shows it's fixed: http://pastie.caboo.se/10317 With graphs even Ara! Graphs! We ran these tests for 30-40 minutes with hundreds of thousands of threads being cycled during the tests. Not to mention about 8 other people switching to Sync report their leaks fixed, our own test script showing it's fixed, Mongrel tests showing it's fixed, several other frameworks showing it, and you can't argue with the evidence. If your script has a leak then fine, just don't do that. Ultimately though the ruby lang guys need to fix this because either way, there's leaks. For now, Mongrel is not leaking and I'm happy with that. Now, I'd appreciate it if you'd maybe spend your energy looking into the ruby source to find this leak rather than bothering me about it. Thank you. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.