Klaus Post
0de2b9a1b2
Fix panic on double unfreezeServices ( #18177 )
...
Calling unfreezeServices twice results in panic:
```
panic: "POST /minio/peer/v32/signalservice?signal=4&sub-sys=": close of nil channel
goroutine 14703 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x65
github.com/minio/minio/cmd.setCriticalErrorHandler.func1.1()
github.com/minio/minio/cmd/generic-handlers.go:549 +0x8e
panic({0x27c3020, 0x4c9b370})
runtime/panic.go:884 +0x212
github.com/minio/minio/cmd.unfreezeServices()
github.com/minio/minio/cmd/service.go:112 +0xc7
github.com/minio/minio/cmd.(*peerRESTServer).SignalServiceHandler(0x0?, {0x4cb6af0, 0xc010b96420}, 0xc01affab00)
github.com/minio/minio/cmd/peer-rest-server.go:837 +0x13a
net/http.HandlerFunc.ServeHTTP(...)
```
If the function was called a second time `val` would not be nil, but the returned channel `ch` would be, causing the panic.
Check the channel isn't nil and also use Swap for an atomic swap instead of 2 separate operations (though we are in a mutex).
2023-10-06 07:51:50 -06:00
..
2023-09-02 14:40:38 -07:00
2023-09-04 12:57:37 -07:00
2023-09-06 19:03:58 -07:00
2023-09-14 14:50:16 -07:00
2023-07-03 09:47:40 -07:00
2023-09-14 14:50:16 -07:00
2023-09-14 14:50:16 -07:00
2023-09-14 14:50:16 -07:00
2023-09-14 14:50:16 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-18 22:13:03 -07:00
2023-10-05 18:16:04 -06:00
2023-09-11 14:48:54 -07:00
2023-08-10 07:14:46 -07:00
2023-06-19 17:53:08 -07:00
2022-01-03 01:28:52 -08:00
2023-09-25 08:13:08 -07:00
2023-09-25 08:13:08 -07:00
2022-01-02 09:15:06 -08:00
2023-07-22 07:19:43 -07:00
2021-04-23 11:58:53 -07:00
2023-06-07 11:25:26 -07:00
2021-04-23 11:58:53 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2022-01-02 09:15:06 -08:00
2023-03-06 08:56:10 -08:00
2023-08-04 10:40:21 -07:00
2023-09-14 14:50:16 -07:00
2023-09-18 10:00:54 -07:00
2023-05-05 19:53:12 -07:00
2023-09-04 12:57:37 -07:00
2021-04-23 11:58:53 -07:00
2023-01-05 20:41:19 -08:00
2023-09-11 12:19:22 -07:00
2023-08-29 11:27:23 -07:00
2023-08-29 11:27:23 -07:00
2023-09-22 11:31:57 -07:00
2023-08-29 11:27:23 -07:00
2023-08-29 11:27:23 -07:00
2023-09-04 12:57:37 -07:00
2023-08-29 11:27:23 -07:00
2023-08-29 11:27:23 -07:00
2023-08-29 11:27:23 -07:00
2023-08-29 11:27:23 -07:00
2023-08-29 11:27:23 -07:00
2023-09-04 12:57:37 -07:00
2023-04-04 10:56:54 -07:00
2022-12-23 07:46:00 -08:00
2022-07-25 12:37:26 -07:00
2023-07-25 16:58:31 -07:00
2022-08-04 16:10:08 -07:00
2022-05-27 06:00:19 -07:00
2023-08-23 03:07:06 -07:00
2023-09-04 12:57:37 -07:00
2021-05-14 00:59:05 -07:00
2023-09-04 12:57:37 -07:00
2022-10-24 17:44:15 -07:00
2023-07-28 10:49:20 -07:00
2023-09-18 10:00:54 -07:00
2022-05-31 02:57:57 -07:00
2023-05-22 15:28:56 -07:00
2023-06-13 13:52:33 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2021-04-23 11:58:53 -07:00
2023-05-24 22:52:39 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-18 22:13:03 -07:00
2023-09-16 02:28:06 -07:00
2023-09-13 10:58:38 -07:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2022-08-22 16:53:06 -07:00
2023-07-12 23:51:33 -07:00
2023-08-08 13:27:40 -07:00
2023-09-19 03:18:28 -07:00
2023-10-05 21:09:45 -06:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2023-09-05 20:21:59 -07:00
2023-09-04 12:57:37 -07:00
2022-10-24 17:44:15 -07:00
2022-06-16 16:10:48 -07:00
2023-06-19 17:53:08 -07:00
2022-09-19 11:05:16 -07:00
2023-09-21 10:37:37 -07:00
2023-09-18 10:00:54 -07:00
2022-12-19 11:10:14 -08:00
2023-09-04 12:57:37 -07:00
2022-01-02 09:15:06 -08:00
2023-06-19 17:53:08 -07:00
2023-04-21 13:56:08 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-08-23 03:07:06 -07:00
2023-09-04 12:57:37 -07:00
2021-04-23 11:58:53 -07:00
2021-06-17 20:27:04 -07:00
2023-07-08 07:31:42 -07:00
2023-07-08 07:31:42 -07:00
2023-08-24 09:26:29 -07:00
2023-09-24 22:15:31 -07:00
2023-10-06 06:55:15 -06:00
2023-07-17 09:52:05 -07:00
2023-03-10 08:53:59 -08:00
2023-08-30 01:00:59 -07:00
2023-10-02 19:22:35 -07:00
2023-08-30 01:00:59 -07:00
2023-09-18 22:13:03 -07:00
2022-08-10 12:46:45 -07:00
2021-12-08 14:52:31 -08:00
2023-09-18 10:00:54 -07:00
2022-09-19 11:05:16 -07:00
2022-09-19 11:05:16 -07:00
2021-04-23 11:58:53 -07:00
2022-01-02 09:15:06 -08:00
2022-04-03 13:29:13 -07:00
2023-09-18 10:00:54 -07:00
2022-09-19 11:05:16 -07:00
2023-09-04 12:57:37 -07:00
2022-10-14 03:08:40 -07:00
2022-08-19 16:21:05 -07:00
2022-09-23 21:17:08 -07:00
2023-09-16 02:28:06 -07:00
2021-04-30 08:50:39 -07:00
2023-07-20 07:48:21 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2022-07-25 12:37:26 -07:00
2022-05-30 10:58:37 -07:00
2023-09-15 08:34:03 -07:00
2022-07-25 12:37:26 -07:00
2023-08-03 02:18:18 -07:00
2023-02-24 09:03:31 +05:30
2023-05-25 09:39:06 -07:00
2022-08-04 16:10:08 -07:00
2023-08-03 02:18:18 -07:00
2023-07-26 11:31:40 -07:00
2023-09-01 13:45:58 -07:00
2023-08-30 18:46:04 -07:00
2023-09-29 09:08:24 -07:00
2023-09-04 08:24:17 -07:00
2023-07-03 09:47:40 -07:00
2023-09-04 12:57:37 -07:00
2023-09-04 12:57:37 -07:00
2023-09-29 10:28:19 -07:00
2023-07-03 09:47:40 -07:00
2023-10-06 06:55:15 -06:00
2022-01-11 18:48:43 -08:00
2022-07-04 14:02:54 -07:00
2023-07-03 09:47:40 -07:00
2023-10-06 06:55:15 -06:00
2022-10-25 12:36:57 -07:00
2022-10-25 12:36:57 -07:00
2023-10-06 06:55:15 -06:00
2023-10-06 06:55:15 -06:00
2023-07-20 07:48:21 -07:00
2023-09-04 12:57:37 -07:00
2022-11-10 16:17:45 -08:00
2023-09-11 15:29:59 -07:00
2023-06-24 20:29:13 -07:00
2023-09-04 12:57:37 -07:00
2021-04-23 11:58:53 -07:00
2022-08-26 12:52:29 -07:00
2022-12-04 02:28:10 -08:00
2023-08-01 10:54:26 -07:00
2023-09-13 08:14:36 -07:00
2021-04-23 11:58:53 -07:00
2023-06-30 08:04:13 -07:00
2023-09-12 12:41:52 -07:00
2021-04-30 08:50:39 -07:00
2023-07-08 07:31:42 -07:00
2023-09-30 13:40:20 -07:00
2023-09-11 14:48:54 -07:00
2023-09-13 18:43:57 -07:00
2023-07-31 00:12:53 -07:00
2023-05-15 14:08:54 -07:00
2023-09-06 12:50:46 -07:00
2022-05-27 06:00:19 -07:00
2022-11-28 10:20:55 -08:00
2023-07-28 01:16:53 -07:00
2023-01-23 16:42:47 +05:30
2023-07-18 22:25:12 -07:00
2022-01-02 09:15:06 -08:00
2023-07-10 15:40:44 -07:00
2022-03-08 13:58:55 -08:00
2023-07-24 07:56:28 -07:00
2021-04-23 11:58:53 -07:00
2023-05-17 17:05:36 -07:00
2023-09-19 17:57:42 -07:00
2023-09-22 20:47:50 -07:00
2023-09-14 15:25:17 -07:00
2023-04-28 12:24:14 -07:00
2023-09-14 14:50:16 -07:00
2023-09-14 14:50:16 -07:00
2023-08-19 07:37:53 -07:00
2022-07-05 14:45:49 -07:00
2022-07-05 14:45:49 -07:00
2023-07-05 10:40:45 -07:00
2023-05-22 15:28:56 -07:00
2021-04-23 11:58:53 -07:00
2023-01-17 05:08:15 +05:30
2023-10-05 18:16:04 -06:00
2023-03-04 20:57:35 -08:00
2023-04-03 21:23:24 -07:00
2021-06-01 14:59:40 -07:00
2023-06-05 16:56:35 -07:00
2022-09-19 11:05:16 -07:00
2023-03-23 10:26:21 -07:00
2021-09-30 11:53:01 -07:00
2023-07-08 07:35:11 -07:00
2023-09-04 12:57:37 -07:00
2021-04-23 11:58:53 -07:00
2021-11-08 10:26:08 -08:00
2021-09-08 11:06:45 -07:00
2022-03-25 16:29:45 -07:00
2023-09-04 12:57:37 -07:00
2022-01-02 09:15:06 -08:00
2023-09-04 12:57:37 -07:00
2022-10-24 17:44:15 -07:00
2022-12-05 11:18:50 -08:00
2023-10-06 06:55:15 -06:00
2023-09-18 10:00:54 -07:00
2022-09-19 11:05:16 -07:00
2023-07-06 16:02:08 -07:00
2023-08-31 17:58:48 -07:00
2022-11-01 16:41:01 -07:00
2023-09-30 13:40:20 -07:00
2023-09-30 13:40:20 -07:00
2023-09-30 13:40:20 -07:00
2023-09-30 13:40:20 -07:00
2023-09-20 15:49:55 -07:00
2023-06-24 19:31:04 -07:00
2021-04-23 11:58:53 -07:00
2023-06-05 16:56:35 -07:00
2023-08-25 07:58:11 -07:00
2023-05-03 14:12:25 -07:00
2023-09-04 12:57:37 -07:00
2023-06-19 17:53:08 -07:00
2023-09-30 13:40:20 -07:00
2022-12-23 07:46:00 -08:00
2023-08-01 10:54:26 -07:00
2023-09-19 03:18:28 -07:00
2022-12-23 07:46:00 -08:00
2023-09-25 08:13:08 -07:00
2022-12-23 07:46:00 -08:00
2023-09-25 08:13:08 -07:00
2023-09-18 22:13:03 -07:00
2023-09-25 08:13:08 -07:00
2023-09-25 08:13:08 -07:00
2023-07-22 07:19:43 -07:00
2023-05-05 19:53:12 -07:00
2023-09-04 12:57:37 -07:00
2023-09-18 10:00:54 -07:00
2023-05-24 08:00:47 -07:00
2022-01-02 09:15:06 -08:00
2023-08-24 14:33:58 -07:00
2023-10-06 06:55:15 -06:00
2023-09-14 21:58:17 -07:00
2023-09-29 10:28:19 -07:00
2023-09-13 08:14:36 -07:00
2023-09-13 08:14:36 -07:00
2023-09-13 08:14:36 -07:00
2021-08-18 18:35:22 -07:00
2021-08-18 18:35:22 -07:00
2021-08-18 18:35:22 -07:00
2021-08-18 18:35:22 -07:00
2023-09-13 08:14:36 -07:00
2022-09-19 11:05:16 -07:00
2021-07-09 16:20:51 -07:00
2023-09-13 08:14:36 -07:00
2023-09-13 08:14:36 -07:00
2023-09-05 20:22:23 -07:00
2023-09-05 20:22:23 -07:00
2023-08-27 09:57:11 -07:00
2023-09-30 13:40:20 -07:00
2023-09-30 13:40:20 -07:00
2023-10-05 18:16:04 -06:00
2023-09-29 00:58:54 -07:00
2023-09-29 00:58:54 -07:00
2023-09-19 22:41:06 -07:00
2023-09-04 12:57:37 -07:00
2023-09-25 12:35:25 -07:00
2023-09-18 10:00:54 -07:00
2021-04-23 11:58:53 -07:00
2023-09-25 12:35:25 -07:00
2023-09-13 08:14:36 -07:00
2023-01-30 18:33:07 +05:30
2022-10-25 12:36:57 -07:00
2022-10-25 12:36:57 -07:00
2023-08-01 10:54:26 -07:00
2023-09-04 12:57:37 -07:00
2023-09-24 22:15:31 -07:00
2023-09-04 12:57:37 -07:00
2023-07-03 09:47:40 -07:00
2023-09-30 13:40:20 -07:00
2023-09-04 12:57:37 -07:00
2023-06-19 17:53:08 -07:00
2023-10-02 07:39:47 -06:00
2023-10-06 07:51:50 -06:00
2022-10-24 17:44:15 -07:00
2023-06-30 08:04:13 -07:00
2023-02-13 01:26:38 -08:00
2023-07-12 07:18:30 -07:00
2022-10-14 03:08:40 -07:00
2022-08-26 12:52:29 -07:00
2022-10-14 03:08:40 -07:00
2023-03-06 08:56:10 -08:00
2023-03-06 08:56:10 -08:00
2023-07-27 11:44:56 -07:00
2023-09-14 14:50:16 -07:00
2023-07-27 11:45:30 -07:00
2023-06-19 17:53:08 -07:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2023-08-30 01:00:59 -07:00
2022-11-14 07:16:40 -08:00
2022-11-14 07:16:40 -08:00
2023-08-01 11:51:15 -07:00
2023-09-25 15:50:52 -07:00
2023-06-19 17:53:08 -07:00
2022-07-19 08:35:29 -07:00
2023-09-11 14:48:54 -07:00
2022-09-19 11:05:16 -07:00
2023-09-11 14:48:54 -07:00
2023-08-04 10:40:21 -07:00
2023-08-25 07:58:11 -07:00
2023-09-04 12:57:37 -07:00
2023-09-25 08:26:29 -07:00
2023-08-25 07:58:11 -07:00
2023-09-04 12:57:37 -07:00
2022-12-01 12:10:54 -08:00
2021-04-23 11:58:53 -07:00
2023-08-01 08:45:57 -07:00
2023-05-05 19:53:12 -07:00
2022-05-26 17:58:09 -07:00
2023-08-03 13:24:25 -07:00
2023-09-18 22:13:03 -07:00
2023-09-14 14:50:16 -07:00
2023-08-03 13:24:25 -07:00
2023-09-18 10:00:54 -07:00
2021-04-23 11:58:53 -07:00
2023-06-19 17:53:08 -07:00
2023-09-14 14:50:16 -07:00
2021-06-03 14:26:51 -07:00
2021-06-03 14:26:51 -07:00
2021-06-03 14:26:51 -07:00
2023-08-03 14:16:15 -07:00
2023-06-19 17:53:08 -07:00
2023-08-03 14:16:15 -07:00
2022-08-26 12:52:29 -07:00
2023-09-18 10:00:54 -07:00
2023-05-26 06:31:24 -07:00
2023-04-06 17:47:38 -07:00
2022-01-02 09:15:06 -08:00
2022-01-02 09:15:06 -08:00
2023-03-06 08:56:10 -08:00
2023-07-31 08:36:19 -07:00
2023-07-31 08:36:19 -07:00
2023-09-04 12:57:37 -07:00
2021-11-16 09:28:29 -08:00
2023-06-06 10:12:52 -07:00
2023-09-04 12:57:37 -07:00
2023-06-01 15:26:26 -07:00
2021-04-23 11:58:53 -07:00
2023-06-19 17:53:08 -07:00
2023-06-19 17:53:08 -07:00
2023-06-19 17:53:08 -07:00
2023-09-14 15:28:20 -07:00
2023-09-28 22:33:24 -07:00
2021-08-18 18:35:22 -07:00
2021-08-18 18:35:22 -07:00
2023-07-13 11:41:55 -07:00
2022-07-25 12:37:26 -07:00
2022-07-25 12:37:26 -07:00
2023-09-11 12:19:22 -07:00
2021-04-23 11:58:53 -07:00
2023-03-06 08:56:29 -08:00
2023-09-02 07:49:24 -07:00
2023-09-02 07:49:24 -07:00
2023-09-02 07:49:24 -07:00
2021-04-23 11:58:53 -07:00
2022-08-31 12:28:03 -07:00
2023-06-18 18:20:15 -07:00
2021-11-18 12:15:22 -08:00
2022-08-31 12:28:03 -07:00
2021-12-02 11:29:16 -08:00
2023-09-02 07:49:24 -07:00
2022-10-27 09:46:52 -07:00
2023-09-04 12:57:37 -07:00
2023-09-02 07:49:24 -07:00
2023-03-06 08:56:10 -08:00
2021-11-18 12:15:22 -08:00
2023-10-05 20:54:49 -06:00