Author: Andy Green Date: Mon Aug 16 15:28:35 2021 +0100 threadpool: move illegal access out diff --git a/READMEs/README-systemd-nspawn.md b/READMEs/README-systemd-nspawn.md index 86cedbb..611db85 100644 --- a/READMEs/README-systemd-nspawn.md +++ b/READMEs/README-systemd-nspawn.md @@ -119,6 +119,10 @@ If a 32-bit install, leave out libc6-i386 Container # apt install sudo make git gcc cmake net-tools libssl-dev vim libc6-i386 dbus systemd-container libmbedtls-dev libev4 libev-dev libuv1 libuv1-dev libmount-dev libsqlite0-dev libgit2-dev inetutils-ping psmisc libgit2-27 libmbedcrypto3 libmbedtls12 libmbedx509-0 libmbedtls-dev libevent-2.1-6 libevent-dev libglib2.0-0 libsqlite3-0 libsqlite3-dev pkg-config libglib2.0-dev libglib2.0-0 libdbus-1-dev libdbus-1-3 g++ ``` +### Specific to Debian 11 + +Container # apt install sudo make git gcc cmake net-tools libssl-dev vim libc6-i386 dbus systemd-container libmbedtls-dev libev4 libev-dev libuv1 libuv1-dev libmount-dev libsqlite3-dev libgit2-dev inetutils-ping psmisc libgit2-1.1 libmbedcrypto3 libmbedtls12 libmbedx509-0 libmbedtls-dev libevent-2.1-7 libevent-dev libglib2.0-0 libsqlite3-0 libsqlite3-dev pkg-config libglib2.0-dev libglib2.0-0 libdbus-1-dev libdbus-1-3 g++ file + ### Specific to Ubuntu We have to enable the "universe" packageset to get normal things. diff --git a/src/builder/b-comms.c b/src/builder/b-comms.c index 12dbda4..479ee86 100644 --- a/src/builder/b-comms.c +++ b/src/builder/b-comms.c @@ -155,9 +155,7 @@ tp_sync_check(struct lws_dll2 *d, void *user) if (soe == NSSTATE_FAILED) { lwsl_notice("%s: thread over with FAILED\n", __func__); - saib_set_ns_state(ns, NSSTATE_FAILED); - saib_task_grace(ns); - goto next; + goto failer; } /* @@ -169,18 +167,16 @@ tp_sync_check(struct lws_dll2 *d, void *user) ns->tp_task = NULL; lws_sul_cancel(&ns->sul_task_cancel); - saib_set_ns_state(ns, NSSTATE_BUILD); n = saib_spawn(ns); - if (!n) - goto next; - - lwsl_err("%s: spawn failed: %d\n", __func__, n); - - lwsl_notice("%s: failing spawn cleanly\n", __func__); - saib_set_ns_state(ns, NSSTATE_FAILED); - saib_task_grace(ns); + if (n) { + lwsl_err("%s: spawn failed: %d\n", __func__, n); +failer: + saib_set_ns_state(ns, NSSTATE_FAILED); + saib_task_grace(ns); + saib_queue_task_status_update(ns->sp, ns->spm, NULL); + } next: diff --git a/src/builder/b-mirror.c b/src/builder/b-mirror.c index 9426c2e..7bca81a 100644 --- a/src/builder/b-mirror.c +++ b/src/builder/b-mirror.c @@ -476,11 +476,6 @@ fail: lwsl_err("%s: failed\n", __func__); ns->retcode = SAISPRF_EXIT | 253; - saib_set_ns_state(ns, NSSTATE_FAILED); - saib_task_grace(ns); - - if (saib_queue_task_status_update(ns->sp, ns->spm, NULL)) - return LWS_TP_RETURN_SYNC; return LWS_TP_RETURN_SYNC; } diff --git a/src/builder/b-task.c b/src/builder/b-task.c index 537577e..5bb14fc 100644 --- a/src/builder/b-task.c +++ b/src/builder/b-task.c @@ -1,7 +1,7 @@ /* * sai-builder task acquisition * - * Copyright (C) 2019 - 2020 Andy Green + * Copyright (C) 2019 - 2021 Andy Green * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public