|
Patch: backend clobber prevention: msg#00015web.server.perlbal.general
I swear I sent this patch out a while ago, but it isn't in the latest SVN perlbal code and it just bit us in the butt again, now that we're updating to it. There is a condition where a ClientProxy can be given a new Backend C, but its old Backend B retains a reference to the ClientProxy. When the Backend B is closed, it tries to null out the ClientProxy's reference to the Backend B, but actually ends up clobbering the ClientProxy's reference to Backend C. This results in a horrible memory leak when you're serving up big files like we are. Anyway.. the attached patch fixes it. Eric... Index: BackendHTTP.pm =================================================================== --- BackendHTTP.pm (revision 559) +++ BackendHTTP.pm (working copy) @@ -138,7 +138,10 @@ # tell our client that we're gone if (my $client = $self->{client}) { - $client->backend(undef); + # don't clobber any other backend + if ($client->backend() && $self == $client->backend()) { + $client->backend(undef); + } $self->{client} = undef; } |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Writing hooks for Perlbal: 00015, Raistlin Majere |
|---|---|
| Next by Date: | perlbal crash: 00015, dormando |
| Previous by Thread: | Perlbal as an accelerator for dynamic-but-cachable contenti: 00015, Jake |
| Next by Thread: | perlbal crash: 00015, dormando |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |