<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I may concur with the way it is.<br><br>For shared memory, if it is created by worker, it might trigger a race condition. Also, the size of shared segment is fixed across all processes, so each worker cannot create a different size of shared memory. So the current code simply lets master process create it, and wokrer just attaches to it.<br><br>Alex<br><br><br><br /><br /><div>> Subject: Re: [squid-users] cannot leave empty workers<br>> To: alex_wu2012@hotmail.com; squid-users@lists.squid-cache.org<br>> From: squid3@treenet.co.nz<br>> Date: Sat, 25 Jul 2015 12:54:47 +1200<br>> <br>> On 25/07/2015 11:53 a.m., Alex Wu wrote:<br>> > further analysis indicated that master process created quid-ssl_session_cache.shm.<br>> > <br>> > In other words, it needs a https_port or http_port with ssl-bump in outside any process number to create this shared memeory segment.<br>> > <br>> > Furthermore, the code should be simplied like this:<br>> > <br>> > diff --git a/squid-3.5.6/src/ssl/support.cc b/squid-3.5.6/src/ssl/support.cc<br>> > index 85305ce..0ce95f9 100644<br>> > --- a/squid-3.5.6/src/ssl/support.cc<br>> > +++ b/squid-3.5.6/src/ssl/support.cc<br>> > @@ -2084,9 +2084,6 @@ SharedSessionCacheRr::useConfig()<br>> > void<br>> > SharedSessionCacheRr::create()<br>> > {<br>> > - if (!isSslServer()) //no need to configure ssl session cache.<br>> > - return;<br>> > -<br>> > int items;<br>> > items = Config.SSL.sessionCacheSize / sizeof(Ipc::MemMap::Slot);<br>> > if (items)<br>> > <br>> > <br>> > <br>> > This code is called in master that may not have configuration to ensure isSsslServer return true.<br>> > <br>> <br>> The bug is in why that SharedSessionCacheRr is not being run by the worker.<br>> <br>> AFAIK, it is the way the worker is supposed to attach to the shared<br>> memory. First process to access the SHM does the create, others attach.<br>> <br>> Amos<br>> <br></div> </div></body>
</html>