nyuwireless-unipd / ns3-mmwave

ns-3 module for simulating mmWave-based cellular systems. See https://ieeexplore.ieee.org/document/8344116/ (open access) as a reference.
GNU General Public License v2.0
298 stars 193 forks source link

SIGSEGV problem when harq process number in mmwave-phy-mac-common.cc is low #95

Open lgs96 opened 5 years ago

lgs96 commented 5 years ago

Hi, Thank you for providing wonderful simulator. I'm doing my own project with ns3-mmwave. But I found there are some problems in harq process especially when blockage events occur. The problem is this

assert failed. cond="dci.m_harqProcess < m_phyMacConfig->GetNumHarqProcess ()", file=../src/mmwave/model/mmwave-flex-tti-mac-scheduler.cc

The above sentence noticed when I set NumHarqProcess as 10. (I set this value as 100 in default) My objective is to know effects of harq process number, but I cannot find where the bug comes from.. Why is this happen? Is there any problem if harq fails?

Thanks in advance.

tommasozugno commented 5 years ago

Hi, This happens because the maximum number of allowed HARQ process has been reached and you are trying to instantiate a new one. As you can see from the error message, this assert happens here https://github.com/nyuwireless-unipd/ns3-mmwave/blob/103d3788fd4af47b1d9ebbd19b4a8e6dd1170d6c/src/mmwave/model/mmwave-flex-tti-mac-scheduler.cc#L1362 or https://github.com/nyuwireless-unipd/ns3-mmwave/blob/103d3788fd4af47b1d9ebbd19b4a8e6dd1170d6c/src/mmwave/model/mmwave-flex-tti-mac-scheduler.cc#L1488 This is worst in case of blockage because the packet error probability is higher and hence retransmissions are more frequent.

Best, Tommaso

lgs96 commented 5 years ago

Hi, Thank you for detailed explanation. As I understand,

  1. if a blockage makes packet error probability higher, maximum number of allowed HARQ processes are done, but fails to transmit.
  2. Then, HARQ process should be end up and report it as a packet loss event.
  3. But in ns3-mmwave, some error makes it start again but allowed HARQ process is no longer left.
  4. So NS_ASSERT occurs.

I have two question in your reply. Q1. If my consider is right, is there any solution to solve this problem?

Q2. If I enable HARQ process, are there only two results? HARQ success or error with NS_ASSERT after maximum number of allowed HARQ processes.

Thank you for your kind reply again

Goodsol

lgs96 commented 5 years ago

Hi,

I'm sorry that I issue this subject again, but is there no solution of HARQ problem?

tommasozugno commented 5 years ago

Sorry for the delay! The transmission of a packet takes place only if an HARQ process is available. In principle, when all the processes are busy you should wait until one is available. You should modify the classes implementing the MAC layer in such a way to achieve this behavior.

Best, Tommaso

lgs96 commented 5 years ago

Hi,

Thank you for reply.

I'll close this issue if I get the solution of this problem.

Really thank you!

tommasozugno commented 5 years ago

You are welcome! If you want you can open a PR with your solution so that it can be integrated in the main branch, it would be a nice contribution :)

GitLingling commented 3 years ago

I had this problem today, is this solved? In addition, "modify the classes implementing the MAC layer in such a way to achieve this behavior." , I wonder if this means to customize the MAC layer code? I found that setting numHarqProcesses in the paper, will this param help?

thanks in advance.