Squid with aufs or diskd crashes

Hi everyone!
I encountered with a problem when I had tried to set up a proxy server. I installed fresh FreeBSD 10.0-RELEASE amd64, then installed www/squid33. The problem is squid goes down immediately if I want to use AUFS store type instead of traditional UFS. Squid can't even perform ' squid -z' to initialize cache directory. Segfault and core dumped.
Bad.

So, I tried to set cache_dir to diskd. Good, it works... for a first glance. Diskd went down after some time with small load. Again and again. In the end squid exited with 'Exiting due to repeated, frequent failures' message.

Config is simple:
Code:
visible_hostname bla-bla
http_access allow all
http_port 3128
cache_dir (ufs|aufs|diskd) /var/squid/cache 10240 16 256
I performed some testing with i386/amd64, here is result:

FreeBSD 10.0-RELEASE amd64 and i386
ufs - works well
aufs - goes down, can't do 'squid -z'
diskd - works for some time, then goes down

FreeBSD 9.2-RELEASE amd64 and i386
ufs - works well
aufs - works well (!!!!!)
diskd - works for some time, then goes down

Can anybody confirm such behaviour?
Or I do something wrong?
 
In case of diskd there were such messages in cache.log
Code:
...
2014/01/30 16:27:04 kid1| storeDiskdSend: msgsnd: (35) Resource temporarily unavailable
2014/01/30 16:27:04 kid1| storeDiskdSend WRITE: (35) Resource temporarily unavailable
2014/01/30 16:27:04 kid1| avoid write on theFile with error
2014/01/30 16:27:04 kid1| calling free_func for 0x806fad020
2014/01/30 16:27:04 kid1| avoid write on theFile with error
2014/01/30 16:27:04 kid1| calling free_func for 0x806faf020
2014/01/30 16:27:04 kid1| avoid write on theFile with error
2014/01/30 16:27:04 kid1| calling free_func for 0x806fb1020
2014/01/30 16:27:04 kid1| avoid write on theFile with error
2014/01/30 16:27:04 kid1| calling free_func for 0x806fb3020
FATAL: Received Segment Violation...dying.

UPD.
I found this page http://wiki.squid-cache.org/Features/DiskDaemon
I added to /boot/loader.conf these values
Code:
kern.ipc.msgmnb=8192
kern.ipc.msgssz=64
kern.ipc.msgtql=2048
(other sysctls are already have suitable values)
then rebooted, and diskd works good.
So, it's my fault about diskd. =)

But aufs still doesn't work at all! I.e. aufs works under 9.2-RELEASE, but crashes under 10.0-RELEASE.
 
I can confirm what you've found. I used www/squid33 for years with aufs and then there were some changes made to the port to allow it to be compiled with clang on FreeBSD 10. It just crashes with signal 11 when you try and run things like squid -z. I never actually got around to reporting it though. Probably worth sending in a problem report.
 
xtaz said:
I can confirm what you've found. I used www/squid33 for years with aufs and then there were some changes made to the port to allow it to be compiled with clang on FreeBSD 10. It just crashes with signal 11 when you try and run things like squid -z. I never actually got around to reporting it though. Probably worth sending in a problem report.
Thank you! What's better: write a PR or write to freebsd-stable?
 
Mox said:
What's better: write a PR or write to freebsd-stable?
It won't hurt to do both. You can refer to the PR in the email to the mailing list. The PR is mainly there to keep track of bugs and fixes. The mailing lists are usually used for discussions on how to fix them.
 
Although freebsd-ports is probably better than freebsd-stable for that. I'll definitely be interested in a fix for this. But I unfortunately never reported it at the time because I don't actually use squid very often so forgot about it until I read this thread. Thanks!
 
Back
Top