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

[ML] Build PyTorch without Breakpad #2255

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

droberts195
Copy link
Contributor

Breakpad causes the libtorch_cpu.so library to have an
executable stack, which is undesirable.

Fixes elastic/elasticsearch#85691

Breakpad causes the libtorch_cpu.so library to have an
executable stack, which is undesirable.

Fixes elastic/elasticsearch#85691
@droberts195
Copy link
Contributor Author

>non-issue because logically this is part of #2238 and will be delivered in the same release.

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@droberts195
Copy link
Contributor Author

Confirmed it fixes the problem:

$ docker run -it --rm docker.elastic.co/ml-dev/ml-linux-build:22 /bin/bash
[root@7a31ffe519bf /]# readelf -a /usr/local/gcc103/lib/libtorch_cpu.so | grep -C 2 GNU_STACK
  GNU_EH_FRAME   0x0000000006fe06e4 0x0000000006fe06e4 0x0000000006fe06e4
                 0x0000000000183604 0x0000000000183604  R      4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     10
  GNU_RELRO      0x0000000007da18c0 0x0000000007da28c0 0x0000000007da28c0
[root@7a31ffe519bf /]# exit
exit
$ docker run -it --rm docker.elastic.co/ml-dev/ml-linux-build:21 /bin/bash
[root@cc63ada4cca2 /]# readelf -a /usr/local/gcc103/lib/libtorch_cpu.so | grep -C 2 GNU_STACK
  GNU_EH_FRAME   0x0000000006ff9e04 0x0000000006ff9e04 0x0000000006ff9e04
                 0x0000000000183bcc 0x0000000000183bcc  R      4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RWE    10
  GNU_RELRO      0x0000000007dbd400 0x0000000007dbe400 0x0000000007dbe400
[root@cc63ada4cca2 /]# exit
exit

The difference is that image version 22 added for this PR has RW for its GNU_STACK attributes whereas the old image, version 21, has RWE.

droberts195 added a commit to droberts195/elasticsearch that referenced this pull request Apr 11, 2022
The test was muted due to elastic#85691.

The underlying problem should be fixed by
elastic/ml-cpp#2255.

This PR needs to be merged after the new artifacts
created from merging elastic/ml-cpp#2255 have been
uploaded to S3.
@droberts195 droberts195 merged commit 3eb4114 into elastic:main Apr 11, 2022
@droberts195 droberts195 deleted the no_breakpad_for_pytorch branch April 11, 2022 12:27
droberts195 added a commit to elastic/elasticsearch that referenced this pull request Apr 12, 2022
The test was muted due to #85691.

The underlying problem should be fixed by
elastic/ml-cpp#2255.

This PR needs to be merged after the new artifacts
created from merging elastic/ml-cpp#2255 have been
uploaded to S3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] DebMetadataTests test05CheckLintian failing
2 participants