-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix for bash's memory-leak Memory leak is observed during the execution of scripts that make use of bash-arrays. In scenarios where the offending script is executed on a regular basis (e.g. fancontrol), the leaking process may end up consuming most of the system resources. In this PR i'm replacing bash in all the contexts where it executes (both host and dockers). The official patch for this issue is here: https://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-040 * Fixing minor issue during code-merge Signed-off-by: Rodny Molina <rmolina@linkedin.com>
- Loading branch information
1 parent
14a0de7
commit 502ba0e
Showing
6 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# bash package | ||
# | ||
# Created to patch memory-leak issue in the bash-package included in Debian-8 (Jessie) | ||
# release. This rule file, and the associated building-infra created to solve this | ||
# bug (src/bash/), should be eliminated once the migration to Debian-9 (Stretch) is | ||
# completed. | ||
|
||
# Bash major release-number corresponding to Debian-8 (Jessie) | ||
BASH_VERSION_MAJOR = 4.3 | ||
# Bash complete release-number. This image contains all 4.3 fixes up to patch '42'. | ||
BASH_VERSION_FULL = $(BASH_VERSION_MAJOR)-14 | ||
|
||
export BASH_VERSION_MAJOR BASH_VERSION_FULL | ||
|
||
BASH = bash_$(BASH_VERSION_FULL)_amd64.deb | ||
$(BASH)_SRC_PATH = $(SRC_PATH)/bash | ||
SONIC_MAKE_DEBS += $(BASH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SHELL = /bin/bash | ||
.ONESHELL: | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = bash_$(BASH_VERSION_FULL)_amd64.deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
rm -rf bash-$(BASH_VERSION_MAJOR) | ||
|
||
dget -u https://launchpad.net/debian/+archive/primary/+sourcefiles/bash/$(BASH_VERSION_FULL)/bash_$(BASH_VERSION_FULL).dsc | ||
|
||
pushd bash-$(BASH_VERSION_MAJOR) | ||
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS) | ||
popd | ||
|
||
mv $* $(DEST)/ |