Search squid archive

Re: cannot leave empty workers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I may concur with the way it is.

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.

Alex




> Subject: Re: [squid-users] cannot leave empty workers
> To: alex_wu2012@hotmail.com; squid-users@lists.squid-cache.org
> From: squid3@treenet.co.nz
> Date: Sat, 25 Jul 2015 12:54:47 +1200
>
> On 25/07/2015 11:53 a.m., Alex Wu wrote:
> > further analysis indicated that master process created quid-ssl_session_cache.shm.
> >
> > 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.
> >
> > Furthermore, the code should be simplied like this:
> >
> > diff --git a/squid-3.5.6/src/ssl/support.cc b/squid-3.5.6/src/ssl/support.cc
> > index 85305ce..0ce95f9 100644
> > --- a/squid-3.5.6/src/ssl/support.cc
> > +++ b/squid-3.5.6/src/ssl/support.cc
> > @@ -2084,9 +2084,6 @@ SharedSessionCacheRr::useConfig()
> > void
> > SharedSessionCacheRr::create()
> > {
> > - if (!isSslServer()) //no need to configure ssl session cache.
> > - return;
> > -
> > int items;
> > items = Config.SSL.sessionCacheSize / sizeof(Ipc::MemMap::Slot);
> > if (items)
> >
> >
> >
> > This code is called in master that may not have configuration to ensure isSsslServer return true.
> >
>
> The bug is in why that SharedSessionCacheRr is not being run by the worker.
>
> AFAIK, it is the way the worker is supposed to attach to the shared
> memory. First process to access the SHM does the create, others attach.
>
> Amos
>
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux