[go: nahoru, domu]

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

Using SYSTEM cURL (build against OpenSSL) conflicts with BoringSSL #43878

Open
Flamefire opened this issue Oct 8, 2020 · 2 comments
Open

Using SYSTEM cURL (build against OpenSSL) conflicts with BoringSSL #43878

Flamefire opened this issue Oct 8, 2020 · 2 comments
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.3 Issues related to TF 2.3 type:build/install Build and install issues

Comments

@Flamefire
Copy link
Contributor

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): RHEL 7.5
  • TensorFlow installed from (source or binary): source
  • TensorFlow version: 2.3.1

Describe the problem

Due to a hard-coded configure value of cURL (see #40065 (comment)) we build TensorFlow with a system-installed cURL via TF_SYSTEM_LIBS=curl. This curl uses the systems OpenSSL library (for security reasons this has to be managed by the system)

Some parts of TF use BoringSSL, e.g. grpcio (build as a dependency) seems to contain/build a BoringSSL itself.
Now loading the TF lib (via an import in Python) loads cURL, which loads OpenSSL which causes conflicts with the BoringSSL used and ultimately leads to invalid free calls:

Provide the exact sequence of commands / steps that you executed before running into the problem

  • build TensorFlow with TF_SYSTEM_LIBS=curl
  • Run any code using cURL through TF in Python. Example below:
import tensorflow_datasets as tfds

builder = tfds.builder('stanford_dogs')
builder.download_and_prepare()

Any other info / logs

*** Error in `python': free(): invalid pointer: 0x00000000046bfd08 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81299)[0x7f2b1dba9299]
<prefix>/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.2(ASN1_STRING_free+0x35)[0x7f2aac3d0205]
<prefix>/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.2(ASN1_primitive_free+0xbd)[0x7f2aac3d371d]
<prefix>/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.2(ASN1_template_free+0x8f)[0x7f2aac3d3b1f]
<prefix>/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.2(asn1_item_combine_free+0x2a0)[0x7f2aac3d39f0]
<prefix>/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.2(ASN1_item_free+0x17)[0x7f2aac3d3a77]
<prefix>/lib/libcurl.so.4(+0x57a20)[0x7f2aaae7ea20]
<prefix>/lib/libcurl.so.4(+0x593fb)[0x7f2aaae803fb]
<prefix>/lib/libcurl.so.4(+0x59fd7)[0x7f2aaae80fd7]
<prefix>/lib/libcurl.so.4(+0x110e2)[0x7f2aaae380e2]
<prefix>/lib/libcurl.so.4(+0x30215)[0x7f2aaae57215]
<prefix>/lib/libcurl.so.4(curl_multi_perform+0x83)[0x7f2aaae58473]
<prefix>/lib/libcurl.so.4(curl_easy_perform+0x11b)[0x7f2aaae50a6b]
<prefix>/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so(_ZN10tensorflow15CurlHttpRequest4SendEv+0x2b9)[0x7f2ac88c34f9]

Is there any solution from the side of TF to avoid this? From reading the docs of BoringSSL it should be possible to define BORINGSSL_PREFIX to something, so the symbols from OpenSSL and BoringSSL do not clash. But I'm not sure if I understood that correctly as BoringSSL would need to use that when being built already

@Flamefire Flamefire added the type:build/install Build and install issues label Oct 8, 2020
@amahendrakar amahendrakar added subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.3 Issues related to TF 2.3 labels Oct 9, 2020
@gowthamkpr gowthamkpr added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Oct 12, 2020
@sushreebarsa
Copy link
Contributor

@Flamefire Could you please let us know if we can move this issue to closed status as the PR is merged ? Thanks!

@sushreebarsa sushreebarsa added stat:awaiting response Status - Awaiting response from author and removed stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Oct 22, 2021
@Flamefire
Copy link
Contributor Author

No it is not resolved as the issue still persists and there is no official documentation about how to resolve this. The PR you linked is a workaround in a totally different repo which we found to work for us. It obviously doesn't fix the underlying issue.

@sushreebarsa sushreebarsa added stat:awaiting tensorflower Status - Awaiting response from tensorflower and removed stat:awaiting response Status - Awaiting response from author labels Oct 23, 2021
@mihaimaruseac mihaimaruseac removed their assignment Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.3 Issues related to TF 2.3 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

5 participants