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

Sometimes the run_test.py fails #3985

Closed
Thirumalai-Shaktivel opened this issue May 9, 2024 · 6 comments
Closed

Sometimes the run_test.py fails #3985

Thirumalai-Shaktivel opened this issue May 9, 2024 · 6 comments
Labels
CI Continuous Integration

Comments

@Thirumalai-Shaktivel
Copy link
Member

Thirumalai-Shaktivel commented May 9, 2024

I saw this in my local system and here, it appeared for @nikabot PR in the GitHub Actions: https://github.com/lfortran/lfortran/actions/runs/9020150024/job/24784661205

$ ./run_tests.py -u
 UPDATE TEST:  derived_types_06.f90
+ lfortran -c tests/derived_types_04.f90
+ lfortran -c tests/derived_types_05.f90
[...]
 UPDATE TEST:  do_concurrent_reduce.f90
 UPDATE TEST:  do_concurrent_reduce2.f90
 UPDATE TEST:  do_concurrent_reduce3.f90
Traceback (most recent call last):
  File "/Users/thirumalai/Open_Source/lfortran/./run_tests.py", line 519, in <module>
    tester_main("LFortran", single_test)
  File "/Users/thirumalai/Open_Source/lfortran/src/libasr/compiler_tester/tester.py", line 479, in tester_main
    for f in futures:
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/Open_Source/lfortran/./run_tests.py", line 236, in single_test
    run_test(
  File "/Users/thirumalai/Open_Source/lfortran/src/libasr/compiler_tester/tester.py", line 317, in run_test
    do = json.load(open(jo))
         ^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/thirumalai/mambaforge/envs/lf/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@Thirumalai-Shaktivel Thirumalai-Shaktivel added the CI Continuous Integration label May 9, 2024
@certik
Copy link
Contributor

certik commented May 9, 2024

I saw the same thing locally as well sometimes.

@Shaikh-Ubaid
Copy link
Member

It happens often on linux for me. I think #3619 could be related.

@certik
Copy link
Contributor

certik commented May 9, 2024

Getting the CI running reliably is a full time job. If it is becoming a blocker, then we need to investigate and fix it. One fix might be to run the tests serially. It will be a bit slower, but at the CI it probably doesn't matter as much. Why don't you try it?

@certik
Copy link
Contributor

certik commented May 23, 2024

@certik
Copy link
Contributor

certik commented May 28, 2024

Failed for me locally in Ubuntu 22.04:

../integration_tests/types_03.f90 * wat ✓
../integration_tests/types_04.f90 * wat ✓
../integration_tests/types_05.f90 * wat ✓
Traceback (most recent call last):
  File "/home/ondrej/repos/lfortran/lfortran/./run_tests.py", line 530, in <module>
    tester_main("LFortran", single_test)
  File "/home/ondrej/repos/lfortran/lfortran/src/libasr/compiler_tester/tester.py", line 479, in tester_main
    for f in futures:
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/repos/lfortran/lfortran/./run_tests.py", line 237, in single_test
    run_test(
  File "/home/ondrej/repos/lfortran/lfortran/src/libasr/compiler_tester/tester.py", line 317, in run_test
    do = json.load(open(jo))
         ^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ondrej/miniforge3/envs/lf/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@certik
Copy link
Contributor

certik commented Jun 4, 2024

Fixed by #4150.

@certik certik closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

No branches or pull requests

3 participants