freertos-addons icon indicating copy to clipboard operation
freertos-addons copied to clipboard

Valgrind sometimes hangs on waiting on xSentinel

Open KKoovalsky opened this issue 7 years ago • 3 comments

Hi! It's me again with problems with valgrind.

When I run an application under valgrind the application hands on the first xTaskCreate. I debugged the port code and noticed that the code stalls here:

portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{
    ...
        pthread_mutex_unlock( &xSingleThreadMutex );

        while ( xSentinel == 0 );
    ...
}

xSentinel is set inside SIG_SUSPEND signal handler.

Does valgrind spoil somehow the use of signals?

KKoovalsky avatar Aug 27 '18 20:08 KKoovalsky

I've never had valgrind hang for me. It takes forever to start up and execution is much slower, but no hangs. Could you post an example that demonstrates the problem?

michaelbecker avatar Oct 21 '18 18:10 michaelbecker

Hi Guys, I am stuck also on valgrind's serializing of pthreads preventing this linux port from working. Any tips?

abeck70 avatar May 25 '19 03:05 abeck70

Ok actually based on Mike's comments it takes forever, if you wait long enough (minutes hours??), it works well.

abeck70 avatar May 25 '19 07:05 abeck70