haproxy fails on arm64 due to alignment error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
haproxy (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Andreas Hasenack | ||
Cosmic |
Fix Released
|
High
|
Andreas Hasenack |
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/
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/
* 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-
Jan 24 19:22:23 cosmic-
Jan 24 19:22:23 cosmic-
* Run wget to try to fetch the apache frontpage, via haproxy, limited to one attempt. It will fail:
$ wget -t1 http://
--2019-01-24 19:23:51-- http://
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)
HTTP request sent, awaiting response... No data received.
Giving up.
$ echo $?
4
* the haproxy logs will show errors:
Jan 24 19:24:36 cosmic-
Jan 24 19:24:36 cosmic-
Jan 24 19:24:36 cosmic-
* 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://
--2019-01-24 19:26:14-- http://
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)
HTTP request sent, awaiting response... 200 OK
Length: 10918 (11K) [text/html]
Saving to: ‘index.html’
index.html 100%[==
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://<email address hidden>
And then patched in the haproxy code here https:/
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.
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 162 lines (+126/-0)5 files modifieddebian/changelog (+9/-0)
debian/patches/series (+1/-0)
debian/patches/stksess-align.patch (+64/-0)
debian/tests/control (+4/-0)
debian/tests/proxy-localhost (+48/-0)
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 162 lines (+126/-0)5 files modifieddebian/changelog (+9/-0)
debian/patches/series (+1/-0)
debian/patches/stksess-align.patch (+64/-0)
debian/tests/control (+4/-0)
debian/tests/proxy-localhost (+48/-0)
Changed in haproxy (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → High |
tags: | added: bitesize server-next |
Changed in haproxy (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in haproxy (Ubuntu Bionic): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in haproxy (Ubuntu Cosmic): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in haproxy (Ubuntu Bionic): | |
status: | Triaged → In Progress |
Changed in haproxy (Ubuntu Cosmic): | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
Hi Jonathan,
Thanks for reporting this bug! Can you put together a simple test case that reproduces the bug so that I can verify bug and fix?