Willy Tarreau
8522348482
BUG/MAJOR: conn-idle: fix hash indexing issues on idle conns
...
Idle connections do not work on 32-bit machines due to an alignment issue
causing the connection nodes to be indexed with their lower 32-bits set to
zero and the higher 32 ones containing the 32 lower bitss of the hash. The
cause is the use of ebmb_node with an aligned data, as on this platform
ebmb_node is only 32-bit aligned, leaving a hole before the following hash
which is a uint64_t:
$ pahole -C conn_hash_node ./haproxy
struct conn_hash_node {
struct ebmb_node node; /* 0 20 */
/* XXX 4 bytes hole, try to pack */
int64_t hash; /* 24 8 */
struct connection * conn; /* 32 4 */
/* size: 40, cachelines: 1, members: 3 */
/* sum members: 32, holes: 1, sum holes: 4 */
/* padding: 4 */
/* last cacheline: 40 bytes */
};
Instead, eb64 nodes should be used when it comes to simply storing a
64-bit key, and that is what this patch does.
For backports, a variant consisting in simply marking the "hash" member
with a "packed" attribute on the struct also does the job (tested), and
might be preferable if the fix is difficult to adapt. Only 2.6 and 2.5
are affected by this.
2022-10-03 12:06:36 +02:00
..
2022-03-29 18:01:37 +02:00
2021-12-16 17:31:57 +01:00
2022-03-30 11:19:22 +02:00
2022-09-08 16:21:22 +02:00
2022-09-08 16:21:22 +02:00
2022-09-17 11:27:09 +02:00
2022-09-08 14:30:38 +02:00
2022-01-28 19:04:02 +01:00
2022-04-25 16:09:26 +02:00
2022-02-24 11:00:03 +01:00
2022-03-11 16:59:14 +01:00
2022-09-08 14:19:15 +02:00
2022-03-04 08:58:32 +01:00
2022-03-04 08:58:32 +01:00
2022-04-27 18:07:24 +02:00
2022-09-09 16:15:10 +02:00
2022-05-27 19:33:34 +02:00
2022-05-27 19:33:35 +02:00
2022-05-27 19:33:35 +02:00
2022-08-17 10:45:22 +02:00
2022-05-06 18:33:22 +02:00
2022-09-24 15:56:25 +02:00
2022-09-21 09:06:28 +02:00
2022-05-08 10:35:39 +02:00
2022-06-08 12:17:22 +02:00
2022-10-03 12:06:36 +02:00
2022-10-03 12:06:36 +02:00
2022-07-15 19:43:10 +02:00
2022-07-15 19:43:10 +02:00
2022-07-01 19:26:35 +02:00
2022-08-06 16:51:20 +02:00
2022-05-11 15:20:10 +02:00
2022-03-04 08:58:32 +01:00
2022-03-04 08:58:32 +01:00
2021-11-03 17:16:46 +01:00
2022-09-12 19:33:07 +02:00
2022-07-26 10:35:24 +02:00
2022-06-22 18:33:27 +02:00
2022-09-29 10:53:15 +02:00
2022-07-01 19:15:14 +02:00
2022-01-28 19:04:02 +01:00
2022-05-30 09:59:26 +02:00
2022-05-30 09:59:26 +02:00
2022-09-16 13:53:30 +02:00
2022-03-30 14:56:10 +02:00
2022-06-19 17:58:32 +02:00
2021-11-18 10:50:58 +01:00
2022-09-09 17:18:57 +02:00
2022-05-27 19:33:35 +02:00
2022-09-13 17:12:38 +02:00
2022-09-14 14:34:39 +02:00
2022-08-18 16:13:33 +02:00
2022-03-02 14:50:38 +01:00
2022-07-06 17:54:03 +02:00
2022-09-09 16:59:29 +02:00
2022-05-30 16:25:16 +02:00
2022-04-22 15:45:47 +02:00
2022-04-22 15:45:47 +02:00
2022-04-14 16:57:12 +02:00
2022-06-21 20:29:57 +02:00
2022-09-27 08:04:08 +02:00
2022-07-29 17:32:05 +02:00
2022-09-09 17:23:01 +02:00
2022-03-17 19:53:46 +01:00
2022-03-22 09:25:52 +01:00
2022-09-15 11:01:59 +02:00
2022-09-12 19:33:07 +02:00
2022-09-20 15:35:29 +02:00
2022-09-20 15:35:09 +02:00
2021-11-10 15:53:01 +01:00
2022-01-28 23:52:36 +01:00
2022-08-06 17:12:51 +02:00
2022-07-01 15:54:23 +02:00
2022-05-27 19:33:35 +02:00
2022-05-27 19:33:35 +02:00
2022-04-21 14:54:45 +02:00
2022-05-17 16:13:22 +02:00
2022-08-09 09:11:27 +02:00
2022-03-02 18:22:08 +01:00
2022-09-08 14:19:15 +02:00
2022-03-04 08:58:32 +01:00
2022-03-04 08:58:32 +01:00
2022-05-20 18:39:43 +02:00
2021-10-27 17:41:07 +02:00
2022-09-13 17:12:38 +02:00
2022-09-09 17:23:01 +02:00
2022-09-20 15:35:33 +02:00
2022-09-20 15:35:09 +02:00
2022-08-17 11:04:53 +02:00
2022-03-04 08:58:32 +01:00
2022-03-04 08:58:32 +01:00
2022-03-04 08:58:32 +01:00
2022-07-29 17:32:05 +02:00
2022-07-29 17:32:05 +02:00
2022-06-24 12:13:53 +02:00
2022-07-15 14:57:49 +02:00
2022-07-15 14:57:49 +02:00
2022-05-30 16:37:17 +02:00
2022-06-16 14:56:24 +02:00
2022-01-26 16:13:51 +01:00
2022-08-05 15:53:16 +02:00
2022-08-05 15:27:14 +02:00
2022-05-30 09:59:26 +02:00
2022-04-21 12:03:20 +02:00
2022-08-20 19:08:31 +02:00
2022-08-19 18:31:59 +02:00
2022-09-14 18:16:37 +02:00
2022-06-21 11:07:39 +02:00
2022-08-11 19:12:12 +02:00
2022-02-15 10:13:20 +01:00
2022-08-24 14:56:42 +02:00
2022-05-27 19:33:35 +02:00
2022-05-06 18:13:36 +02:00
2022-08-12 11:18:46 +02:00
2022-03-29 18:01:37 +02:00
2022-05-27 19:33:35 +02:00
2022-05-11 11:39:06 +02:00
2022-08-03 11:28:52 +02:00
2022-05-02 17:51:51 +02:00
2022-10-03 12:06:36 +02:00
2022-09-09 17:46:45 +02:00
2022-08-12 11:18:46 +02:00
2022-09-13 17:03:30 +02:00
2022-01-28 19:04:02 +01:00
2022-01-28 19:04:02 +01:00
2022-03-30 14:55:53 +02:00
2022-08-19 19:58:53 +02:00
2022-04-27 16:53:43 +02:00
2022-09-07 09:33:46 +02:00
2022-05-09 20:32:11 +02:00
2022-05-20 16:57:12 +02:00
2022-09-09 16:52:08 +02:00
2022-06-17 13:25:02 +02:00
2022-09-24 16:35:23 +02:00
2022-05-27 19:33:35 +02:00
2022-09-09 16:52:09 +02:00
2022-09-08 14:30:38 +02:00
2022-08-24 11:59:04 +02:00
2022-03-02 14:54:44 +01:00
2022-07-15 19:41:26 +02:00
2022-07-15 20:25:41 +02:00
2022-09-08 14:19:15 +02:00
2022-07-01 19:15:15 +02:00
2022-09-29 10:53:15 +02:00
2021-12-21 15:53:19 +01:00
2022-03-02 14:53:00 +01:00
2022-01-03 14:40:58 +01:00
2022-05-31 17:05:27 +02:00
2022-09-08 18:04:58 +02:00
2022-09-07 15:59:43 +02:00