squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Squid |
Unknown
|
Unknown
|
|||
squid (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
High
|
Andreas Hasenack |
Bug Description
[Impact]
Squid doesn't work if "workers" is set in squid.conf.
[Test Case]
* install squid
sudo apt update && sudo apt install squid -y
* apply workaround for #1816006
sudo mkdir -p /var/run/squid
sudo chown proxy:proxy /var/run/squid
* confirm no FATAL errors in logs so far
sudo grep FATAL /var/log/
(empty)
* confirm squid working:
http_proxy=http://
echo $?
0
* add workers config
echo "workers 5" | sudo tee -a /etc/squid/
* to speed the test up a bit, reduce the shutdown timeout
echo "shutdown_lifetime 5 seconds" | sudo tee -a /etc/squid/
* restart squid
sudo systemctl restart squid
* verify new FATAL error in logs
sudo grep FATAL /var/log/
2019/02/28 17:05:04 kid2| FATAL: check failed: ios[0].iov_len == sizeof(data)
2019/02/28 17:05:04 kid4| FATAL: check failed: ios[0].iov_len == sizeof(data)
(...)
* verify squid not working
$ http_proxy=http://
(...)
Connecting to localhost (localhost)
$ echo $?
4
With the updated packages, there is (new) FATAL error in the logs, and wget works just fine with the workers setting.
[Regression Potential]
The fix applies on top of another fix that was used to fix a FTBFS with gcc-8. The full gcc-8 set of fixes is quite big and some are still open, like https:/
[Other Info]
The fix applies on top of another patch from Debian. I chose to use a new patch instead of changing the existing one in order to simplify things, keep a clear dep3 header, and ease maintenance.
There is another pending SRU for squid in bug #1816006, and the test instructions above include a workaround to not hit that bug, otherwise we wouldn't even hit the condition where this bug here occurs. Both will be fixed with one upload,
[Original Description]
Hi,
It seems squid fails when configured with SMP. Steps I took to reproduce:
* spin up a fresh cosmic instance
* add 'workers 5' to /etc/squid/
* sudo service squid restart
Logging shows this:
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:56 juju-be3f45-
| Feb 14 03:39:57 juju-be3f45-
| ubuntu@
| squid:
| Installed: 4.1-1ubuntu3
| Candidate: 4.1-1ubuntu3
| Version table:
| *** 4.1-1ubuntu3 500
| 500 http://
| 100 /var/lib/
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server packageset reviewers: Pending requested
-
Diff: 72 lines (+44/-0)4 files modifieddebian/changelog (+9/-0)
debian/patches/series (+1/-0)
debian/patches/smp-startup-error.patch (+33/-0)
debian/squid.tmpfile (+1/-0)
description: | updated |
Changed in squid (Ubuntu Cosmic): | |
status: | Confirmed → Triaged |
Changed in squid (Ubuntu Cosmic): | |
importance: | Undecided → High |
Changed in squid (Ubuntu Cosmic): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
description: | updated |
Changed in squid (Ubuntu Cosmic): | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
FYI, works fine using Disco. Same config.
| ubuntu@ juju-be3f45- default- 21:~$ apt-cache policy squid nova.clouds. archive. ubuntu. com/ubuntu disco/main amd64 Packages dpkg/status
| squid:
| Installed: 4.4-1ubuntu1
| Candidate: 4.4-1ubuntu1
| Version table:
| *** 4.4-1ubuntu1 500
| 500 http://
| 100 /var/lib/