Project

General

Profile

Bug #1823

incorrect use of thread conditions leads to race conditions

Added by peto almost 11 years ago. Updated over 10 years ago.

Status:
Fixed
Priority:
Urgent
Assignee:
-
Category:
core
Target version:
Start date:
2008-11-18
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

joblist_queue_thread uses g_cond_wait incorrectly. The mutex must be locked before the call; otherwise, it does nothing and the mutex is never locked. This may not be tripping errors because slower error-checking mutexes aren't being used; having debug builds compile with G_ERRORCHECK_MUTEXES enabled may help expose problems like this (havn't tested).

This fixes problems with connections getting stuck in an inconsistent state, with in_joblist set but not actually in either joblist, effectively leaking the connection and its fds permanently.

lighttpd-r2357-fix-cond.diff (703 Bytes) lighttpd-r2357-fix-cond.diff peto, 2008-11-18 03:41

Associated revisions

Revision 2539 (diff)
Added by stbuehler over 10 years ago

Fix race condition with joblist thread condition/mutex (thx peto, fixes #1823)

History

#1

Updated by stbuehler over 10 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2539.

Also available in: Atom