oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

gitpython: Failing on every run

Open jonathanmetzman opened this issue 2 years ago • 3 comments

I think the solution is to bundle git. I don't think we have git on our clusterfuzz instances. It's failing with this error:

Traceback (most recent call last):
  File "git/__init__.py", line 89, in <module>
  File "git/__init__.py", line 76, in refresh
  File "git/cmd.py", line 392, in refresh
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
    - be included in your $PATH
    - be set via $GIT_PYTHON_GIT_EXECUTABLE
    - explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
    - quiet|q|silence|s|none|n|0: for no warning or exception
    - warn|w|warning|1: for a printed warning
    - error|e|raise|r|2: for a raised exception

Example:
    export GIT_PYTHON_REFRESH=quiet


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "fuzz_config.py", line 20, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "git/__init__.py", line 91, in <module>
ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
    - be included in your $PATH
    - be set via $GIT_PYTHON_GIT_EXECUTABLE
    - explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
    - quiet|q|silence|s|none|n|0: for no warning or exception
    - warn|w|warning|1: for a printed warning
    - error|e|raise|r|2: for a raised exception

Example:
    export GIT_PYTHON_REFRESH=quiet

[1090381] Failed to execute script 'fuzz_config' due to unhandled exception!
"

jonathanmetzman avatar Jun 26 '23 22:06 jonathanmetzman

@oliverchang another bug caused by oss-fuzz images not being the same as CF images.

jonathanmetzman avatar Jun 26 '23 22:06 jonathanmetzman

FYI: Since GitPython's fuzz harnesses have been migrated upstream in #11803, I've created https://github.com/gitpython-developers/GitPython/issues/1905 to track this issue in that repository.

DaveLak avatar Apr 22 '24 16:04 DaveLak

This issue was resolved via https://github.com/gitpython-developers/GitPython/pull/1909. Tests appear to be running as expected now.

DaveLak avatar Apr 28 '24 23:04 DaveLak