run failures on `i386`
run failures on i386 (https://github.com/docker-library/haproxy/actions/runs/18622672033/job/53215587765).
This is what I get from the container when run locally:
[NOTICE] (1) : Initializing new worker (8)
FATAL: bug condition "sizeof(struct shm_stats_file_object) != 544" matched at src/stats-file.c:824
shm_stats_file_object struct size changed, is is part of the exported API: ensure all precautions were taken (ie: shm_stats_file version change) before adjusting this
call trace(8):
| 0x569017bf <a8 ef ff e8 c1 7f ef ff]: shm_stats_file_prepare+0x2f/0x47 > ha_backtrace_to_stderr
| 0x5680f45f <8b 5d e4 e8 31 23 0f 00]: ha_dump_backtrace+0x160bf > shm_stats_file_prepare
| 0x56614d0c <ff ff ff e8 94 a6 1f 00]: main+0xf8c/0x2453 > ha_dump_backtrace+0x16000
Hint: when reporting this bug to developers, please check if a core file was
produced, open it with 'gdb', issue 'bt' to produce a backtrace for the
current thread only, then join it with the bug report.
FATAL: bug condition "sizeof(struct shm_stats_file_object) != 544" matched at src/stats-file.c:824
shm_stats_file_object struct size changed, is is part of the exported API: ensure all precautions were taken (ie: shm_stats_file version change) before adjusting this
call trace(8):
| 0x569017bf <a8 ef ff e8 c1 7f ef ff]: shm_stats_file_prepare+0x2f/0x47 > ha_backtrace_to_stderr
| 0x5680f45f <8b 5d e4 e8 31 23 0f 00]: ha_dump_backtrace+0x160bf > shm_stats_file_prepare
| 0x56614d0c <ff ff ff e8 94 a6 1f 00]: main+0xf8c/0x2453 > ha_dump_backtrace+0x16000
Hint: when reporting this bug to developers, please check if a core file was
produced, open it with 'gdb', issue 'bt' to produce a backtrace for the
current thread only, then join it with the bug report.
Here are a couple backtraces:
root@0a33fa869304:/var/lib/haproxy# gdb /usr/local/sbin/haproxy /var/lib/haproxy/core.950
GNU gdb (Debian 16.3-1) 16.3
Reading symbols from /usr/local/sbin/haproxy...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 950]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/sbin/haproxy -W -db -f /usr/local/etc/haproxy/haproxy.cfg'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x5690e7d5 in shm_stats_file_prepare () at src/stats-file.c:824
warning: 824 src/stats-file.c: No such file or directory
(gdb) bt
#0 0x5690e7d5 in shm_stats_file_prepare () at src/stats-file.c:824
#1 0x5681c45f in step_init_2 (argv=argv@entry=0xffad6e64, argc=<optimized out>) at src/haproxy.c:2165
#2 0x56621d0c in main (argc=<optimized out>, argv=<optimized out>) at src/haproxy.c:3379
(gdb) quit
root@0a33fa869304:/var/lib/haproxy# gdb /usr/local/sbin/haproxy /var/lib/haproxy/core.952
GNU gdb (Debian 16.3-1) 16.3
Reading symbols from /usr/local/sbin/haproxy...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 952]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/sbin/haproxy -W -db -f /usr/local/etc/haproxy/haproxy.cfg'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x5690e7d5 in shm_stats_file_prepare () at src/stats-file.c:824
warning: 824 src/stats-file.c: No such file or directory
(gdb) bt
#0 0x5690e7d5 in shm_stats_file_prepare () at src/stats-file.c:824
#1 0x5681c45f in step_init_2 (argv=argv@entry=0xffad6e64, argc=<optimized out>) at src/haproxy.c:2165
#2 0x56621d0c in main (argc=<optimized out>, argv=<optimized out>) at src/haproxy.c:3379
(gdb) quit
Originally posted by @yosifkit in https://github.com/docker-library/official-images/issues/20123#issuecomment-3423873898
I've been digging through https://github.com/haproxy/haproxy/compare/v3.3-dev9...v3.3-dev10 and can't find any obvious smoking gun yet -- that first error is definitely wild and the affected structs haven't actually changed size from what I can see.
Hahahaha, looking through https://github.com/docker-library/haproxy/actions/workflows/ci.yml, this has been failing since at least dev8, not new in dev10
Edit: so that's https://github.com/haproxy/haproxy/compare/v3.3-dev7...v3.3-dev8 somewhere, maybe
Well, that tracks, struct shm_stats_file_object appears to be brand new in dev8 😂
BUG_ON(sizeof(struct shm_stats_file_object) != 544, "shm_stats_file_object struct size changed, "
"is is part of the exported API: ensure all precautions were taken (ie: shm_stats_file "
"version change) before adjusting this");
So something about this on i386 is failing - I guess we need to dig into that struct (or poke upstream and see if i386 is even supported / if this is something they want to fix).
or poke upstream and see if i386 is even supported / if this is something they want to fix
I'm pretty confident that i386 (or 32 bit in general) is something they want to support and suggest filing an issue at: https://github.com/haproxy/haproxy/issues/new?template=Bug.yml
Especially since:
ALWAYS_PAD(6); // 6 bytes hole, ensure it remains the same size 32 vs 64 bits arch
Filed upstream at https://github.com/haproxy/haproxy/issues/3168 :+1:
thanks guys! and sorry about that
Not a problem at all - we're clearly really on top of it that it took us two releases to realize the test failure we were seeing was real and not just flaky. 😂
(and I guess this goes to show that user uptake of 32bit versions of 3.3-dev builds is low :joy:)