Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Bugs

[Bug 48094] New: Avoid a race condition by suspending worker threads before closing worker sockets

 

 

Apache bugs RSS feed   Index | Next | Previous | View Threaded


bugzilla at apache

Oct 31, 2009, 11:42 PM

Post #1 of 1 (155 views)
Permalink
[Bug 48094] New: Avoid a race condition by suspending worker threads before closing worker sockets

https://issues.apache.org/bugzilla/show_bug.cgi?id=48094

Summary: Avoid a race condition by suspending worker threads
before closing worker sockets
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: worker
AssignedTo: bugs [at] httpd
ReportedBy: bojan [at] rexursive


Created an attachment (id=24449)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24449)
(Hopefully) safe close_worker_sockets()

Current code closes worker sockets in close_worker_sockets() from the listener
thread without suspending the workers. At the same time, worker threads may be
in the process of doing the same (they may even set worker_sockets[i] to NULL,
causing a segfault in the listener), potentially causing problems.

The attached patch suspends worker threads first and then shuts down sockets,
using shutdown(). This way, worker threads can still proceed later with regular
close, without any side effects.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd

Apache bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.