Skip to content

GH-43377: [Java][CI] Java-Jars CI is Failing with a linking error on macOS - #43385

Merged
danepitkin merged 6 commits into
apache:mainfrom
vibhatha:gh-43377
Jul 26, 2024
Merged

danepitkin merged 6 commits into
apache:mainfrom
vibhatha:gh-43377

Conversation

@vibhatha

@vibhatha vibhatha commented Jul 23, 2024 •

Copy link
Copy Markdown
Contributor

Rationale for this change

For googletest, we have installation via BUNDLED and brew, a version mismatch from one of these options could cause conflicts and linking related issues. Preferring BUNDLED version, this PR uninstalls the brew installation of googletest.

What changes are included in this PR?

Removing brew installation of googletest

Are these changes tested?

Yes.

Are there any user-facing changes?

No

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit -g java

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #43377 has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

Revision: 02eb021c7862e3bb06c496bf65cd40f6d49a8e74

Submitted crossbow builds: ursacomputing/crossbow @ actions-5dda3b0a91

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

@llama90 llama90 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it quickly. Thank you for looking into the issue caused by my PR.

Comment thread dev/tasks/java-jars/github.yml Resolved
@llama90

llama90 commented Jul 23, 2024

Copy link
Copy Markdown
Contributor

Additionally, according to the link, it seems that the MACOSX_DEPLOYMENT_TARGET needs to be updated, but I’ve noticed that this code appears in many places.

I think this should be addressed beyond just Java. Should I create an issue for this?

@vibhatha

Copy link
Copy Markdown
Contributor Author

Additionally, according to the link, it seems that the MACOSX_DEPLOYMENT_TARGET needs to be updated, but I’ve noticed that this code appears in many places.

I think this should be addressed beyond just Java. Should I create an issue for this?

That would be wonderful @llama90

* [code search result](https://github.com/search?q=repo%3Aapache%2Farrow%20MACOSX_DEPLOYMENT_TARGET&type=code)

@llama90

llama90 commented Jul 23, 2024

Copy link
Copy Markdown
Contributor

FYI: #43386 (comment)

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit -g java java-jars

@github-actions

Copy link
Copy Markdown

Revision: 4b467bdf9b0b14744f49120061bd29de6a0d4066

Submitted crossbow builds: ursacomputing/crossbow @ actions-9387c4cfe5

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit java-jars

@github-actions

Copy link
Copy Markdown

Revision: 4b467bdf9b0b14744f49120061bd29de6a0d4066

Submitted crossbow builds: ursacomputing/crossbow @ actions-834fce646a

Task Status
java-jars GitHub Actions

@danepitkin

danepitkin commented Jul 23, 2024 •

Copy link
Copy Markdown
Member

I don't think changing MACOSX_DEPLOYMENT_TARGET is going to help here, only because the warning also appears in the last successful java-jars build. It looks like parquet tests and orc tests are failing to link in the C++ layer.

For example, in https://github.com/ursacomputing/crossbow/actions/runs/10055540527/job/27792410574:

...
[497/510] Linking CXX executable release/arrow-orc-adapter-test
FAILED: release/arrow-orc-adapter-test 
...
[498/510] Linking CXX executable release/parquet-internals-test
FAILED: release/parquet-internals-test 
...
[499/510] Linking CXX executable release/parquet-writer-test
FAILED: release/parquet-writer-test 
...
[500/510] Linking CXX executable release/parquet-reader-test
FAILED: release/parquet-reader-test 
...
[501/510] Linking CXX executable release/parquet-arrow-test
FAILED: release/parquet-arrow-test 
...

@kou by chance do you know what might be happening here?

@vibhatha

Copy link
Copy Markdown
Contributor Author

@danepitkin I was merely testing an idea, in the time period the change happened the direct change I could find was the change in the CIs. And I agree, the issue is with the test library which cannot be linked.

@kou

kou commented Jul 24, 2024

Copy link
Copy Markdown
Member

It seems that this was happen since 2024-07-16: https://github.com/ursacomputing/crossbow/actions/runs/9953458018/job/27502447467
This was not happen at 2024-07-15: https://github.com/ursacomputing/crossbow/actions/runs/9936214033/job/27449403626

We may be able to find a cause of this by diffing these logs.

@vibhatha

Copy link
Copy Markdown
Contributor Author

@kou I looked into the history of merged PRs and sort of tracked from where it started occurring. It seems like we haven't made significant changes to the build or C++ components from Java PRs.

At this point #43109 (comment) the java-jars failed at merge for a different reason not an issue with MacOS related builds. But when I re-ran the crossbow on the merged PR, I get the current issue we are experiencing. Also this failing CI is only related to Java as it seems, and existing C++ CIs have not been reported failing AFAIK. Could this be an environment related issue?

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit -g cpp

@vibhatha

Copy link
Copy Markdown
Contributor Author

Just saw this filed #43400, this is the same issue.

@github-actions

Copy link
Copy Markdown

Revision: 4b467bdf9b0b14744f49120061bd29de6a0d4066

Submitted crossbow builds: ursacomputing/crossbow @ actions-214fbb71e3

Task Status
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit -g java

@github-actions

Copy link
Copy Markdown

Revision: 5879052a57039c584841819fb5847ff8a9e9eaef

Submitted crossbow builds: ursacomputing/crossbow @ actions-0883833aa3

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit java-jars

@github-actions

Copy link
Copy Markdown

Revision: 51f076466edad33ba4223ca941511c0ac7d7a0cf

Submitted crossbow builds: ursacomputing/crossbow @ actions-04d5e09e65

Task Status
java-jars GitHub Actions

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit java-jars

@github-actions

Copy link
Copy Markdown

Revision: 85c1244

Submitted crossbow builds: ursacomputing/crossbow @ actions-6f3ab99e36

Task Status
java-jars GitHub Actions

@vibhatha

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit -g java

@vibhatha
vibhatha marked this pull request as ready for review July 26, 2024 00:01
@github-actions

Copy link
Copy Markdown

Revision: 10c59a8

Submitted crossbow builds: ursacomputing/crossbow @ actions-96d6d76c00

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

@danepitkin danepitkin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, amazing work! I have always used bundled GTest when developing on MacOS, so I think this is good to include in our CI.

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 9174bb7.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

- { runs_on: ["macos-14"], arch: "aarch_64" }
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
MACOSX_DEPLOYMENT_TARGET: "14.0"

@assignUser assignUser Jul 27, 2024 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vibhatha That's quite the bump, I am pretty sure we also want to support less recent macos.

Specify the minimum version of the target platform (e.g. macOS or iOS) on which the target binaries are to be deployed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad for merging this quickly. I was too eager to get java-jars working again. Let's revert that part of the diff since it's not necessary.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was too eager to get java-jars working again.

No worry, it's a good goal^^ We can likely bump it to 11 or even 12 (as 11 is also eol... but we don't have a support policy so...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@assignUser this was an artifact from my previous failed attempt to fix this issue. I have not reverted that. But I will revert it shortly.

Comment on lines +143 to +148

# We want to use the bundled googletest for static linking. Since
# both BUNDLED and brew options are enabled, it could cause a conflict
# when there is a version mismatch.
# We uninstall googletest to ensure using the bundled googletest.
brew uninstall googletest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this part before brew bundle --file=arrow/java/Brewfile?
Because googletest is in cpp/Brewfile not java/Brewfile.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure @kou I will make a follow up PR shortly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kou PR is here: #43462

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

Successfully merging this pull request may close these issues.

5 participants