-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash from manual runtime scheduling of Received CAM messages #181
Comments
Hi @sivasr1, can you please elaborate on your changes to the socktap code? You mention "simultaneous calls" to |
Hi Reibl, Thanks for your reply. we made some changes in link layer part (raw_socket_link.cpp , where a new thread is instantiated which calls function "do_receive") to use quectel service. I have attached a couple of documents with the logs( includes current and previous time stamps at which functions are called , and start of functions ..etc). Thanks |
Okay, multi-threading explains this behaviour: Vanetza is not a thread-safe library, i.e. you can use Vanetza with threads, but you need to add thread synchronization on your own. Instead of adding mutexes everywhere, I suggest having a look at |
Hi Riebl, Sorry for the late reply , I am a novice to boost::asio , not sure if i understood and modified code correctly, In short modified as below:
GDB BackTrace::
Could you please check if my implementation of boost::asio::post is correct ? or would you suggest any other better alternative ? Thanks |
It is hard to "debug" your code with little information. You can fetch the Boos.Asio execution context from
If binding |
Hello everyone,
While we are trying to reproduce the socktap binary with CAM application for DEMO purpose we always get a crash over time from
the function "ManualRuntime::trigger(Clock::time_point tp)" defined in "vanetza/common/manual_runtime.cpp"
This crash (mainly on reception side and rarely on transmission side) happens only after successful processing of many received CAM messages.
From the debugging the main reason for this crash seems to be because of the simultaneous calls to function
"void TimeTrigger::schedule()" defined in "tools/socktap/time_trigger.cpp"
NOTE :: The crash issue is always reproducible , but crash happens quicker if the rate of transmitted messages is high ( example :: 100 milliseconds/1 CAM message). So basically receiving 10 messages in a second runs about 40-60 minutes without any issues but then this crash happens. Once we reduce the rate of the receival of the messages from 10 to 1 in a second then actually our system runs for multiple hours before having the same crash.
Please refer commands below for more information related to GDB back trace and socktap commands usage.
Core issue::
socktap: vanetza/common/manual_runtime.cpp:62: void vanetza::ManualRuntime::trigger(vanetza::Clock::time_point): Assertion `tp >= m_now' failed.
8772 64
Aborted (core dumped)
On Transmission side::
./socktap -a ca -p static --latitude 40.8810 --longitude 29.3433 --pos_confidence 5 --print-tx-cam --cam-interval 100 -i lo --mac-address 00:00:00:00:00:11
On Reception Side::
./socktap -a ca -p static --latitude 40.8810 --longitude 29.3433 --pos_confidence 5 --print-rx-cam -i lo --mac-address 00:00:00:00:00:22
GDB backtrace::
Thanks
Siva
The text was updated successfully, but these errors were encountered: