Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Check style pipe failing with out of memory error

Andrew Macdonald June 5, 2023

tried many different options including increasing memory and turning on debug for the pipe and always get the same error.

"library initialization failed - unable to allocate file descriptor table - out of memory"

with no additional information. 

current pipe step is:

    - step:
        name: Build and Test
          - self.hosted
          - linux
          - maven
          - mvn -V -B -U clean install checkstyle:checkstyle help:effective-pom -Dmaven.test.skip=false -s settings.xml
          - "target/coverage-reports/**"
          - "target/surefire-reports/**"
          - "target/checkstyle-result.xml"
            # Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
          - pipe: atlassian/checkstyle-report:0.3.0
              DEBUG: 'true'
verified there is a checkstyle-result.xml file in the target folder and it is attached as an artifact to the pipeline result.

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2023

Hello @Andrew Macdonald and thank you for reaching out to Community!

A pipe is essentially a separate container that is spun up to run a custom script. Since it's running in a separate container, it will use the memory allocated to the docker service, which by default is 1024MB.

As the error being returned is related  to out-of-memory, I would suggest trying to increase the memory allocated to the docker service (and therefore for the pipe) by including the following definition on the top of your YML file : 

      memory: 2048  # increase memory for docker-in-docker from 1GB to 2GB

You can increase this value up to 3072MB for regular steps, and 7128MB for steps configured as large steps (size: 2x).

For more details about how the memory is allocated in Pipelines, you're also welcome to have a look at the following documentation: 

Thank you, @Andrew Macdonald !

Patrik S

Andrew Macdonald June 6, 2023

I added the Definitions as suggested first setting memory at 2048 with default size 1x on the step. Still got the same error.

I then tried memory 4096 and size 2x.  I still got the same error. 

I'm running this pipe on a self hosted runner and I think that may be the issue and the memory error reported is actually not the true issue.

I tried running this as a separate step on a cloud runner instead of as an after-script on a self hosted runner. It ran for a much longer time (4+ minutes as opposed to 4s) and errored with the following "time="2023-06-06T18:06:11Z" level=error msg="error waiting for container: unexpected EOF""

Are there known issues with running this pipe on a selfhosted runner?

Andrew Macdonald June 8, 2023

@Patrik S the memory suggestions didn't correct my issues. Error appears to be a false error and issue appears to be related to running pipe on hosted runner.

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2023

Hello @Andrew Macdonald ,

I was trying to reproduce the error using a Linux docker self-hosted runner on a host with Ubuntu 20.04.6 LTS and using the pipe atlassian/checkstyle-report:0.3.0 and the build was completed successfully, so I think the issue is using pipes with self-hosted runners.

In this case, could you confirm if the host where you are executing the runner meets the Runner's Supported Platforms and Minimum requirements 

Also, I was checking the checkstyle-report pipe official repository and see the latest version available for that pipe is 0.4.0. Could you please try updating to that version and check if there's any improvement?

Thank you, @Andrew Macdonald !

Patrik S

Like Igor Stoyanov likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events