Feng Ruohang
2602177ef6
fix: guard the ReadParts trace path against an empty part list
...
ReadParts built its disk-health trace path from partMetaPaths[0] with
no length check, so a caller passing no paths at all indexed an empty
slice. xlStorage.ReadParts handles an empty list perfectly well - it
returns an empty result - so the panic came entirely from the metrics
bookkeeping wrapped around it.
The reachable caller is ReadPartsHandler, which decodes its path list
from a msgpack request body that an authenticated peer controls, and
neither the handler, the storage-REST client, nor the path guard
rejects an empty one: guardPaths ranges over the slice, so an empty
slice passes vacuously.
net/http recovers a panicking handler, so this is not a crash - which
is what makes it worth fixing rather than merely tidy. ReadPartsHandler
calls keepHTTPResponseAlive before it calls ReadParts, and that helper
spawns a goroutine whose only exit is receiving from the channel done()
writes. Panicking in between skips both done(err) and done(nil), so the
process survives and the keep-alive goroutine and its ten-second ticker
stay parked forever - one per request, driven by a request body the
caller chooses. Repeating one malformed frame exhausts the node.
The fix follows DeleteVersions in the same decorator, which already
guards the identical "merely for tracing" lookup; ReadParts was the one
method missing the pattern. It also covers the second entry point, the
per-disk errgroup in readParts, where a panic has no recover at all and
would take the process down. That path is screened at the S3 boundary
today, so this is defence in depth there.
No error is returned for the empty case. The storage layer's answer to
an empty list is an empty result, and turning that into an error would
be a behaviour change on a path that is merely degenerate.
Co-authored-by: ChatGPT <noreply@openai.com >
Co-authored-by: Claude <noreply@anthropic.com >
2026-08-04 23:00:31 +08:00
..
2024-06-05 00:51:13 -07:00
2024-05-24 16:05:23 -07:00
2025-02-18 08:25:55 -08:00
2024-07-03 00:17:20 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-02-18 08:25:55 -08:00
2026-04-15 14:02:41 +08:00
2025-09-06 10:38:46 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-10-15 10:00:45 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-10-10 11:57:03 -07:00
2024-05-24 16:05:23 -07:00
2025-03-29 17:56:02 -07:00
2025-04-09 07:28:39 -07:00
2025-04-16 00:34:24 -07:00
2025-03-29 17:56:02 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2026-08-04 22:48:06 +08:00
2026-08-04 22:48:06 +08:00
2025-10-23 21:05:19 -07:00
2025-05-27 08:19:03 -07:00
2025-04-16 00:34:24 -07:00
2025-04-09 07:28:39 -07:00
2026-08-04 23:00:31 +08:00
2023-05-05 19:53:12 -07:00
2025-05-27 08:19:03 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2026-03-14 17:39:57 +08:00
2026-03-14 17:39:57 +08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2026-03-14 17:39:57 +08:00
2026-03-14 17:39:57 +08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-01-08 15:22:28 -08:00
2026-03-14 17:39:57 +08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2026-03-14 17:39:57 +08:00
2024-08-01 05:53:30 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2023-12-02 02:51:33 -08:00
2025-08-28 19:39:48 -07:00
2025-04-09 07:28:39 -07:00
2025-01-17 11:19:30 -08:00
2024-01-30 18:11:45 -08:00
2025-09-28 13:59:21 -07:00
2025-03-29 17:56:02 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-10-01 15:13:18 -07:00
2024-05-24 16:05:23 -07:00
2026-08-04 23:00:31 +08:00
2025-09-28 13:59:21 -07:00
2025-03-29 17:56:02 -07:00
2024-06-10 08:50:49 -07:00
2025-01-20 06:49:07 -08:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2024-05-24 16:05:23 -07:00
2025-08-07 19:38:25 -07:00
2026-08-04 23:00:31 +08:00
2025-08-28 19:39:48 -07:00
2024-05-24 16:05:23 -07:00
2026-08-04 23:00:31 +08:00
2025-09-28 13:59:21 -07:00
2025-04-09 07:28:39 -07:00
2024-08-15 05:04:40 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-08-15 05:04:40 -07:00
2025-02-18 08:25:55 -08:00
2025-09-28 13:59:21 -07:00
2026-03-21 13:49:36 +08:00
2025-04-09 07:28:39 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2026-08-04 23:00:30 +08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-05-24 16:05:23 -07:00
2024-05-01 10:57:52 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2026-08-04 23:00:31 +08:00
2023-09-18 10:00:54 -07:00
2025-04-09 07:28:39 -07:00
2025-08-28 19:39:48 -07:00
2023-06-19 17:53:08 -07:00
2025-08-28 19:39:48 -07:00
2024-05-24 16:05:23 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2023-07-08 07:31:42 -07:00
2024-03-17 23:42:40 -07:00
2025-08-28 19:39:48 -07:00
2025-09-30 23:06:01 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-01-12 23:51:08 -08:00
2025-09-28 13:59:21 -07:00
2024-03-10 01:15:15 -08:00
2024-05-08 17:51:34 -07:00
2025-09-28 13:59:21 -07:00
2024-08-13 08:25:16 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-04-09 07:28:39 -07:00
2026-08-04 23:00:21 +08:00
2025-08-28 19:39:48 -07:00
2026-08-04 22:48:06 +08:00
2026-08-04 22:48:06 +08:00
2025-08-28 19:39:48 -07:00
2024-05-14 17:11:04 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2026-08-04 23:00:21 +08:00
2025-10-23 21:05:31 -07:00
2026-08-04 22:48:06 +08:00
2026-08-04 22:48:06 +08:00
2026-08-04 23:00:31 +08:00
2025-10-23 21:05:31 -07:00
2026-08-04 23:00:31 +08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2026-08-04 23:00:21 +08:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2024-01-30 18:11:45 -08:00
2025-09-28 13:59:21 -07:00
2024-04-04 05:04:40 -07:00
2024-06-21 15:22:24 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2026-07-21 12:14:10 +08:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-04-04 06:49:12 -07:00
2024-09-03 11:23:41 -07:00
2025-05-16 07:27:42 -07:00
2025-09-28 13:59:21 -07:00
2026-08-04 23:00:30 +08:00
2026-08-04 23:00:30 +08:00
2024-06-26 00:44:34 -07:00
2024-09-24 10:13:00 -07:00
2025-09-28 13:59:21 -07:00
2024-09-24 10:13:00 -07:00
2024-05-05 09:56:21 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2024-10-10 16:40:37 -07:00
2026-03-21 13:49:36 +08:00
2025-09-28 13:59:21 -07:00
2025-10-15 10:00:45 -07:00
2024-03-04 18:50:24 -08:00
2024-04-05 08:17:08 -07:00
2024-04-05 08:17:08 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-04-09 07:28:39 -07:00
2024-08-17 23:43:03 -07:00
2024-05-07 16:55:37 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2023-07-05 10:40:45 -07:00
2023-12-01 07:56:24 -08:00
2025-09-28 13:59:21 -07:00
2025-02-18 08:25:55 -08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-04-09 07:28:39 -07:00
2024-07-29 11:10:04 -07:00
2025-04-09 07:28:39 -07:00
2023-11-20 17:09:35 -08:00
2025-01-31 11:54:34 -08:00
2025-08-28 19:39:48 -07:00
2024-07-30 15:59:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2024-08-08 08:29:58 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-04-09 07:28:39 -07:00
2025-05-07 08:37:12 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-05-26 00:06:43 -07:00
2024-07-12 09:23:16 -07:00
2025-09-28 13:59:21 -07:00
2025-10-10 11:57:03 -07:00
2024-07-15 09:28:02 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-03-29 17:56:02 -07:00
2025-09-28 13:59:21 -07:00
2024-09-24 10:13:00 -07:00
2024-05-10 07:50:39 -07:00
2025-06-04 13:45:31 -07:00
2025-09-28 13:59:21 -07:00
2024-05-24 05:50:46 -07:00
2024-05-14 00:25:56 -07:00
2024-03-10 01:15:15 -08:00
2024-05-02 01:20:42 -07:00
2024-04-23 21:10:35 -07:00
2025-02-18 08:25:55 -08:00
2025-10-10 11:57:03 -07:00
2024-06-06 02:36:25 -07:00
2024-05-14 00:27:33 -07:00
2024-08-15 05:04:40 -07:00
2024-05-24 12:29:25 -07:00
2024-06-20 10:55:03 -07:00
2025-03-29 17:56:02 -07:00
2024-04-16 22:10:25 -07:00
2024-03-10 01:15:15 -08:00
2024-06-20 10:55:03 -07:00
2025-02-28 11:33:08 -08:00
2024-08-01 17:55:27 -07:00
2025-10-23 21:06:31 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-05-27 08:19:03 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2026-06-12 21:08:59 +08:00
2025-10-10 11:57:03 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2023-11-20 17:09:35 -08:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2024-08-28 18:40:52 -07:00
2024-08-08 19:05:14 -07:00
2024-04-04 05:04:40 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-10-10 11:57:03 -07:00
2025-08-28 19:39:48 -07:00
2025-04-09 07:28:39 -07:00
2025-09-28 13:59:21 -07:00
2024-02-21 22:26:06 -08:00
2025-08-28 19:39:48 -07:00
2025-06-25 08:08:54 -07:00
2026-04-15 18:36:49 +08:00
2025-04-09 07:28:39 -07:00
2025-07-23 05:36:06 -07:00
2026-08-04 23:00:30 +08:00
2025-07-18 14:56:31 -07:00
2025-07-18 14:56:31 -07:00
2026-08-04 23:00:30 +08:00
2026-08-04 23:00:30 +08:00
2023-09-13 08:14:36 -07:00
2025-09-28 13:59:21 -07:00
2025-02-18 08:25:55 -08:00
2025-08-28 19:39:48 -07:00
2025-05-27 08:19:03 -07:00
2023-09-13 08:14:36 -07:00
2024-04-22 10:49:30 -07:00
2024-02-14 17:09:38 -08:00
2024-02-14 17:09:38 -08:00
2024-02-14 17:09:38 -08:00
2025-09-28 13:59:21 -07:00
2024-09-09 09:58:30 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2024-05-24 16:05:23 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-10-23 08:10:12 -07:00
2024-07-12 13:51:54 -07:00
2025-08-28 19:39:48 -07:00
2024-07-29 11:10:04 -07:00
2025-08-28 19:39:48 -07:00
2023-09-24 22:15:31 -07:00
2026-04-16 14:46:45 +08:00
2025-08-28 19:39:48 -07:00
2025-05-27 08:18:36 -07:00
2024-07-02 08:09:36 -07:00
2025-04-09 07:28:39 -07:00
2026-07-21 12:14:10 +08:00
2024-02-27 23:02:14 -08:00
2025-02-27 10:43:32 -08:00
2025-02-10 08:35:49 -08:00
2025-09-28 13:59:21 -07:00
2024-09-04 10:02:39 -07:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-04-09 07:28:39 -07:00
2025-10-10 11:57:35 -07:00
2025-10-10 11:57:35 -07:00
2025-04-09 07:28:39 -07:00
2024-11-25 09:10:22 -08:00
2024-12-13 14:19:12 -08:00
2023-06-19 17:53:08 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-05-27 08:19:03 -07:00
2026-06-12 21:08:59 +08:00
2026-06-12 21:08:59 +08:00
2025-08-28 19:39:48 -07:00
2026-06-12 21:08:59 +08:00
2024-04-04 05:04:40 -07:00
2026-06-12 21:08:59 +08:00
2025-04-09 07:28:39 -07:00
2026-06-12 21:08:59 +08:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2026-06-12 21:08:59 +08:00
2026-08-04 23:00:30 +08:00
2026-08-04 23:00:30 +08:00
2026-08-04 23:00:30 +08:00
2026-08-04 23:00:30 +08:00
2026-06-12 21:08:59 +08:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2026-04-16 14:46:44 +08:00
2025-02-04 16:29:41 -08:00
2026-08-04 23:00:30 +08:00
2026-06-12 21:08:59 +08:00
2025-02-04 16:29:41 -08:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2024-09-12 13:44:05 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-02-19 14:54:46 -08:00
2024-04-16 22:09:58 -07:00
2025-08-28 19:39:48 -07:00
2025-04-16 00:34:24 -07:00
2025-02-18 08:25:55 -08:00
2026-08-04 22:48:06 +08:00
2023-07-31 08:36:19 -07:00
2024-03-08 19:07:08 -08:00
2026-08-04 22:48:06 +08:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2024-08-14 17:34:56 -07:00
2024-10-31 15:10:24 -07:00
2025-03-29 17:56:02 -07:00
2025-09-28 13:59:21 -07:00
2025-06-08 09:13:30 -07:00
2024-10-31 15:10:24 -07:00
2024-07-23 09:36:24 -07:00
2024-07-23 09:36:24 -07:00
2025-08-28 19:39:48 -07:00
2025-04-09 07:28:39 -07:00
2023-11-28 22:35:16 -08:00
2026-08-04 23:00:31 +08:00
2026-08-04 23:00:31 +08:00
2025-08-28 19:39:48 -07:00
2025-08-28 19:39:48 -07:00
2024-08-08 08:29:58 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2024-10-22 08:30:50 -07:00
2025-09-28 13:59:21 -07:00
2025-09-28 13:59:21 -07:00
2025-08-28 19:39:48 -07:00
2025-09-28 13:59:21 -07:00
2026-08-04 23:00:21 +08:00
2024-03-01 21:11:03 -08:00
2024-03-01 21:11:03 -08:00
2025-08-28 19:39:48 -07:00
2026-08-04 23:00:21 +08:00