From a64604470591a54239a20c8e1ac19663bce2de49 Mon Sep 17 00:00:00 2001 From: Sagar Karandikar Date: Sun, 16 Oct 2022 17:19:12 -0700 Subject: [PATCH] fix open files issue and bump firesim with various fixes --- build-setup.sh | 1 + scripts/fix-open-files.sh | 12 ++++++++++++ sims/firesim | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 scripts/fix-open-files.sh diff --git a/build-setup.sh b/build-setup.sh index 2435705b..8d5d25a5 100755 --- a/build-setup.sh +++ b/build-setup.sh @@ -96,4 +96,5 @@ $RDIR/scripts/gen-tags.sh cat << EOT >> env.sh # line auto-generated by $0 conda activate $RDIR/.conda-env +source $RDIR/scripts/fix-open-files.sh EOT diff --git a/scripts/fix-open-files.sh b/scripts/fix-open-files.sh new file mode 100644 index 00000000..79e12e7a --- /dev/null +++ b/scripts/fix-open-files.sh @@ -0,0 +1,12 @@ + +# first, check if the system allows sufficient limits (the hard limit) +HARD_LIMIT=$(ulimit -Hn) +REQUIRED_LIMIT=16384 + +if [ "$HARD_LIMIT" -lt "$REQUIRED_LIMIT" ]; then + echo "WARNING: Your system does not support an open files limit (the output of 'ulimit -Sn' and 'ulimit -Hn') of at least $REQUIRED_LIMIT, which is required to workaround a bug in buildroot. You will not be able to build a Linux distro with FireMarshal until this is addressed." +fi + +# in any case, set the soft limit to the same value as the hard limit +ulimit -Sn $(ulimit -Hn) + diff --git a/sims/firesim b/sims/firesim index 37d4fd03..b1abd4b2 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit 37d4fd03d68af44bfe22712c102ec0c2b361c9f7 +Subproject commit b1abd4b296c84b52eab4270bbe8b7bd835d68cd0