Closed jenny-cheung closed 3 years ago
The relevant code is shown here. Also, I search the keyword pthread_mutex_unlock(&timer_mutex);
in the repo but it shows nothing matched.
void
pthread_usleep_np(unsigned long usec)
{
....;
pthread_mutex_lock(&timer_mutex);
err = pthread_cond_timedwait(&timer_cond, &timer_mutex, &timeout);
pthread_setcanceltype(type,NULL);
pthread_testcancel();
#else
usleep(usec);
#endif
return;
}
Does this happen on Solaris?
@JoeDog Hi, this is found by static code scanner, which warns that the lock is not released in the thread. Thank you for your checking.
https://github.com/JoeDog/siege/blob/f69b44511d61db6fd3a0cd6f8684e2eef2406516/src/util.c#L230
Fixed in 4.1.1
Thank you!
Dear developers: First, thank you for your checking. It seems the lock &timer_mutex hasn't been released through the program.
https://github.com/JoeDog/siege/blob/f69b44511d61db6fd3a0cd6f8684e2eef2406516/src/util.c#L230