core: reset bus error before reuse
From a report in https://bugzilla.redhat.com/show_bug.cgi?id=1861463: usb-gadget.target: Failed to load configuration: No such file or directory usb-gadget.target: Failed to load configuration: No such file or directory usb-gadget.target: Trying to enqueue job usb-gadget.target/start/fail usb-gadget.target: Failed to load configuration: No such file or directory Assertion '!bus_error_is_dirty(e)' failed at src/libsystemd/sd-bus/bus-error.c:239, function bus_error_setfv(). Ignoring. sys-devices-platform-soc-2100000.bus-2184000.usb-ci_hdrc.0-udc-ci_hdrc.0.device: Failed to enqueue SYSTEMD_WANTS= job, ignoring: Unit usb-gadget.target not found. I *think* this is the place where the reuse occurs: we call bus_unit_validate_load_state(unit, e) twice in a row.
This commit is contained in:
parent
c9fecf18b9
commit
94efaa3181
|
@ -966,6 +966,7 @@ int transaction_add_job_and_dependencies(
|
|||
* Given building up the transaction is a synchronous operation, attempt
|
||||
* to load the unit immediately. */
|
||||
if (r < 0 && manager_unit_file_maybe_loadable_from_cache(unit)) {
|
||||
sd_bus_error_free(e);
|
||||
unit->load_state = UNIT_STUB;
|
||||
r = unit_load(unit);
|
||||
if (r < 0 || unit->load_state == UNIT_STUB)
|
||||
|
|
Loading…
Reference in New Issue