Bug 1801109

Summary: haproxy hangs at startup
Product: [Fedora] Fedora Reporter: Joe Orton <jorton>
Component: haproxyAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: bperkins, carl, ingvar, jeremy, mitchb, mrittenb, pavloos, quentin, rohara
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: haproxy-2.1.3-2.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-24 17:50:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Orton 2020-02-10 09:40:56 UTC
Description of problem:
haproxy hangs at startup in Raw Hide, even for "haproxy --version"

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. haproxy --version

Actual results:
hang

Expected results:
version output

Additional info:
# gdb --args /usr/sbin/haproxy --version
...
(gdb) run
Starting program: /usr/sbin/haproxy --version
 
Missing separate debuginfos, use: dnf debuginfo-installglibc-2.30.9000-31.fc32.x86_64[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
^C
Program received signal SIGINT, Interrupt.
create_pool (name=name@entry=0x555555701be5 "ssl_sock_ctx_pool", size=128, size@entry=120, flags=flags@entry=1) at src/memory.c:104
104			else if (entry->size > size) {
    Missing separate debuginfos, use: dnf debuginfo-installlibgcc-10.0.1-0.5.fc32.x86_64libgcrypt-1.8.5-1.fc32.x86_64libgpg-error-1.36-2.fc32.x86_64libxcrypt-4.4.11-1.fc32.      x86_64lua-libs-5.3.5-6.fc31.x86_64lz4-libs-1.9.1-1.fc32.x86_64openssl-libs-1.1.1d-5.fc32.x86_64pcre2-10.34-4.fc32.x86_64systemd-libs-244.1-2.fc32.x86_64xz-libs-5.2.4-7. 
(gdb) where
#0  create_pool (name=name@entry=0x555555701be5 "ssl_sock_ctx_pool", size=128, size@entry=120, flags=flags@entry=1) at src/memory.c:104
#1  0x00005555556e36a1 in create_pool_callback (ptr=0x555555794f08 <ssl_sock_ctx_pool>, name=0x555555701be5 "ssl_sock_ctx_pool", size=120) at src/memory.c:575
#2  0x00005555555936f6 in main (argc=2, argv=0x7fffffffe378) at src/haproxy.c:2854
(gdb) n
91		list_for_each_entry(entry, &pools, list) {
(gdb) n
92			if (entry->size == size) {
(gdb) n
104			else if (entry->size > size) {
(gdb) n
91		list_for_each_entry(entry, &pools, list) {
(gdb) n
92			if (entry->size == size) {
(gdb) n
104			else if (entry->size > size) {
(gdb) n
91		list_for_each_entry(entry, &pools, list) {
(gdb) n
92			if (entry->size == size) {
(gdb) n
104			else if (entry->size > size) {
(gdb) n
91		list_for_each_entry(entry, &pools, list) {
(gdb) n
92			if (entry->size == size) {
(gdb) n
104			else if (entry->size > size) {
(gdb) n
91		list_for_each_entry(entry, &pools, list) {

Comment 1 Joe Orton 2020-02-10 09:41:42 UTC
[root@ci-vm-10-0-137-223 ~]# rpm -q haproxy
haproxy-2.1.2-2.fc32.x86_64

Comment 2 Ingvar Hagelund 2020-02-11 12:15:36 UTC
May easily be reproduced also in a mock chroot

mock -r fedora-rawhide-x86_64 init
mock -r fedora-rawhide-x86_64 install haproxy
mock -r fedora-rawhide-x86_64 shell

<mock-chroot> sh-5.0# haproxy --version
(hangs forever)

Comment 3 Ben Cotton 2020-02-11 16:31:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 4 Ryan O'Hara 2020-02-11 19:44:34 UTC
This was fixed upstream [1]. I am going to asked for a new upstream release of haproxy-2.1 since it has been while and there are many worthwhile patches committed since 2.1.2.

[1] http://git.haproxy.org/?p=haproxy-2.1.git;a=commit;h=a102c1be693d3149559058cb62130812a0310ad7

Comment 5 Joe Orton 2020-02-12 09:50:51 UTC
If that's likely to take a while would you be able to backport the patches?

(This makes varnish FTBFS because the test suite runs haproxy.)

Comment 6 Ryan O'Hara 2020-02-12 17:31:59 UTC
Upstream already did a new release. I will rebase the Fedora package.

Comment 7 Ryan O'Hara 2020-03-02 18:12:11 UTC
This should be fixed by the latest rebase in rawhide.

Comment 8 Quentin Smith 2020-03-03 02:48:22 UTC
haproxy-2.1.3-1.fc33.x86_64 in Rawhide unfortunately still has the same bug.

I don't seem to have permission to reopen this bug.

Comment 9 Ingvar Hagelund 2020-03-03 13:35:56 UTC
Recompiling the rawhide package gives interesting results:

rebuilt in mock f31 chroot, installed on f31 system: haproxy -v works
rebuilt in mock f32 chroot, installed on f31 system: haproxy -v does NOT work
rebuilt in mock rawhide chroot, installed on f31 system: haproxy -v does NOT work

Ingvar

Comment 10 Ryan O'Hara 2020-03-03 17:23:43 UTC
Sorry. I was sure it was fixed. I just built from the latest haproxy-2.1 git tree (on F32) and confirmed that 'haproxy -v' still hangs. I've informed upstream.

Comment 11 Ryan O'Hara 2020-03-03 18:41:08 UTC
(In reply to Ryan O'Hara from comment #10)
> Sorry. I was sure it was fixed. I just built from the latest haproxy-2.1 git
> tree (on F32) and confirmed that 'haproxy -v' still hangs. I've informed
> upstream.

I took the same source code and built on F31 and it works. Perhaps this is related to gcc/glibc changes in F32?

Comment 12 Ryan O'Hara 2020-03-03 19:02:44 UTC
(In reply to Ryan O'Hara from comment #11)
> (In reply to Ryan O'Hara from comment #10)
> > Sorry. I was sure it was fixed. I just built from the latest haproxy-2.1 git
> > tree (on F32) and confirmed that 'haproxy -v' still hangs. I've informed
> > upstream.
> 
> I took the same source code and built on F31 and it works. Perhaps this is
> related to gcc/glibc changes in F32?

Just for fun I put gcc-10 (from F32 repos) on a F31 machine and rebuilt. This time it failed. Sure seems like gcc-10 is the cause.

Comment 13 Fedora Update System 2020-03-16 19:28:55 UTC
FEDORA-2020-d247b5f22a has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d247b5f22a

Comment 14 Fedora Update System 2020-03-17 02:49:09 UTC
haproxy-2.1.3-2.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d247b5f22a

Comment 15 Fedora Update System 2020-03-24 17:50:16 UTC
FEDORA-2020-d247b5f22a has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.