[PATCH 01/15] Start the thread pools as the last init item before the main loop.

Martin Blix Grydeland martin at varnish-software.com
Wed Nov 7 12:32:04 CET 2012


This should solve the potential race existing now, where the worker
threads may start handling connections before a lot of the
initialization routines has been done.
---
 bin/varnishd/cache/cache_main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index ac36308..73f965e 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -204,7 +204,6 @@ child_main(void)
 	VBE_InitCfg();
 	VBP_Init();
 	WRK_Init();
-	Pool_Init();
 
 	EXP_Init();
 	HSH_Init(heritage.hash);
@@ -228,6 +227,8 @@ child_main(void)
 	if (FEATURE(FEATURE_WAIT_SILO))
 		SMP_Ready();
 
+	Pool_Init();
+
 	CLI_Run();
 
 	STV_close();
-- 
1.7.9.5




More information about the varnish-dev mailing list