Re: [squid-users] SIGBUS attempting to use rock

2019-10-18 Thread Alex Rousskov
On 10/18/19 10:25 AM, Antonio SJ Musumeci wrote: > I'd be happy to post this on squid-dev / submit a pull request. Please do, assuming you are willing to do the legwork necessary to go from a proof of concept (that has already changed several times during this short discussion!) to the final offi

Re: [squid-users] SIGBUS attempting to use rock

2019-10-18 Thread Antonio SJ Musumeci
On 10/18/2019 9:49 AM, Alex Rousskov wrote: Actually, the location of shared memory segments is chosen by the OS. Not all OSes do what Linux does. The code dealing with [naming] shared memory segments is more complicated than you probably imagine. However, let's not spend time arguing about these

Re: [squid-users] SIGBUS attempting to use rock

2019-10-18 Thread Alex Rousskov
On 10/17/19 7:13 PM, Antonio SJ Musumeci wrote: > On 10/17/2019 5:47 PM, Alex Rousskov wrote: >> Unfortunately, a simple implementation may produce a lot of false >> warnings in some environments while a quality implementation may not be >> as easy as you think: Accessing free space info may requir

Re: [squid-users] SIGBUS attempting to use rock

2019-10-17 Thread Antonio SJ Musumeci
On 10/17/2019 5:47 PM, Alex Rousskov wrote: Unfortunately, a simple implementation may produce a lot of false warnings in some environments while a quality implementation may not be as easy as you think: Accessing free space info may require special permissions and correctly accounting for the ex

Re: [squid-users] SIGBUS attempting to use rock

2019-10-17 Thread Alex Rousskov
On 10/17/19 5:07 PM, Antonio SJ Musumeci wrote: > the option is listed in relation to SMP and not referenced by rock docs. The second paragraph in cache_dir rock directive documentation implies SMP -- it talks about various processes that rock uses to avoid locking (if it can). SMP usage is the p

Re: [squid-users] SIGBUS attempting to use rock

2019-10-17 Thread Antonio SJ Musumeci
I'm currently unable to test fully due to my environment lacking CAP_IPC_LOCK. It does fail more gracefully saying it can't use mlock at all. That said... the option is listed in relation to SMP and not referenced by rock docs. Also it should be possible to check /dev/shm's free space and comp

Re: [squid-users] SIGBUS attempting to use rock

2019-10-17 Thread Alex Rousskov
On 10/17/19 12:28 PM, Antonio SJ Musumeci wrote: > After a lot of tinkering and turning on full debug I realized the reason > rock was failing for me in my container was due to the small default SHM > size allocated by Docker. Increasing the SHM size with `--shm-size` > fixed the issue. > > It'd

[squid-users] SIGBUS attempting to use rock

2019-10-17 Thread Antonio SJ Musumeci
I'm sending this out for those that might run into this in the future. After a lot of tinkering and turning on full debug I realized the reason rock was failing for me in my container was due to the small default SHM size allocated by Docker. Increasing the SHM size with `--shm-size` fixed the