hyperledger / hyperledger/fabric

Installing a new package fails in an environment with many packages installed.

Open
#3,709 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

[Describe the bug]

The following command fails when a large number of packages are installed.
(In this environment, 56 chaincodes have been installed under different names.)

peer lifecycle chaincode install /var/tmp/fabcar057.tar.gz

--errormessage1--
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: Post "http://xxx.xxx.xxx.xxx:xxxx/build?networkmode=fabric_default&t=CHAINCODE-CONTAINER-NAME": docker build failed: Error executing build: API error (500): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 2, stdout: , stderr: runtime/cgo: pthread_create failed: Resource temporarily unavailable
--errormessage2--
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: Post "http://xxx.xxx.xxx.xxx:xxxx/build?networkmode=fabric_default&t=CHAINCODE-CONTAINER-NAME": docker build failed: Error executing build: API error (500): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 2, stdout: , stderr: fatal error: runtime: cannot allocate memory

[Expected behavior]

The package can be installed.

[Logs/Stack traces]

Refer to Describe the bug

[Operating system name, version, build]

XXXX@server:~$ printf "$(uname -srm)\n$(cat /etc/os-release)\n"
Linux 5.4.0-97-generic x86_64
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.