Aurelien DARRAGON
021a0681be
BUG/MEDIUM: queue/stats: also use stream_set_srv_target() for pendconns
...
Following c24de07 ("OPTIM: stats: store fast sharded counters pointers
at session and stream level") some crashes were observed in
connect_server():
#0 0x00000000007ba39c in connect_server (s=0x65117b0) at src/backend.c:2101
2101 _HA_ATOMIC_INC(&s->sv_tgcounters->connect);
Missing separate debuginfos, use: debuginfo-install glibc-2.17-325.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 nss-softokn-freebl-3.67.0-3.el7_9.x86_64 pcre-8.32-17.el7.x86_64
(gdb) bt
#0 0x00000000007ba39c in connect_server (s=0x65117b0) at src/backend.c:2101
#1 0x00000000007baff8 in back_try_conn_req (s=0x65117b0) at src/backend.c:2378
#2 0x00000000006c0e9f in process_stream (t=0x650f180, context=0x65117b0, state=8196) at src/stream.c:2366
#3 0x0000000000bd3e51 in run_tasks_from_lists (budgets=0x7ffd592752e0) at src/task.c:655
#4 0x0000000000bd49ef in process_runnable_tasks () at src/task.c:889
#5 0x0000000000851169 in run_poll_loop () at src/haproxy.c:2834
#6 0x0000000000851865 in run_thread_poll_loop (data=0x1a03580 <ha_thread_info>) at src/haproxy.c:3050
#7 0x0000000000852a53 in main (argc=7, argv=0x7ffd592755f8) at src/haproxy.c:3637
Here the crash occurs during the atomic inc of a sv_tgcounters metric from
the stream pointer, which tells us the pointer is likely garbage.
In fact, we assign s->sv_tgcounters each time the stream target is set to
a valid server. For that we use stream_set_srv_target() helper which does
assigment for us. By reviewing the code, in turns out we forgot to call
stream_set_srv_target() in pendconn_dequeue(), where the stream target
is set to the server who picked the pendconn.
Let's fix the bug by using stream_set_srv_target() there.
No backport needed unless c24de07 is.
2025-07-28 08:54:38 +02:00
..
2024-11-18 15:15:54 +01:00
2025-07-24 11:49:11 +02:00
2023-09-28 08:49:22 +02:00
2025-04-02 11:12:20 +02:00
2025-07-25 15:53:33 +02:00
2024-10-18 14:30:24 +02:00
2025-02-06 16:55:37 +01:00
2025-07-25 18:24:23 +02:00
2024-10-18 18:28:39 +02:00
2025-07-25 16:46:10 +02:00
2023-04-27 18:14:57 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2024-09-15 23:44:59 +02:00
2025-01-20 17:53:55 +01:00
2025-05-21 15:47:42 +02:00
2025-07-15 10:30:28 +02:00
2025-04-29 15:19:32 +02:00
2025-06-25 15:23:48 +02:00
2025-07-03 16:30:15 +02:00
2025-07-25 16:46:10 +02:00
2024-09-30 11:36:39 +02:00
2025-07-25 16:46:10 +02:00
2025-01-29 17:55:18 +01:00
2025-07-25 18:24:23 +02:00
2025-04-03 11:37:25 +02:00
2025-01-02 14:31:07 +01:00
2025-04-30 17:17:36 +02:00
2025-07-25 16:46:10 +02:00
2025-07-17 19:07:58 +02:00
2025-03-31 16:21:37 +02:00
2025-07-21 11:25:08 +02:00
2024-11-18 18:50:02 +01:00
2024-07-09 16:46:38 +02:00
2025-07-25 18:24:23 +02:00
2024-11-18 19:07:05 +01:00
2025-01-07 16:42:38 +01:00
2025-02-26 13:00:18 +01:00
2025-02-26 13:00:18 +01:00
2025-02-26 13:00:18 +01:00
2024-05-24 12:07:18 +02:00
2024-05-24 12:07:18 +02:00
2024-11-29 10:18:07 +01:00
2024-11-15 15:39:00 +01:00
2025-07-25 18:24:23 +02:00
2025-02-26 13:00:18 +01:00
2025-02-17 16:16:29 +01:00
2024-09-02 15:50:25 +02:00
2025-07-25 18:24:23 +02:00
2025-07-25 15:44:02 +02:00
2025-02-06 17:01:15 +01:00
2025-02-21 18:26:29 +01:00
2025-07-25 16:46:10 +02:00
2025-05-22 18:09:12 +02:00
2025-07-10 14:10:42 +02:00
2025-05-16 15:13:17 +02:00
2025-05-16 15:13:17 +02:00
2024-05-16 10:31:17 +02:00
2025-07-23 15:45:18 +02:00
2025-07-25 16:46:10 +02:00
2025-07-15 10:30:28 +02:00
2025-07-25 18:24:23 +02:00
2025-07-21 15:38:02 +02:00
2025-07-25 18:24:23 +02:00
2025-07-25 18:24:23 +02:00
2025-07-25 18:24:23 +02:00
2024-11-06 10:06:52 +01:00
2025-04-02 11:12:20 +02:00
2024-12-11 10:00:01 +01:00
2025-01-03 10:10:09 +01:00
2024-11-19 15:20:02 +01:00
2024-11-19 15:29:40 +01:00
2025-07-24 12:13:42 +02:00
2025-01-31 15:51:51 +01:00
2025-04-02 19:34:09 +02:00
2025-07-10 19:49:48 +02:00
2025-03-25 18:01:01 +01:00
2025-01-28 12:49:41 +01:00
2025-06-20 15:59:03 +02:00
2025-04-17 17:38:23 +02:00
2025-01-28 12:49:41 +01:00
2024-03-29 17:08:37 +01:00
2025-04-03 11:37:25 +02:00
2024-11-21 19:55:21 +01:00
2025-07-25 16:46:10 +02:00
2025-07-25 18:24:23 +02:00
2024-04-13 08:43:12 +02:00
2025-06-27 16:41:18 +02:00
2025-04-24 15:09:37 +02:00
2023-05-11 09:22:46 +02:00
2024-08-30 14:58:59 +02:00
2025-04-25 16:14:26 +02:00
2025-07-25 18:24:23 +02:00
2025-06-30 16:48:00 +02:00
2025-01-31 10:41:50 +01:00
2025-07-23 15:49:51 +02:00
2025-06-04 08:48:49 +02:00
2025-06-25 16:11:34 +02:00
2024-12-10 08:05:34 +01:00
2023-05-12 09:45:30 +02:00
2025-07-05 00:12:45 +02:00
2025-07-01 11:55:36 +02:00
2025-07-25 18:24:23 +02:00
2025-05-09 14:57:00 +02:00
2025-06-12 11:25:12 +02:00
2025-07-15 10:30:28 +02:00
2024-11-25 15:20:24 +01:00
2025-07-09 09:51:24 +02:00
2024-08-21 17:37:46 +02:00
2024-10-29 12:14:50 +01:00
2025-06-11 18:37:34 +02:00
2024-08-30 18:53:49 +02:00
2025-07-25 18:24:23 +02:00
2025-07-15 18:39:23 +02:00
2025-06-12 11:28:54 +02:00
2024-05-16 10:31:17 +02:00
2025-07-15 18:39:23 +02:00
2025-07-28 08:54:38 +02:00
2024-02-05 14:31:21 +01:00
2025-04-29 15:10:06 +02:00
2025-04-29 15:10:06 +02:00
2024-12-13 14:42:43 +01:00
2025-04-29 15:10:06 +02:00
2025-04-29 15:10:06 +02:00
2025-05-21 14:44:27 +02:00
2024-09-03 17:49:21 +02:00
2025-06-11 18:37:34 +02:00
2025-07-17 19:33:21 +02:00
2025-03-07 12:06:26 +01:00
2024-01-31 16:28:54 +01:00
2025-06-12 17:47:15 +02:00
2025-01-31 15:34:30 +01:00
2025-07-16 16:42:21 +02:00
2025-01-23 17:41:07 +01:00
2025-07-16 16:42:21 +02:00
2025-06-26 09:48:00 +02:00
2025-01-27 11:11:43 +01:00
2025-07-16 16:42:21 +02:00
2025-07-16 10:17:54 +02:00
2025-07-16 16:42:21 +02:00
2024-04-26 10:20:57 +02:00
2025-05-21 14:26:45 +02:00
2025-06-26 09:48:00 +02:00
2024-08-30 17:04:09 +02:00
2025-06-27 07:59:12 +02:00
2025-06-11 18:37:34 +02:00
2025-07-17 19:33:21 +02:00
2025-01-31 10:41:50 +01:00
2025-07-08 07:54:45 +02:00
2025-05-26 19:00:00 +02:00
2025-07-15 10:30:28 +02:00
2025-07-25 16:46:10 +02:00
2025-07-25 16:46:10 +02:00
2025-07-25 18:24:23 +02:00
2024-05-21 17:55:03 +02:00
2025-02-21 17:41:38 +01:00
2025-07-25 18:24:23 +02:00
2025-05-16 16:43:53 +02:00
2025-05-09 15:45:44 +02:00
2024-10-29 12:15:24 +01:00
2025-06-11 18:37:34 +02:00
2025-07-10 19:49:48 +02:00
2025-07-21 16:44:50 +02:00
2025-05-22 15:31:54 +02:00
2025-07-09 16:01:02 +02:00
2025-07-04 15:21:50 +02:00
2024-08-26 15:17:40 +02:00
2025-07-07 14:13:02 +02:00
2025-07-21 16:44:50 +02:00
2025-07-24 10:58:54 +02:00
2025-07-25 16:46:10 +02:00
2025-07-25 15:44:02 +02:00
2025-02-06 17:19:49 +01:00
2025-07-25 16:46:10 +02:00
2025-07-05 00:12:45 +02:00
2025-05-16 15:11:37 +02:00
2025-05-08 23:32:25 +02:00
2025-07-25 18:24:23 +02:00
2024-11-25 08:09:09 +01:00
2025-05-02 11:09:28 +02:00
2025-07-25 18:24:23 +02:00
2025-07-25 18:24:23 +02:00
2025-04-02 14:57:40 +02:00
2025-04-03 17:19:07 +02:00
2025-07-21 13:56:29 +02:00
2025-06-26 18:02:16 +02:00
2025-01-10 14:50:59 +01:00
2024-11-14 15:03:38 +01:00
2024-07-18 13:29:52 +02:00
2024-09-15 23:51:51 +02:00
2025-01-20 17:53:55 +01:00
2025-05-20 16:37:06 +02:00
2025-04-30 17:17:36 +02:00
2025-06-11 18:37:34 +02:00