Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: GitLab CI pipeline fails unexpectedly for QDD 0.2.4 #70

Closed
marcosdiezgarcia opened this issue Oct 28, 2024 · 8 comments
Closed

Bug: GitLab CI pipeline fails unexpectedly for QDD 0.2.4 #70

marcosdiezgarcia opened this issue Oct 28, 2024 · 8 comments

Comments

@marcosdiezgarcia
Copy link

Jobs get unexpectedly and abruptly killed by the GitLab runner due to some incompatibility or misconfiguration between QDD and the GitLab CI runner.

To reproduce the error I created a new GitLab repository for testing purposes and configured a gitlab-ci.yml file which does the following:

  1. Creates an ubuntu 24.04 image and automatically installs some preliminary commands like git, python 3.12 and cmake >= 3.25.
  2. Git clones QDD official repository.
  3. Creates a Python 3.12 virtual environment and installs QDD from source (following QDD install instructions).
  4. Shows successful installation of qdd-0.2.4.
  5. Runs python -c "import qdd"

The output to stdout is the following:

/usr/bin/bash: line 162: 5658 Killed python -c "import qdd"

However, pytket-qdd and qdd run without issue when installed locally via pytket-qdd Makefile (tested on GNU/Linux Ubuntu 22.04).

gitlab-ci.yaml

default:
    image: ubuntu:latest
    before_script:
        - apt-get update --yes
        - apt-get install --yes python3-pip python3-build python3-virtualenv cmake git
        - virtualenv venv
        - source venv/bin/activate
        - git clone https://github.com/Fujitsu-UTokyo-QDD/QDD.git
        - cd QDD
        - bash ./scripts/local_build_and_test_new.sh build
        - pip install .
        - cd -

stages:
    - test

job-test:
    stage: test
    script:
        - python --version
        - pip show -f qdd
        - python -c "print('This is a test')"
        - python -c "import qdd"

See attached GitLab runner log.

20241022--gitlab-ci-qdd-log.txt

@kkyusuke
Copy link
Collaborator

I also confirmed that the same problem occurs in aarch64 (ARM) machine. The above pull request fixed the problem, at least in my environment.

@marcosdiezgarcia Could you share the information of your GitLab environment?

@marcosdiezgarcia
Copy link
Author

Thank you @kkyusuke for your feedback. Please allow me to double-check your update. Thanks.

@marcosdiezgarcia
Copy link
Author

marcosdiezgarcia commented Oct 30, 2024

Hi @kkyusuke,

I updated my gitlab-ci.yaml script to use:

git clone -b fix/gtest_cmake https://github.com/Fujitsu-UTokyo-QDD/QDD.git

Then I ran it again in full.

From the GitLab runner log (see attached) I noticed that the following error has been resolved:

CMake Error at /usr/share/cmake-3.28/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.
    Path: '/builds/marcos.diezgarcia/test/QDD/test/qdd_test'
    Result: Process terminated due to timeout
    Output:
      
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/GoogleTestAddTests.cmake:225 (gtest_discover_tests_impl)
gmake[2]: *** [test/CMakeFiles/qdd_test.dir/build.make:117: test/qdd_test] Error 1
gmake[2]: *** Deleting file 'test/qdd_test'
gmake[1]: *** [CMakeFiles/Makefile2:341: test/CMakeFiles/qdd_test.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

However, after installing QDD and trying python -c "import qdd", I still get the job killed error:

usr/bin/bash: line 160: 5655 Killed python -c "import qdd"

gitlab-ci_log.txt

Thanks for your support.

@marcosdiezgarcia
Copy link
Author

marcosdiezgarcia commented Oct 30, 2024

Details of GitLab runner environment:

$ uname -a
Linux runner-5gkczqktm-project-8400-concurrent-0 5.15.0-1074-azure #83~20.04.1-Ubuntu SMP Fri Oct 4 21:49:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ lscpu
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        46 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               2
On-line CPU(s) list:                  0,1
Vendor ID:                            GenuineIntel
BIOS Vendor ID:                       Intel(R) Corporation
Model name:                           Intel(R) Xeon(R) Platinum 8 CPU @ 2.60GHz
BIOS Model name:                      Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz None CPU @ 2.6GHz

(further lscpu details)

@kkyusuke
Copy link
Collaborator

kkyusuke commented Nov 4, 2024

I finally found that it is out of memory error.
I have added one more commit in #71, and I believe it will fix the problem.

I plan to merge these changes this week, as a new release.

@marcosdiezgarcia
Copy link
Author

Thank you @kkyusuke for looking into this and proposing a fix.

@marcosdiezgarcia
Copy link
Author

Hi Kimura-san @kkyusuke . I noticed you updated QDD to 0.2.5 version.

I tried again my gitab-ci script using this new version with same gitlab runner environment configuration.

The following is extracted from the gitlab runner output:

image

Now running import qdd does not cause the gitlab runner job to get killed. The job is completed successfully. I tried a few times running the job and it succedes for each time, so I think the bug seems solved now.

Many thanks.

@kkyusuke
Copy link
Collaborator

kkyusuke commented Nov 6, 2024

Hi, @marcosdiezgarcia!
Thank you so much for this report.

The problems are fixed, so this issue will be closed.
Again, thanks a lot.

@kkyusuke kkyusuke closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants