OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000110INET FrameworkBasepublic2009-10-09 22:472009-10-17 10:21
Reporterkyeongsoo 
Assigned Torhornig 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000110: ASSERT failure in "TCPVirtualDataRcvQueue" module
DescriptionA strange error happens for a certain run number all the time with attached "test.ini" and "ECRTest.ned" under "examples/inet/nclients".

With the said configurations, I ran batch simulation with the help of "opp_runall" (e.g., make -f Runfile) and got the following error for Run 5 (with $n =6):
==================================================================

...

<!> Error in module (TCP) ECRTest.cli[0].tcp (id=66): User error: ASSERT: condition i->begin<i->end false in function extractTo, transport/tcp/queues/TCPVirtualDataRcvQueue.cc line 147.

undisposed object: (GenericAppMsg) ECRTest.cli[0].tcp.data -- check module destructor
undisposed object: (TCPSegment) ECRTest.cli[0].tcp.data(l=351,1msg) -- check module destructor

End.
make: *** [r5] Error 1
==================================================================

With the attached files, you can reproduce this error using the following command under "examples/inet/nclients" directory:
./run -f test.ini -u Cmdenv -c EcrStudyWithWebTraffic -r 5

Tricky thing is that the above error occurs only with "numRequestsPerSession=exponential(5)" and with "n=6".
The original setting of "numRequestsPerSession=1" or even with "...=exponential(6)" or "...=exponential(7)", the total 10 runs go just ok.
Even with "numRequestsPerSession=exponential(5)", there is no such error for other values of "n" (i.e., number of clients).
Additional InformationNote that the attached file "configurations.txt" includes both "test.ini" and "ECRTest.ned" (you need to save relevant portions into separate files!).
TagsNo tags attached.
Attached Filestxt file icon configurations.txt [^] (5,295 bytes) 2009-10-09 22:47 [Show Content]
jpg file icon omnetpp_cli.JPG [^] (62,738 bytes) 2009-10-10 11:56


jpg file icon omnetpp_debug.JPG [^] (97,439 bytes) 2009-10-10 11:56


diff file icon mypatch.diff [^] (994 bytes) 2009-10-16 18:54 [Show Content]

- Relationships

-  Notes
(0000183)
kyeongsoo (reporter)
2009-10-10 11:57

I uploaded two screenshots -- one for the command line interface and the other for eclipse debugger -- when the simulation terminates.
(0000185)
kyeongsoo (reporter)
2009-10-15 17:16

I just found out what's the cause of the problem: In current OMNeT++ TCP implementation (esp. in receiver queue management), sequence numbering operation (i.e., comparison of two numbers) is not based on "modulo 2^32" operation specified by Sec. 3.3 of RFC 793.

Below are debugging messages (I implemented them for tracking this bug) just before the said ASSERT-related crash:
=============================================================================
...
** Event #3979008 T=2653679.155857168058 Elapsed: 207.208s (3m 27s) 73% completed
     Speed: ev/sec=24040 simsec/sec=14046.1 ev/simsec=1.7115
     Messages: created: 1038661 present: 55 in FES: 7

DEBUG: We have problem with TCPSegment!
DEBUG: - Segment seq. number: 4294967145
DEBUG: - Segment payload length: 351

DEBUG: info(): rcv_nxt=4294967145 0 msgsrcv_nxt=200 [4294967145..200)

** Event #3999570 T=2662900.821600571053 Elapsed: 1032.909s (17m 12s) 73% completed
     Speed: ev/sec=24.9025 simsec/sec=11.1683 ev/simsec=2.22975
     Messages: created: 1043851 present: 60 in FES: 7

<!> Error in module (TCP) ECRTest.cli[0].tcp (id=66): User error: ASSERT: condition i->begin<i->end false in function extractTo, transport/tcp/queues/TCPVirtualDataRcvQueue.cc line 214.

undisposed object: (GenericAppMsg) ECRTest.cli[0].tcp.data -- check module destructor
undisposed object: (TCPSegment) ECRTest.cli[0].tcp.data(l=351,1msg) -- check module destructor

End.
=============================================================================

The above problem happens in "TCPVirtualDataRcvQueue::insertBytesFromSegment(TCPSegment *tcpseg)" as follows:
=============================================================================
...

    merge(tcpseg->getSequenceNo(), tcpseg->getSequenceNo()+tcpseg->getPayloadLength());
    if (seqGE(rcv_nxt, regionList.begin()->begin))
        rcv_nxt = regionList.begin()->end;
...
=============================================================================

I will make patches for this and report them shortly!
(0000186)
kyeongsoo (reporter)
2009-10-16 18:56

I attached a small patch file to correct sequence number comparison in the ASSERT statement in line 147.
(0000187)
rhornig (administrator)
2009-10-17 10:21

Added patch to the master branch. Thank you.

- Issue History
Date Modified Username Field Change
2009-10-09 22:47 kyeongsoo New Issue
2009-10-09 22:47 kyeongsoo File Added: configurations.txt
2009-10-10 11:56 kyeongsoo File Added: omnetpp_cli.JPG
2009-10-10 11:56 kyeongsoo File Added: omnetpp_debug.JPG
2009-10-10 11:57 kyeongsoo Note Added: 0000183
2009-10-15 17:16 kyeongsoo Note Added: 0000185
2009-10-16 18:54 kyeongsoo File Added: mypatch.diff
2009-10-16 18:56 kyeongsoo Note Added: 0000186
2009-10-17 10:21 rhornig Note Added: 0000187
2009-10-17 10:21 rhornig Status new => resolved
2009-10-17 10:21 rhornig Resolution open => fixed
2009-10-17 10:21 rhornig Assigned To => rhornig


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker