Skip to content

tensorflow 2.0.0 crashes with protobuf 3.10.1 on macOS #35573

Description

@essandess

Using MacPorts with the latest up-to-date versions (tensorflow 2.0.0, protobuf 3.10.1),

python3 -c 'import tensorflow'

[libprotobuf ERROR google/protobuf/descriptor_database.cc:394] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL google/protobuf/descriptor.cc:1359] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
Abort trap: 6

This is reported and closed in tensorflow/tensorboard#2985, but the issue persists.

A workaround is pip-3.7 install protobuf==3.8, but this doesn't work with system-level, up-to-date library installs like with MacPorts. Also see: https://trac.macports.org/ticket/59826

Is this an issue with TF, or with protobuf?

Activity

  1. self-assigned this
    on Jan 6, 2020
  2. assigned and unassigned on Jan 6, 2020
  3. gunan commented on Jan 8, 2020

    @gunan
    Contributor

    Are you installing TF through macports or pip.
    Unless macports just fetches the package from what we are building, it may be built with different flags, causing all kinds of ABI issues.
    Similar for protobuf. If these are packages not built by us, I do not think we can do much to help.

    If this issue is reproducible with the TF 2.0 from pip(pypi) and latest protobuf from pypi(3.11.2, or even 3.10.1), we can debug. Otherwise, I would say this is potentially due to th way macports builds these packages.

  4. essandess commented on Jan 8, 2020

    @essandess
    Author

    Good point. The issue isn't reproducible with a pip install, so it's some MacPorts flag or related issue.

    I'll try to produce a clean, working build on macOS and reflect the working steps in a Portfile.

  5. SARCASMOOO commented on Feb 12, 2020

    @SARCASMOOO

    Another thing you can try is to install an older version of libprotobuf and *protobuf. I had the same issue but I was using anaconda. I went from version 3.10.1 to version 3.8.0. After doing this it started working. Not sure if this is because I unistalled and reinstalled thoughs pakcages or if it was a version issue.

  6. anton-matosov commented on Mar 2, 2020

    @anton-matosov
    Contributor

    I experience the same issue if I install tensorflow from conda, which gets libprotobuf 3.11.1
    Workaround of protobuf==3.8 suggested here worked for me on conda as well.

  7. beannguyen commented on Mar 18, 2020

    @beannguyen

    I experience the same issue if I install tensorflow from conda, which gets libprotobuf 3.11.1
    Workaround of protobuf==3.8 suggested here worked for me on conda as well.

    It works with protobuf 3.8. Thank you.

  8. KaisJM commented on Apr 6, 2020

    @KaisJM

    had a similar issue when loading Tensorboard in a jupyter notebook. uninstalling protobuf 3.11.2 and installing protobuf==3.8 worked. protobuff==3.11.3 did NOT work.

  9. 7 remaining items

  10. baaj2109 commented on Nov 17, 2020

    @baaj2109

    downgrade onnx to 1.6.0 work for me.

  11. elsieyin commented on Nov 27, 2020

    @elsieyin

    It doesn't work for tf-2.0.0 and protobuf-3.8.0, and i have tried many versions for tf and protobuf , but this error still exists. Which one can tell me the exactly reason and the solution for this problem?

    I got the same error, and use tf2.0.0 and protobuf 3.6, seems solved

  12. added a commit that references this issue on Feb 25, 2021
  13. jvishnuvardhan commented on Jun 8, 2021

    @jvishnuvardhan
    Contributor

    @essandess Looks like this was resolved. Can you please confirm whether this is still an issue with recent TF version? Thanks!

  14. essandess commented on Jun 8, 2021

    @essandess
    Author

    Yes, thank you, resolved with TF 2.5.0 and protobuf 3.17.0.

  15. jvishnuvardhan commented on Jun 8, 2021

    @jvishnuvardhan
    Contributor

    Closing this issue as this was resolved. Thanks!

  16. google-ml-butler commented on Jun 8, 2021

    @google-ml-butler

    Are you satisfied with the resolution of your issue?
    Yes
    No

  17. sumit-jr commented on Jun 22, 2023

    @sumit-jr
    Screenshot 2023-06-22 at 10 07 17

    I Still got the same error.
    Help me to fix this

  18. mihaimaruseac commented on Jun 22, 2023

    @mihaimaruseac
    Contributor

    Please open a new issue, this issues has been closed 2 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

TF 2.0Issues relating to TensorFlow 2.0stat:awaiting responseStatus - Awaiting response from authorsubtype:macOSmacOS Build/Installation issuestype:build/installBuild and install issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions