Bionic verification
arm system:
root@bionic-haproxy-1804069:~# uname -a
Linux bionic-haproxy-1804069 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29
16:32:18 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
using affected package at first:
root@bionic-haproxy-1804069:~# apt-cache policy haproxy
haproxy:
Installed: 1.8.8-1ubuntu0.3
Candidate: 1.8.8-1ubuntu0.3
Version table:
*** 1.8.8-1ubuntu0.3 500
500 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64
Packages
wget fails as expected:
root@bionic-haproxy-1804069:~# wget -t1 http://localhost:8080
--2019-02-06 11:57:56-- http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... No data received.
Giving up.
root@bionic-haproxy-1804069:~# echo $?
4
haproxy logs show errors:
Feb 6 11:57:57 bionic-haproxy-1804069 haproxy[10191]: [ALERT] 036/115744
(10191) : Current worker 10192 exited with code 135
Feb 6 11:57:57 bionic-haproxy-1804069 haproxy[10191]: [ALERT] 036/115744
(10191) : exit-on-failure: killing every workers with SIGTERM
Feb 6 11:57:57 bionic-haproxy-1804069 haproxy[10191]: [WARNING] 036/115744
(10191) : All workers exited. Exiting... (135)
Using updated package:
root@bionic-haproxy-1804069:~# apt-cache policy haproxy
haproxy:
Installed: 1.8.8-1ubuntu0.4
Candidate: 1.8.8-1ubuntu0.4
Version table:
*** 1.8.8-1ubuntu0.4 500
500 http://ports.ubuntu.com/ubuntu-ports bionic-proposed/main arm64
Packages
wget now works:
root@bionic-haproxy-1804069:~# wget -t1 http://localhost:8080
--2019-02-06 12:00:17-- http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10918 (11K) [text/html]
Saving to: ‘index.html’
index.html
100%[================================================================================================================================>]
10.66K --.-KB/s in 0s
2019-02-06 12:00:17 (165 MB/s) - ‘index.html’ saved [10918/10918]
root@bionic-haproxy-1804069:~# echo $?
0
and haproxy logs stay silent.
bionic verification succeeded
--
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1804069
Title:
haproxy fails on arm64 due to alignment error
Status in haproxy package in Ubuntu:
Fix Released
Status in haproxy source package in Bionic:
Fix Committed
Status in haproxy source package in Cosmic:
Fix Committed
Bug description:
[Impact]
haproxy as shipped with bionic and cosmic doesn't work on arm64
architectures, crashing the moment it serves a request.
[Test Case]
* install haproxy and apache in an up-to-date ubuntu release you are testing,
in an arm64 system:
sudo apt update && sudo apt dist-upgrade -y && sudo apt install haproxy
apache2 -y
* Create /etc/haproxy/haproxy.cfg with the following contents:
global
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
maxconn 4096
defaults
log global
option dontlognull
option redispatch
retries 3
timeout client 50s
timeout connect 10s
timeout http-request 5s
timeout server 50s
maxconn 4096
frontend test-front
bind *:8080
mode http
default_backend test-back
backend test-back
mode http
stick store-request src
stick-table type ip size 256k expire 30m
server test-1 localhost:80
* in one terminal, keep tailing the (still nonexistent) haproxy log file:
tail -F /var/log/haproxy.log
* in another terminal, restart haproxy:
sudo systemctl restart haproxy
* The haproxy log will become live, and already show errors:
Jan 24 19:22:23 cosmic-haproxy-1804069 haproxy[2286]: [WARNING] 023/191958
(2286) : Exiting Master process...
Jan 24 19:22:23 cosmic-haproxy-1804069 haproxy[2286]: [ALERT] 023/191958
(2286) : Current worker 2287 exited with code 143
Jan 24 19:22:23 cosmic-haproxy-1804069 haproxy[2286]: [WARNING] 023/191958
(2286) : All workers exited. Exiting... (143)
* Run wget to try to fetch the apache frontpage, via haproxy, limited to one
attempt. It will fail:
$ wget -t1 http://localhost:8080
--2019-01-24 19:23:51-- http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... No data received.
Giving up.
$ echo $?
4
* the haproxy logs will show errors:
Jan 24 19:24:36 cosmic-haproxy-1804069 haproxy[6411]: [ALERT] 023/192351
(6411) : Current worker 6412 exited with code 135
Jan 24 19:24:36 cosmic-haproxy-1804069 haproxy[6411]: [ALERT] 023/192351
(6411) : exit-on-failure: killing every workers with SIGTERM
Jan 24 19:24:36 cosmic-haproxy-1804069 haproxy[6411]: [WARNING] 023/192351
(6411) : All workers exited. Exiting... (135)
* Update the haproxy package and try the wget one more time. This time
it will work, and the haproxy logs will stay silent:
$ wget -t1 http://localhost:8080
--2019-01-24 19:26:14-- http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10918 (11K) [text/html]
Saving to: ‘index.html’
index.html
100%[================================================================================================================================>]
10.66K --.-KB/s in 0s
2019-01-24 19:26:14 (75.3 MB/s) - ‘index.html’ saved [10918/10918]
[Regression Potential]
Patch was applied upstream in 1.8.15 and is available in the same form in the
latest 1.8.17 release. The patch is a bit low level, but seems to have been
well understood.
[Other Info]
After writing the testing instructions for this bug, I decided they could be
easily converted to a DEP8 test, which I did and included in this SRU. This new
test, very simple but effective, shows that arm64 is working, and that the
other architectures didn't break.
[Original Description]
This fault was reported via the haproxy mailing list https://www.mail-
archive.com/[email protected]/msg31749.html
And then patched in the haproxy code here
https://github.com/haproxy/haproxy/commit/52dabbc4fad338233c7f0c96f977a43f8f81452a
Without this patch haproxy is not functional on aarch64/arm64.
Experimental deployments of openstack-ansible on arm64 fail because of
this bug, and without a fix applied to the ubuntu bionic packages we
cannot proceed further as the openstack CI only installs the upstream
ubuntu distribution packages.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1804069/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help : https://help.launchpad.net/ListHelp