Segmentation fault in inet::Chunk::peek() just in Qtenv at Express speed and in CmdEnv

24 views
Skip to first unread message

DAVIDE SAVARRO

unread,
Oct 26, 2022, 3:51:46 AM10/26/22
to OMNeT++ Users

I am having a Segmentation fault starting in the Chunk::peek() method when reading the chunk from a TCP Packet (called from the socketDataArrived() method of an application extending the TcpBasicClientApp of INET).
The strange thing is that I get this error just when using the "Express" speed in Qtenv or using Cmdenv, but at regular or "Fast Run" speed the simulation works fine until the end. I also experience this issue when using 3 clients or more and with 2 or less everything works fine.
Img.png

To reproduce the issue

  1. Clone the following repository: https://github.com/Dosclic98/MQTT_MMS_Medium
  2. Swich on the "dev" branch.
  3. After setting all up just run the "MMS_MIMT_Wired_TEST" configuration, as I said i experience the bug just in Qtenv at Express simulation speed or in Cmdenv. You can also start the simulation at regular speed and just after you set the Express speed the segmentation fault appears.

Levente Mészáros

unread,
Oct 26, 2022, 5:05:59 AM10/26/22
to omn...@googlegroups.com
In ClientEvilComp::socketDataArrived the call to TcpAppBase::socketDataArrived deletes the packet.
So you are peeking a chunk from a packet that is already deleted.

Regards,
levy

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/704a2b07-69c8-41cf-bea6-5f247e56878cn%40googlegroups.com.

DAVIDE SAVARRO

unread,
Oct 26, 2022, 5:36:34 AM10/26/22
to OMNeT++ Users
That was it, I missed that, thanks a lot!

Best Regards.

Davide Savarro
Reply all
Reply to author
Forward
0 new messages