Martin Kletzander
9f6749dea0
util: Check for errors in virLogSetFromEnv
...
And make callers check the return value as well. This helps error out early for
invalid environment variables.
That is desirable because it could lead to deadlocks. This can happen when
resetting logging after fork() reports translated errors because gettext
functions are not reentrant. Well, it is not limited to resetting logging after
fork(), it can be any translation at that phase, but parsing environment
variables is easy to make fail on purpose to show the result, it can also happen
just due to a typo.
Before this commit it is possible to deadlock the daemon on startup
with something like:
LIBVIRT_LOG_FILTERS='1:*' LIBVIRT_LOG_OUTPUTS=1:stdout libvirtd
where filters are used to enable more logging and hence make the race less rare
and outputs are set to invalid
Combined with the previous patches this changes
the following from:
...
<deadlock>
to:
...
libvirtd: initialisation failed
The error message is improved in future commits and is also possible thanks to
this patch.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-01-05 14:08:40 +01:00
..
2021-05-07 18:02:48 +02:00
2021-12-14 16:04:17 +00:00
2021-08-17 13:50:38 +02:00
2021-07-20 16:43:46 +02:00
2021-12-15 15:28:17 +01:00
2021-07-16 14:50:57 +02:00
2021-07-16 14:50:57 +02:00
2021-07-16 14:50:57 +02:00
2021-09-14 14:24:07 -05:00
2021-10-21 17:34:04 +01:00
2021-10-21 17:34:04 +01:00
2021-08-20 15:43:17 +02:00
2022-01-04 10:56:00 -07:00
2019-07-26 16:48:58 -05:00
2021-11-01 16:14:53 +01:00
2021-05-03 12:14:44 +02:00
2021-09-23 14:48:51 +02:00
2021-10-22 07:00:44 +02:00
2021-08-25 15:32:44 +02:00
2021-11-04 10:55:28 +01:00
2022-01-04 16:40:10 +01:00
2022-01-04 16:40:10 +01:00
2021-12-21 13:23:09 +01:00
2021-12-21 13:23:09 +01:00
2021-12-21 13:23:09 +01:00
2021-07-15 14:50:48 +02:00
2021-11-12 12:37:29 +01:00
2021-11-23 16:43:08 +01:00
2021-09-09 15:29:00 +02:00
2021-08-19 13:32:10 +02:00
2021-09-08 15:13:12 +02:00
2021-10-25 12:48:46 +02:00
2021-05-24 20:26:20 +02:00
2021-09-09 18:06:13 +02:00
2021-10-01 10:58:27 +02:00
2022-01-03 13:14:43 +01:00
2021-11-22 12:39:59 +01:00
2021-09-08 15:31:01 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-11-04 10:55:28 +01:00
2021-11-02 10:52:18 +01:00
2021-05-18 09:09:37 -06:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2022-01-03 13:14:43 +01:00
2021-09-09 18:06:13 +02:00
2021-12-15 15:28:17 +01:00
2021-12-13 13:37:31 -05:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-09-14 14:24:07 -05:00
2021-10-21 17:34:04 +01:00
2021-09-09 18:06:13 +02:00
2021-12-13 13:37:31 -05:00
2021-12-13 13:37:31 -05:00
2021-09-09 18:06:13 +02:00
2021-10-18 12:09:33 +02:00
2021-09-09 18:06:13 +02:00
2021-05-18 10:02:24 +02:00
2021-11-11 16:16:30 +01:00
2021-11-17 12:04:11 +01:00
2022-01-03 13:14:43 +01:00
2022-01-03 13:14:43 +01:00
2021-12-13 14:44:01 +01:00
2021-11-05 17:12:25 +01:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-09-21 12:25:42 +02:00
2021-11-11 16:16:26 +01:00
2021-11-11 16:16:30 +01:00
2021-10-18 14:00:58 +02:00
2022-01-04 10:56:00 -07:00
2022-01-03 13:14:43 +01:00
2022-01-03 13:14:43 +01:00
2021-12-01 13:53:12 +01:00
2021-05-18 13:18:05 +02:00
2021-08-26 09:16:44 +02:00
2021-10-25 12:48:46 +02:00
2021-12-16 18:10:33 +00:00
2022-01-04 09:43:35 +01:00
2021-09-09 18:06:13 +02:00
2021-05-17 09:25:32 +02:00
2021-09-09 18:06:13 +02:00
2021-05-10 13:32:43 +02:00
2021-09-09 18:06:13 +02:00
2021-12-03 17:18:26 +01:00
2021-09-09 18:06:13 +02:00
2021-05-17 09:25:32 +02:00
2021-12-14 16:41:06 +01:00
2021-05-21 14:00:43 +02:00
2022-01-05 14:08:40 +01:00
2021-10-21 17:34:04 +01:00
2021-11-08 14:32:32 +01:00
2021-12-16 18:10:33 +00:00
2021-08-23 14:43:57 +02:00
2021-11-01 17:37:15 +01:00
2021-10-18 14:00:58 +02:00
2021-12-13 14:44:01 +01:00
2021-12-13 14:44:01 +01:00
2021-12-10 16:36:25 +01:00
2021-06-15 11:03:56 +02:00
2021-12-10 16:36:24 +01:00
2021-09-09 18:06:13 +02:00
2021-12-13 14:44:01 +01:00
2021-09-22 14:53:55 +02:00
2021-05-24 20:26:20 +02:00
2021-05-17 09:25:32 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-12-13 14:44:01 +01:00
2021-08-06 08:53:25 +02:00
2021-12-13 13:37:31 -05:00
2021-09-09 18:06:13 +02:00
2021-05-13 11:07:16 +01:00
2021-09-09 18:06:13 +02:00
2021-12-22 13:48:35 +01:00
2021-09-09 18:06:13 +02:00
2021-05-17 09:25:32 +02:00
2021-09-09 18:06:13 +02:00
2021-12-07 09:00:39 +01:00
2021-08-20 16:43:20 +02:00
2021-11-01 15:56:47 +01:00
2021-10-25 12:48:46 +02:00
2021-10-15 16:03:22 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-12-10 16:36:24 +01:00
2021-09-09 18:06:13 +02:00
2021-11-03 14:46:54 +01:00
2021-10-21 17:34:04 +01:00
2021-11-23 16:59:36 +01:00
2021-11-23 16:43:08 +01:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-06-02 16:43:57 +02:00
2021-11-23 11:41:55 +01:00
2021-09-23 13:41:39 +02:00
2021-09-17 14:28:00 +02:00
2021-12-13 14:44:01 +01:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2022-01-03 09:39:35 +01:00
2021-09-09 18:06:13 +02:00
2021-10-25 12:48:46 +02:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-11-01 16:08:26 +01:00
2021-12-17 15:05:58 +01:00
2021-09-09 18:06:13 +02:00
2021-09-09 18:06:13 +02:00
2021-11-01 16:08:26 +01:00