You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to be caused by a call to glob() with flags GLOB_NOSORT when there are no matches. Instead of returning with error, it keeps going. Adding GLOB_ERR to the flags stops the hang, but this may not be the desired behaviour.
Nevermind, seems to be a timing issue between threads. Valgrind changes the way memory is accessed and perhaps this is in causing issues with the threads. Unfortunately this limites the effectiveness of using valgrind to source memoery errors! This wasn't always the case, I wonder if I've done something wrong somewhere...
Valgrind seems to force a program to run in single thread[1,2], and so my waits were affecting the flow of the program and causing it to halt when the wait didn't release control to the thread it was waiting on.
These waits are in the main thread waiting on the status of a sensor thread to come to a ready state (set by flag in a common struct). I spinlock the main thread while (!var) usleep(100);. However, usleep is non-blocking and so this issue should not arise.
Valgrind's drd looks like a promising tool to debug this issue.
Running valgrind on the exe causes it to hang setting up sensor threads.
The text was updated successfully, but these errors were encountered: