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

[Java][Integration][Release] verify-rc-source-integration-linux-conda-latest-amd64 fails with MemoryError #44389

Closed
raulcd opened this issue Oct 12, 2024 · 7 comments

Comments

@raulcd
Copy link
Member

raulcd commented Oct 12, 2024

Describe the bug, including details regarding any error messages, version, and platform.

The verify-rc-source-integration-linux-conda-latest-amd64 is failing consistently with:

##########################################################
  C Data Interface: C++ exporting, Java importing
  ##########################################################
Traceback (most recent call last):
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/bin/archery", line 8, in <module>
    sys.exit(archery())
             ~~~~~~~^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/arrow/dev/archery/archery/cli.py", line 872, in integration
    run_all_tests(**args)
    ~~~~~~~~~~~~~^^^^^^^^
  File "/arrow/dev/archery/archery/integration/runner.py", line 713, in run_all_tests
    runner.run_c_data()
    ~~~~~~~~~~~~~~~~~^^
  File "/arrow/dev/archery/archery/integration/runner.py", line 148, in run_c_data
    self._compare_c_data_implementations(producer, consumer)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/arrow/dev/archery/archery/integration/runner.py", line 461, in _compare_c_data_implementations
    with consumer.make_c_data_importer() as importer:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/arrow/dev/archery/archery/integration/tester_java.py", line 356, in make_c_data_importer
    return JavaCDataImporter(self.debug, self.args)
  File "/arrow/dev/archery/archery/integration/tester_java.py", line 108, in __init__
    setup_jpype()
    ~~~~~~~~~~~^^
  File "/arrow/dev/archery/archery/integration/tester_java.py", line 92, in setup_jpype
    jpype.startJVM(jpype.getDefaultJVMPath(),
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
                   "-Djava.class.path=" + jar_path,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
                   "-Xrs",
                   ^^^^^^^
                   *_JAVA_OPTS)
                   ^^^^^^^^^^^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/jpype/_core.py", line 250, in startJVM
    initializeResources()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/jpype/_core.py", line 275, in initializeResources
    _jpype._java_lang_String = _jpype.JClass("java.lang.String")
                               ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/jpype/_jclass.py", line 99, in __new__
    return _jpype._getClass(jc)
           ~~~~~~~~~~~~~~~~^^^^
  File "/tmp/arrow-HEAD.LSZ9o/miniforge/envs/conda-source/lib/python3.13/site-packages/jpype/_jclass.py", line 147, in _jclassPost
    for cls in res.class_.getDeclaredClasses():
               ^^^^^^^^^^
MemoryError
Failed to verify release candidate. See /tmp/arrow-HEAD.LSZ9o for details.

This is also failing on the maintenance branch for 18.0.0

Component(s)

Integration, Java, Release

@lidavidm
Copy link
Member

This may also be a Python 3.13-related issue. jpype-project/jpype#1204

@lidavidm
Copy link
Member

While that issue is closed, I don't see a corresponding commit. It's possible this will be tied to Python <= 3.12 for the foreseeable future. Unfortunately I'm also not sure if we can feasibly use something other than jpype here...

@pitrou
Copy link
Member

pitrou commented Oct 12, 2024

For now, JPype can't work on 3.13. There is a lengthy (and sometimes difficult to follow) explanation here: https://discuss.python.org/t/api-for-python-3-13-prevents-use-of-3rd-party-gc-allocators/62709/5

So, yes, we should pin Python to 3.12 in the integration builds.

kou added a commit that referenced this issue Oct 12, 2024
…fication when using Conda (#44388)

### Rationale for this change

Conda Python 3.13 fails when running verification tasks for Java. It's related to JPype.

See also:
* GH-44389
* https://discuss.python.org/t/api-for-python-3-13-prevents-use-of-3rd-party-gc-allocators/62709/5

### What changes are included in this PR?

Pin Python 3.12 on Conda integration jobs because JPype doesn't work with Python 3.13. We can use Python 3.13 again once JPype supports Python 3.13.

### Are these changes tested?

Yes via CI

### Are there any user-facing changes?

No
* GitHub Issue: #44386

Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou
Copy link
Member

kou commented Oct 12, 2024

Should we keep this open for JPype update?
(We can remove this from the 18.0.0 milestone because we merged GH-44388.)

raulcd added a commit that referenced this issue Oct 13, 2024
…fication when using Conda (#44388)

### Rationale for this change

Conda Python 3.13 fails when running verification tasks for Java. It's related to JPype.

See also:
* GH-44389
* https://discuss.python.org/t/api-for-python-3-13-prevents-use-of-3rd-party-gc-allocators/62709/5

### What changes are included in this PR?

Pin Python 3.12 on Conda integration jobs because JPype doesn't work with Python 3.13. We can use Python 3.13 again once JPype supports Python 3.13.

### Are these changes tested?

Yes via CI

### Are there any user-facing changes?

No
* GitHub Issue: #44386

Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@raulcd raulcd modified the milestones: 18.0.0, 19.0.0 Oct 13, 2024
@raulcd raulcd removed the Priority: Blocker Marks a blocker for the release label Oct 13, 2024
@raulcd
Copy link
Member Author

raulcd commented Oct 13, 2024

Ooops, this wasn't solved by the other PR because this is on Linux not on macOS where the fix was done.
The job is still failing but knowing that this is just a matter of pinning Python to 3.13 I don't think we have to add a fix to the maintenance branch. See latest failure on the maintenance branch: https://github.com/ursacomputing/crossbow/actions/runs/11313587580/job/31462525580

@kou
Copy link
Member

kou commented Oct 13, 2024

Oh, sorry. I missed it: GH-44395

raulcd pushed a commit that referenced this issue Oct 16, 2024
…source-integration-linux-conda-latest-amd64 (#44395)

### Rationale for this change

Because JPype doesn't support Python 3.13 yet.

See also:
* GH-44389
* https://discuss.python.org/t/api-for-python-3-13-prevents-use-of-3rd-party-gc-allocators/62709/5

### What changes are included in this PR?

Pin Python 3.12.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #44389

Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
@raulcd
Copy link
Member Author

raulcd commented Oct 16, 2024

Issue resolved by pull request 44395
#44395

@raulcd raulcd closed this as completed Oct 16, 2024
@raulcd raulcd modified the milestones: 19.0.0, 18.0.0 Oct 17, 2024
@raulcd raulcd added this to the 19.0.0 milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants