flowgrammable/flowsim

buffer exhaustion

Closed this issue · 2 comments

buffer exhaustion
  1. Create a switch profile and set the buffer count to 1
  2. Instantiate a switch from that profile
  3. Create a trace with 2 packets
  4. Watch the second packet throw an exception due to buffer exhaustion

Also, buffers are not released and reallocated on stopping and restarting the simulation.

Also, exception being generated on the first packet ...
TypeError: Cannot read property 'length' of undefined
at Object.fn (scripts.1d0815fd.js:1)
at k.$digest (vendor.755eff2e.js:2)
at k.$apply (vendor.755eff2e.js:2)
at HTMLButtonElement. (vendor.755eff2e.js:2)
at HTMLButtonElement._.event.dispatch (vendor.755eff2e.js:1)
at HTMLButtonElement.q.handle (vendor.755eff2e.js:1)

I believe the problem here is a basic resource leak. Buffers are allocated in arrival, I'm guessing they are not released in egress/groups.

Sub Problems

  1. the weird exception
  2. the lack of reset in general
  3. the failure to release on packet egress (maybe it is releasing)
  4. what multi-packet behavior do we actually want ... not sure