diff --git a/common/utils/assertions.h b/common/utils/assertions.h index 3424392e7a..453e853aec 100644 --- a/common/utils/assertions.h +++ b/common/utils/assertions.h @@ -33,7 +33,7 @@ #define OAI_EXIT_ASSERT 1 #define _Assert_Exit_ \ - if (getenv("gdbStacks")) { \ + if (getenv("OAI_GDBSTACKS")) { \ char tmp [1000]; \ sprintf(tmp,"gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \ __attribute__((unused)) int dummy=system(tmp); \ diff --git a/doc/environment-variables.md b/doc/environment-variables.md index 5b2ae52030..9137533e8a 100644 --- a/doc/environment-variables.md +++ b/doc/environment-variables.md @@ -7,10 +7,10 @@ OAI uses/supports a number of environment variables, documented in the following - `NR_MIMO2x2_AWGN_RESULTS_DIR`: directory containing BLER curves for L2simulator channel modelling in 2x2 MIMO case - `NVRAM_DIR`: directory to read/write NVRAM data in (5G) `nvram` tool; if not defined, will use `PWD` (working directory) - `OAI_CONFIGMODULE`: can be used to pass the configuration file instead of `-O` +- `OAI_GDBSTACKS`: if defined when hitting an assertion (`DevAssert()`, `AssertFatal()`, ...), OAI will load `gdb` and provide a backtrace for every thread - `OPENAIR_DIR`: should point to the root directory of OpenAirInterface; some code relies on this to get a filename, e.g., BLER curves for L2sim channel emulation - `RFSIMULATOR`: the RFsimulator's work mode, can be either `server` (for server mode) or a valid IP address (for client mode) - `USIM_DIR`: directory to read/write USIM data in (4G) `usim` tool; if not defined, will use `PWD` (working directory) -- `gdbStacks`: if defined when hitting an assertion (`DevAssert()`, `AssertFatal()`, ...), OAI will load `gdb` and provide a backtrace for every thread - `threadPoolMeasurements`: path to a file to store thread pool debugging information, see the [thread pool documentation](..common/utils/threadPool/thread-pool.md) Furthermore, these variables appear in code that is not maintained and maybe not even compiled anywhere: diff --git a/docker/scripts/enb_entrypoint.sh b/docker/scripts/enb_entrypoint.sh index aadd8b71d1..cda5793ab3 100755 --- a/docker/scripts/enb_entrypoint.sh +++ b/docker/scripts/enb_entrypoint.sh @@ -26,7 +26,7 @@ elif [[ -v USE_N3XX ]]; then fi # enable printing of stack traces on assert -export gdbStacks=1 +export OAI_GDBSTACKS=1 echo "==================================" echo "== Starting eNB soft modem" diff --git a/docker/scripts/gnb-aw2s_entrypoint.sh b/docker/scripts/gnb-aw2s_entrypoint.sh index b03e214ce1..752e3005ed 100755 --- a/docker/scripts/gnb-aw2s_entrypoint.sh +++ b/docker/scripts/gnb-aw2s_entrypoint.sh @@ -15,7 +15,7 @@ echo "== Configuration file:" cat $CONFIGFILE # enable printing of stack traces on assert -export gdbStacks=1 +export OAI_GDBSTACKS=1 echo "==================================" echo "== Starting gNB soft modem with AW2S" diff --git a/docker/scripts/gnb_entrypoint.sh b/docker/scripts/gnb_entrypoint.sh index ef268b1143..230f3f0f7d 100755 --- a/docker/scripts/gnb_entrypoint.sh +++ b/docker/scripts/gnb_entrypoint.sh @@ -27,7 +27,7 @@ elif [[ -v USE_N3XX ]]; then fi # enable printing of stack traces on assert -export gdbStacks=1 +export OAI_GDBSTACKS=1 echo "==================================" echo "== Starting gNB soft modem" diff --git a/docker/scripts/lte_ru_entrypoint.sh b/docker/scripts/lte_ru_entrypoint.sh index 4ce5615482..0305cf27ff 100755 --- a/docker/scripts/lte_ru_entrypoint.sh +++ b/docker/scripts/lte_ru_entrypoint.sh @@ -26,7 +26,7 @@ elif [[ -v USE_N3XX ]]; then fi # enable printing of stack traces on assert -export gdbStacks=1 +export OAI_GDBSTACKS=1 echo "==================================" echo "== Starting eNB soft modem" diff --git a/docker/scripts/lte_ue_entrypoint.sh b/docker/scripts/lte_ue_entrypoint.sh index a8d0f8fd1a..f88692a957 100755 --- a/docker/scripts/lte_ue_entrypoint.sh +++ b/docker/scripts/lte_ue_entrypoint.sh @@ -52,7 +52,7 @@ if [[ -f "$CONFIGFILE" ]]; then fi # enable printing of stack traces on assert -export gdbStacks=1 +export OAI_GDBSTACKS=1 echo "==================================" echo "== Starting LTE UE soft modem" diff --git a/docker/scripts/nr_ue_entrypoint.sh b/docker/scripts/nr_ue_entrypoint.sh index 840a8ae729..e84386276a 100755 --- a/docker/scripts/nr_ue_entrypoint.sh +++ b/docker/scripts/nr_ue_entrypoint.sh @@ -33,7 +33,7 @@ while [[ $# -gt 0 ]]; do done # enable printing of stack traces on assert -export gdbStacks=1 +export OAI_GDBSTACKS=1 echo "==================================" echo "== Starting NR UE soft modem"