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

Bitbucket-Pipeline: Segmentation fault when testing IfcOpenShell Code

jgfhnw
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2024
I am currently trying to set up a bitbucket pipeline that executes the python tests of my application on new commits. unfortunately, a problem seems to occur as soon as the C++ part of the ifcopenshell library is to be executed: Segmentation Fault. The strange thing is that the tests run without any problems when I run the container locally on my computer.

MicrosoftTeams-image.png

bitbucket also uses docker to build its pipelines and i tried to build the containers as similar as possible. both use the same image and have the same execution steps.

bitbucket-pipelines.yml

image: python:3.10

pipelines:
  default:
    - step:
        name: Test
        caches:
          - pip
        script:
          - pip install -r requirements.txt
          - PYTHONPATH=src pytest

Dockerfile

FROM python:3.10
WORKDIR /workspace
COPY requirements.txt /workspace/requirements.txt
RUN pip install /workspace/requirements.txt
COPY src /workspace/src

when i run the tests locally, i do this directly via the console. not in the dockerfile.

PYTHONPATH=src pytest

What is causing the segmentation fault?

1 answer

1 accepted

2 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 29, 2024

G'day, @jgfhnw 

Welcome to the community!

May I suggest when testing locally to reproduce the exact environment similar to Bitbucket cloud, please follow the following documentation:

Troubleshoot Bitbucket pipeline locally 

With that in mind, the error sounds similar to what is being discussed here, so could you review them and try the suggested workaround in the threads to see if it helps your issue?

Let me know how it goes.

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events