[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-28 Thread Andreas Hasenack
https://launchpad.net/~ahasenack/+archive/ubuntu/squid-
smp-1815852/+packages has test packages for cosmic with both fixes now
(#1816006 and #1815852).

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815852

Title:
  squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012
  exception location: TypedMsgHdr.cc(70) sync#012

To manage notifications about this bug go to:
https://bugs.launchpad.net/squid/+bug/1815852/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-28 Thread Andreas Hasenack
** Description changed:

  [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/squid/cache.log
  (empty)
  
  * confirm squid working:
  http_proxy=http://localhost:3128/ wget http://www.ubuntu.com -O /dev/null
  echo $?
  0
  
  * add workers config
  echo "workers 5" | sudo tee -a /etc/squid/squid.conf
  
  * to speed the test up a bit, reduce the shutdown timeout
  echo "shutdown_lifetime 5 seconds" | sudo tee -a /etc/squid/squid.conf
  
  * restart squid
  sudo systemctl restart squid
  
  * verify new FATAL error in logs
  sudo grep FATAL /var/log/squid/cache.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://localhost:3128/ wget http://www.ubuntu.com -O /dev/null
  (...)
  Connecting to localhost (localhost)|127.0.0.1|:3128... failed: Connection 
refused.
  $ 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://github.com/squid-cache/squid/pull/270, and triggered some refactoring 
upstream. That being said, this particular change was committed many months ago 
(July 2018) and is already included in Disco in the newer upstream release we 
ship there.
  
  [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, but for now I'll leave the workaround
- instructions in place until I have the other fix done.
+ 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/squid.conf
  
    * sudo service squid restart
  
  Logging shows this:
  
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Starting Squid Cache 
version 4.1 for x86_64-pc-linux-gnu...
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Service Name: squid
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Process ID 10728
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Process Roles: worker
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: With 1024 file 
descriptors available
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Initializing IP 
Cache...
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: DNS Socket created at 
[::], FD 5
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: DNS Socket created at 
0.0.0.0, FD 13
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Adding nameserver 
127.0.0.53 from /etc/resolv.conf
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Adding domain 
lcy02.canonistack from /etc/resolv.conf
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Local cache digest 
enabled; rebuild/rewrite every 3600/3600 sec
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Store logging disabled
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Swap maxSize 0 + 
262144 KB, estimated 20164 objects
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Target number of 
buckets: 1008
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Using 8192 Store 
buckets
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Max Mem  size: 262144 
KB [shared]
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Max Swap size: 0 KB
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Using Least Load store 
dir selection
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Set Current Directory 
to /var/spool/squid
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Logfile: opening log 
daemon:/var/log/squid/access.log
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Logfile Daemon: 
opening log /var/log/squid/access.log
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10723]: Finished loading MIME 
types and icons.
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10723]: FATAL: check failed: 
ios[0].iov_len == sizeof(data)#012exception location: TypedMsgHdr.cc(70) 
sync#012
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10657]: Squid Parent: 

[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-28 Thread Andreas Hasenack
Haw, here is a ppa with test packages for this bug:

sudo add-apt-repository ppa:ahasenack/squid-smp-1815852

It doesn't yet have the fix for the /var/run/squid missing directory,
I'll bring that back into cosmic next.

** Description changed:

  [Impact]
- 
-  * An explanation of the effects of the bug on users and
- 
-  * justification for backporting the fix to the stable release.
- 
-  * In addition, it is helpful, but not required, to include an
-    explanation of how the upload fixes this bug.
+ 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/squid/cache.log
  (empty)
  
  * confirm squid working:
  http_proxy=http://localhost:3128/ wget http://www.ubuntu.com -O /dev/null
  echo $?
  0
  
  * add workers config
  echo "workers 5" | sudo tee -a /etc/squid/squid.conf
  
  * to speed the test up a bit, reduce the shutdown timeout
  echo "shutdown_lifetime 5 seconds" | sudo tee -a /etc/squid/squid.conf
  
  * restart squid
  sudo systemctl restart squid
  
  * verify new FATAL error in logs
  sudo grep FATAL /var/log/squid/cache.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://localhost:3128/ wget http://www.ubuntu.com -O /dev/null
  (...)
  Connecting to localhost (localhost)|127.0.0.1|:3128... failed: Connection 
refused.
  $ echo $?
  4
  
- 
- With the updated packages, there is (new) FATAL error in the logs, and wget 
works just fine with the workers setting.
- 
+ With the updated packages, there is (new) FATAL error in the logs, and
+ wget works just fine with the workers setting.
  
  [Regression Potential]
- 
-  * discussion of how regressions are most likely to manifest as a result
- of this change.
- 
-  * It is assumed that any SRU candidate patch is well-tested before
-    upload and has a low overall risk of regression, but it's important
-    to make the effort to think about what ''could'' happen in the
-    event of a regression.
- 
-  * This both shows the SRU team that the risks have been considered,
-    and provides guidance to testers in regression-testing the SRU.
+ 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://github.com/squid-cache/squid/pull/270, and triggered some refactoring 
upstream. That being said, this particular change was committed many months ago 
(July 2018) and is already included in Disco in the newer upstream release we 
ship there.
  
  [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.
  
-  * Anything else you think is useful to include
-  * Anticipate questions from users, SRU, +1 maintenance, security teams and 
the Technical Board
-  * and address these questions in advance
+ 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.
  
  [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/squid.conf
  
    * sudo service squid restart
  
  Logging shows this:
  
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Starting Squid Cache 
version 4.1 for x86_64-pc-linux-gnu...
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Service Name: squid
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Process ID 10728
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Process Roles: worker
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: With 1024 file 
descriptors available
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Initializing IP 
Cache...
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: DNS Socket created at 
[::], FD 5
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: DNS Socket created at 
0.0.0.0, FD 13
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Adding nameserver 
127.0.0.53 from /etc/resolv.conf
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Adding domain 
lcy02.canonistack from /etc/resolv.conf
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Local cache digest 
enabled; rebuild/rewrite every 3600/3600 sec
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Store logging disabled
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Swap maxSize 0 + 
262144 KB, estimated 

[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-28 Thread Andreas Hasenack
** Description changed:

+ [Impact]
+ 
+  * An explanation of the effects of the bug on users and
+ 
+  * justification for backporting the fix to the stable release.
+ 
+  * In addition, it is helpful, but not required, to include an
+explanation of how the upload fixes this bug.
+ 
+ [Test Case]
+ 
+  * detailed instructions how to reproduce the bug
+ 
+  * these should allow someone who is not familiar with the affected
+package to reproduce the bug and verify that the updated package fixes
+the problem.
+ 
+ [Regression Potential]
+ 
+  * discussion of how regressions are most likely to manifest as a result
+ of this change.
+ 
+  * It is assumed that any SRU candidate patch is well-tested before
+upload and has a low overall risk of regression, but it's important
+to make the effort to think about what ''could'' happen in the
+event of a regression.
+ 
+  * This both shows the SRU team that the risks have been considered,
+and provides guidance to testers in regression-testing the SRU.
+ 
+ [Other Info]
+  
+  * Anything else you think is useful to include
+  * Anticipate questions from users, SRU, +1 maintenance, security teams and 
the Technical Board
+  * and address these questions in advance
+ 
+ [Original Description]
  Hi,
  
  It seems squid fails when configured with SMP. Steps I took to
  reproduce:
  
-   * spin up a fresh cosmic instance
+   * spin up a fresh cosmic instance
  
    * add 'workers 5' to /etc/squid/squid.conf
  
    * sudo service squid restart
  
  Logging shows this:
  
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Starting Squid Cache 
version 4.1 for x86_64-pc-linux-gnu...
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Service Name: squid
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Process ID 10728
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Process Roles: worker
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: With 1024 file 
descriptors available
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Initializing IP 
Cache...
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: DNS Socket created at 
[::], FD 5
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: DNS Socket created at 
0.0.0.0, FD 13
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Adding nameserver 
127.0.0.53 from /etc/resolv.conf
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Adding domain 
lcy02.canonistack from /etc/resolv.conf
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Local cache digest 
enabled; rebuild/rewrite every 3600/3600 sec
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Store logging disabled
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Swap maxSize 0 + 
262144 KB, estimated 20164 objects
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Target number of 
buckets: 1008
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Using 8192 Store 
buckets
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Max Mem  size: 262144 
KB [shared]
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Max Swap size: 0 KB
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Using Least Load store 
dir selection
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Set Current Directory 
to /var/spool/squid
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Logfile: opening log 
daemon:/var/log/squid/access.log
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Logfile Daemon: 
opening log /var/log/squid/access.log
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10723]: Finished loading MIME 
types and icons.
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10723]: FATAL: check failed: 
ios[0].iov_len == sizeof(data)#012exception location: TypedMsgHdr.cc(70) 
sync#012
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10657]: Squid Parent: squid-1 
process 10723 exited with status 255
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10657]: Squid Parent: squid-1 
process 10723 will not be restarted for 3600 seconds due to repeated, frequent 
failures
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Local cache digest 
enabled; rebuild/rewrite every 3600/3600 sec
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: Finished loading MIME 
types and icons.
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Store logging disabled
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10726]: FATAL: check failed: 
ios[0].iov_len == sizeof(data)#012exception location: TypedMsgHdr.cc(70) 
sync#012
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Swap maxSize 0 + 
262144 KB, estimated 20164 objects
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Target number of 
buckets: 1008
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Using 8192 Store 
buckets
  | Feb 14 03:39:56 juju-be3f45-default-20 squid[10728]: Max Mem  size: 262144 
KB [shared]
  | Feb 14 03:39:56 juju-be3f45-default-20 

[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-27 Thread Andreas Hasenack
Thanks Haw! I'll test this next

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815852

Title:
  squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012
  exception location: TypedMsgHdr.cc(70) sync#012

To manage notifications about this bug go to:
https://bugs.launchpad.net/squid/+bug/1815852/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-20 Thread Andreas Hasenack
** Changed in: squid (Ubuntu Cosmic)
 Assignee: (unassigned) => Andreas Hasenack (ahasenack)

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815852

Title:
  squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012
  exception location: TypedMsgHdr.cc(70) sync#012

To manage notifications about this bug go to:
https://bugs.launchpad.net/squid/+bug/1815852/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-20 Thread Andreas Hasenack
** Bug watch added: Squid Bugzilla #4865
   http://bugs.squid-cache.org/show_bug.cgi?id=4865

** Also affects: squid via
   http://bugs.squid-cache.org/show_bug.cgi?id=4865
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815852

Title:
  squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012
  exception location: TypedMsgHdr.cc(70) sync#012

To manage notifications about this bug go to:
https://bugs.launchpad.net/squid/+bug/1815852/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-20 Thread Andreas Hasenack
** Changed in: squid (Ubuntu Cosmic)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815852

Title:
  squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012
  exception location: TypedMsgHdr.cc(70) sync#012

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid/+bug/1815852/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1815852] Re: squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012 exception location: TypedMsgHdr.cc(70) sync#012

2019-02-19 Thread Andreas Hasenack
** Changed in: squid (Ubuntu Cosmic)
   Status: Confirmed => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815852

Title:
  squid FATAL: check failed: ios[0].iov_len == sizeof(data)#012
  exception location: TypedMsgHdr.cc(70) sync#012

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid/+bug/1815852/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs