René's URL Explorer Experiment


Title: Fuzz Tests Are Crashing at Start-up on ClusterFuzz · Issue #1905 · gitpython-developers/GitPython · GitHub

Open Graph Title: Fuzz Tests Are Crashing at Start-up on ClusterFuzz · Issue #1905 · gitpython-developers/GitPython

X Title: Fuzz Tests Are Crashing at Start-up on ClusterFuzz · Issue #1905 · gitpython-developers/GitPython

Description: PR #1901 was successful in fixing the broken build but resurfaced another issue that is preventing the fuzzer from running. The Problem It appears that a Git executable is not available in the ClusterFuzz container environment where fuzz...

Open Graph Description: PR #1901 was successful in fixing the broken build but resurfaced another issue that is preventing the fuzzer from running. The Problem It appears that a Git executable is not available in the Clus...

X Description: PR #1901 was successful in fixing the broken build but resurfaced another issue that is preventing the fuzzer from running. The Problem It appears that a Git executable is not available in the Clus...

Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1905

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fuzz Tests Are Crashing at Start-up on ClusterFuzz","articleBody":"PR #1901 was successful in fixing the broken build but resurfaced another issue that is preventing the fuzzer from running.\r\n\r\n## The Problem\r\n\r\nIt appears that a Git executable is not available in the ClusterFuzz container environment where fuzz tests are executed, causing an error in the fuzz harnesses when GitPython attempts to initialize.\r\n\r\n This issue has been previously seen and reported on the OSS-Fuzz issue tracker: https://github.com/google/oss-fuzz/issues/10600\r\n\r\n\r\n\u003cdetails\u003e\u003csummary\u003eRelevant Portion of the ClusterFuzz Crash Logs from 2024-04-20\u003c/summary\u003e\r\n\r\n```shell\r\n# \u003cPrior output omitted for brevity\u003e\r\nINFO: Instrumenting git.index.util\r\nINFO: Instrumenting git.remote\r\nINFO: Instrumenting [git.repo.fun](http://git.repo.fun/)\r\nTraceback (most recent call last):\r\n  File \"git/__init__.py\", line 296, in \u003cmodule\u003e\r\n  File \"git/__init__.py\", line 287, in refresh\r\n  File \"git/cmd.py\", line 631, in refresh\r\nImportError: Bad git executable.\r\nThe git executable must be specified in one of the following ways:\r\n    - be included in your $PATH\r\n    - be set via $GIT_PYTHON_GIT_EXECUTABLE\r\n    - explicitly set via git.refresh(\u003cfull-path-to-git-executable\u003e)\r\n\r\nAll git commands will error until this is rectified.\r\n\r\nThis initial message can be silenced or aggravated in the future by setting the\r\n$GIT_PYTHON_REFRESH environment variable. Use one of the following values:\r\n    - quiet|q|silence|s|silent|none|n|0: for no message or exception\r\n    - warn|w|warning|log|l|1: for a warning message (logging level CRITICAL, displayed by default)\r\n    - error|e|exception|raise|r|2: for a raised exception\r\n\r\nExample:\r\n    export GIT_PYTHON_REFRESH=quiet\r\n\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"[fuzz_config.py](http://fuzz_config.py/)\", line 26, in \u003cmodule\u003e\r\n  File \"PyInstaller/loader/pyimod02_importers.py\", line 419, in exec_module\r\n  File \"git/__init__.py\", line 298, in \u003cmodule\u003e\r\nImportError: Failed to initialize: Bad git executable.\r\nThe git executable must be specified in one of the following ways:\r\n    - be included in your $PATH\r\n    - be set via $GIT_PYTHON_GIT_EXECUTABLE\r\n    - explicitly set via git.refresh(\u003cfull-path-to-git-executable\u003e)\r\n\r\nAll git commands will error until this is rectified.\r\n\r\nThis initial message can be silenced or aggravated in the future by setting the\r\n$GIT_PYTHON_REFRESH environment variable. Use one of the following values:\r\n    - quiet|q|silence|s|silent|none|n|0: for no message or exception\r\n    - warn|w|warning|log|l|1: for a warning message (logging level CRITICAL, displayed by default)\r\n    - error|e|exception|raise|r|2: for a raised exception\r\n\r\nExample:\r\n    export GIT_PYTHON_REFRESH=quiet\r\n\r\n[80625] Failed to execute script 'fuzz_config' due to unhandled exception!\r\ncf::fuzzing_strategies: fork:2,value_profile:1\r\n```\r\n\r\n\u003c/details\u003e \r\n\r\n\r\n## Possible Solution\r\n\r\nOSS-Fuzz uses Pyinstaller to bundle fuzz harnesses and their dependencies in the `compile_python_fuzzers` function called by `build.sh`. Arguments passed to `compile_python_fuzzers` after the fuzz harness are forwarded to Pyinstaller, which accepts an [`--add-binary`](https://pyinstaller.org/en/stable/usage.html#what-to-bundle-where-to-search) flag to add arbitrary binaries to the bundle and [are made available to the bundled program at runtime](https://pyinstaller.org/en/stable/runtime-information.html#placing-data-files-at-expected-locations-inside-the-bundle).\r\n\r\nWe should be able to:\r\n1. ~Download a pre built Git binary from [kernal.org](https://mirrors.edge.kernel.org/pub/software/scm/git/) in the `container-environment-bootstrap.sh` script.~ Never mind, the downloadable archives are source, not builds.\r\n2. Bundle the `git` available in the OSS-Fuzz build container with the fuzz harness in `build.sh`\r\n3. And use GitPython's `git.refresh(\u003cfull-path-to-git-executable\u003e)` method inside a [Pyintaller runtime check](https://pyinstaller.org/en/stable/runtime-information.html#run-time-information) to initialize GitPython with the bundled Git executable when running from the bundled application.\r\n\r\n\r\n## Next Steps\r\n\r\n- [x] ~I'll test out the possible solution described above and open a PR if it works as expected.~ Done in #1906\r\n- ~If it doesn't work, I'll document the outcome in this issue.~\r\n\r\n\r\n","author":{"url":"https://github.com/DaveLak","@type":"Person","name":"DaveLak"},"datePublished":"2024-04-22T16:33:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1905/GitPython/issues/1905"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3740afa1-d89f-b3fd-c85f-9aa6e056a6a7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAF10:1665CF:86485:B734C:6968195C
html-safe-nonce0110c8d4ed05705e1578f003edbf453b6ef8b2462fd169cc23568e0e3e38c62e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjEwOjE2NjVDRjo4NjQ4NTpCNzM0Qzo2OTY4MTk1QyIsInZpc2l0b3JfaWQiOiI0OTM2MzMyMTY1NjI0ODk1ODM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc2c628b1af9566607b547a292ced7e6c6b5cb152015fc26c11a14254a50607e8
hovercard-subject-tagissue:2256986243
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/1905/issue_layout
twitter:imagehttps://opengraph.githubassets.com/59cafc71337263bce628f571f6905cb380fd438c5bed9fd560640842db1bf516/gitpython-developers/GitPython/issues/1905
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/59cafc71337263bce628f571f6905cb380fd438c5bed9fd560640842db1bf516/gitpython-developers/GitPython/issues/1905
og:image:altPR #1901 was successful in fixing the broken build but resurfaced another issue that is preventing the fuzzer from running. The Problem It appears that a Git executable is not available in the Clus...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDaveLak
hostnamegithub.com
expected-hostnamegithub.com
None2452ef75cc61e096c7ab0f8a4fca0ff7d45789bc2e145182d98e41a6ba61e5e1
turbo-cache-controlno-preview
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release424b2f45b6311b8635b559db771ca199ff3a1b4f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/issues/1905#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F1905
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F1905
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/issues/1905
Reloadhttps://github.com/gitpython-developers/GitPython/issues/1905
Reloadhttps://github.com/gitpython-developers/GitPython/issues/1905
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/issues/1905
Notifications https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://github.com/gitpython-developers/GitPython
Issues 169 https://github.com/gitpython-developers/GitPython/issues
Pull requests 8 https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/gitpython-developers/GitPython/security
Please reload this pagehttps://github.com/gitpython-developers/GitPython/issues/1905
Insights https://github.com/gitpython-developers/GitPython/pulse
Code https://github.com/gitpython-developers/GitPython
Issues https://github.com/gitpython-developers/GitPython/issues
Pull requests https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security https://github.com/gitpython-developers/GitPython/security
Insights https://github.com/gitpython-developers/GitPython/pulse
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/1905
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/1905
Fuzz Tests Are Crashing at Start-up on ClusterFuzzhttps://github.com/gitpython-developers/GitPython/issues/1905#top
https://github.com/DaveLak
https://github.com/DaveLak
DaveLakhttps://github.com/DaveLak
on Apr 22, 2024https://github.com/gitpython-developers/GitPython/issues/1905#issue-2256986243
#1901https://github.com/gitpython-developers/GitPython/pull/1901
google/oss-fuzz#10600https://github.com/google/oss-fuzz/issues/10600
--add-binaryhttps://pyinstaller.org/en/stable/usage.html#what-to-bundle-where-to-search
are made available to the bundled program at runtimehttps://pyinstaller.org/en/stable/runtime-information.html#placing-data-files-at-expected-locations-inside-the-bundle
kernal.orghttps://mirrors.edge.kernel.org/pub/software/scm/git/
Pyintaller runtime checkhttps://pyinstaller.org/en/stable/runtime-information.html#run-time-information
Fix Fuzzer Crash in ClusterFuzz Due to Missing Git Executable #1906https://github.com/gitpython-developers/GitPython/pull/1906
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.