dwSensorCAN_readMessage blocking forever


I am using the dwSensorCAN API to communicate via the aurix.can bus. I can send messages and receive the messages that I configured in the EasyCanConfig file. The problem is that it only works for around 30 seconds.

Suddenly one call to dwSensorCAN_readMessage(&polledMsg, 1000000, canSensor); blocks forever even though I called the API like this many times before.
I create the sensor in the main thread and reading/sending data from in another thread. That is not a problem I assume since these things happen in order.

Any ideas where this behavior is coming from?

Software Version
DRIVE OS Linux 5.1.6
NVIDIA DRIVE™ Software 10.0 (Linux)

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)

Host Machine Version
native Ubuntu 18.04

Hi @richard5 ,
Which sample application do you use? Could you provide the complete command?

I use a custom application

This is the code I use to read out the data from the CAN bus

// poll all externally triggered messages from buffer since we are not interested in them
dwStatus pollingStatus = DW_SUCCESS;
uint32 numMessagesToPoll = 1000;
int64 timeoutMicrosec = timeout.count();
framework::TimePoint const startTime = config.clock->now();
	config.logger->logError("In  dwSensorCAN_readMessage(%d)", timeoutMicrosec);
	dwCANMessage polledMsg;
	pollingStatus = dwSensorCAN_readMessage(&polledMsg, timeoutMicrosec, canSensor);
	config.logger->logError("Out dwSensorCAN_readMessage(%d)", timeoutMicrosec);

	if (stopAtId && pollingStatus == DW_SUCCESS)
		if (polledMsg.id = *stopAtId)
			return polledMsg;

	if (timeoutMicrosec > 0)
		timeoutMicrosec = std::max<int64>(0, (timeout - duration_cast<MicrosecInt64>(config.clock->now() - startTime)).count());
		config.logger->logError("timeoutMicrosec reached 0");

} while (pollingStatus == DW_SUCCESS && numMessagesToPoll > 0);

This method works fine for a few and up to 30 seconds and then the last output I get from the application is
In dwSensorCAN_readMessage(1000000) which means that the dwSensorCAN_readMessage call never returns.

There is no debugger available unfortunately to debug this more in depth right now.

Please check the issue with sample_canbus_logger as a reference and see if find any clue.

Okay I tried the sample_canbus_logger and it worked quite nicely. It uses a timeout of 100,000 µs as default. I changed my code to use 100,000 µs instead of 1,000,000 µs as timeout and now dwSensorCAN_readMessage does not block anymore.
Unfortunately need more than 100,000 µs as timeout but I can workaround that in my code. The important bit is, that it no longer blocks endlessly.
My AGX Xavier DevKit is not set up to compile the samples unfortunately which means I cannot test the sample_canbus_logger with a default interval of 1,000,000 µs to reproduce this properly to file a bug.

It would be great if you could try it in your end.

Please follow /usr/local/driveworks/doc/nvsdk_html/dwx_samples_building_V5L.html page on your host system to cross compile the sample application. Thanks.