[Click] minor Hub bug
Eddie Kohler
kohler at cs.ucla.edu
Mon Aug 10 18:32:11 EDT 2009
Hi Ian,
Thanks very much for this bug report & patch -- the fix is in!
Eddie
Ian Rose wrote:
> Hello,
>
> I have a simple Hub element bug to report, but I'm not sure what the
> proper avenue for that is...
>
> Synposis: Hub will memory leak if used with only 1 input/output pair.
>
> Here is a configuration that will demonstrate the problem:
>
>> FromDump(<some big pcap file>, STOP true)
>> -> cnt::Counter
>> -> hub::Hub
>> -> Print("hub output 0 (should never happen)")
>> -> Discard;
>>
>> DriverManager(pause,
>> read cnt.count,
>> print "exitting in 10s",
>> wait 10,
>> print "goodbye");
>
> Once you see "exitting in 10s", go check the process' memory footprint
> and it should be quite large. If you add a second input/output pair to
> the Hub element in this configuration, the problem should disappear.
> Here is a proposed patch:
>
>> --- click-1.7.0rc1/elements/standard/hub.cc 2009-03-05 21:10:15.000000000 -0500
>> +++ hub.cc 2009-07-24 14:44:41.236995000 -0400
>> @@ -42,6 +42,8 @@
>> if (q)
>> output(i).push(q);
>> }
>> +
>> + if (n == 0) p->kill();
>> }
>>
>> CLICK_ENDDECLS
>
> cheers,
> Ian
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list