inet-tub / ns3-datacenter

104 stars 32 forks source link

core dumped when running PowerTCP simulation #15

Closed HeRaNO closed 5 months ago

HeRaNO commented 6 months ago

When running workload simulation of PowerTCP with NS3_SANITIZE on, it says

ns3-datacenter-master/simulator/ns-3.39/examples/PowerTCP/powertcp-evaluation-workload.cc:212:9: runtime error: null pointer passed as argument 1, which is declared to never be null
AddressSanitizer:DEADLYSIGNAL

After investigating, there may be something wrong at:

https://github.com/inet-tub/ns3-datacenter/blob/master/simulator/ns-3.39/examples/PowerTCP/powertcp-evaluation-workload.cc#L1105-L1106

Another use after free:

https://github.com/inet-tub/ns3-datacenter/blob/master/simulator/ns-3.39/src/point-to-point/model/rdma-hw.cc#L989-L991

HeRaNO commented 6 months ago

For the first one, it seems that the pfc.txt file isn't properly created. So delete these lines or make a mix/ directory under ns-3.39/ can fix it.

For the second one, maybe we should put the erase after qp->m_baseRtt calculation.


There're also too many leaks after fixing them:

evaluation-dcqcn.out
=================================================================
==28210==ERROR: LeakSanitizer: detected memory leaks

Too many leaks! Only the first 5000 leaks encountered will be reported.
Indirect leak of 236659584 byte(s) in 4930408 object(s) allocated from:

<lots of leaks...>

SUMMARY: AddressSanitizer: 240023848 byte(s) leaked in 5023997 allocation(s).
HeRaNO commented 5 months ago

gentle /ping @vamsiDT

vamsiDT commented 5 months ago

Hi @HeRaNO, thanks for the fix. I merged your pull request. Would it solve the above issues? I will take a look otherwise. Please let me know. Thanks!

HeRaNO commented 5 months ago

@vamsiDT Hi and yes, it will fix all of the issues mentioned above (except the Too many leaks! one, I can't locate all the leak points...), and it works well on my machine.

Some of the results (fairness):

hpcc powerDelay powerInt