Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3129

Vendor Build Failure with OSS Fuzz

    • Type: Icon: Build Failure Build Failure
    • Resolution: Gone away
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      There is a build failure with the mongo-go-driver project in oss-fuzz concerning vendoring: https://oss-fuzz-build-logs.storage.googleapis.com/log-057c3bc5-5081-4500-822e-d1138af65e98.txt

      Starting Step #3 - "compile-libfuzzer-address-x86_64"
      Step #3 - "compile-libfuzzer-address-x86_64": Already have image (with digest): gcr.io/cloud-builders/docker
      Step #3 - "compile-libfuzzer-address-x86_64": ---------------------------------------------------------------
      Step #3 - "compile-libfuzzer-address-x86_64": Compiling libFuzzer to /usr/lib/libFuzzingEngine.a...  done.
      Step #3 - "compile-libfuzzer-address-x86_64": ---------------------------------------------------------------
      Step #3 - "compile-libfuzzer-address-x86_64": CC=clang
      Step #3 - "compile-libfuzzer-address-x86_64": CXX=clang++ -lresolv
      Step #3 - "compile-libfuzzer-address-x86_64": CFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
      Step #3 - "compile-libfuzzer-address-x86_64": CXXFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++
      Step #3 - "compile-libfuzzer-address-x86_64": RUSTFLAGS=--cfg fuzzing -Zsanitizer=address -Cdebuginfo=1 -Cforce-frame-pointers
      Step #3 - "compile-libfuzzer-address-x86_64": ---------------------------------------------------------------
      Step #3 - "compile-libfuzzer-address-x86_64": + go get github.com/AdamKorcz/go-118-fuzz-build/testing
      Step #3 - "compile-libfuzzer-address-x86_64": go: downloading github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2
      Step #3 - "compile-libfuzzer-address-x86_64": go: downloading github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24
      Step #3 - "compile-libfuzzer-address-x86_64": go: added github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24
      Step #3 - "compile-libfuzzer-address-x86_64": go: added github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2
      Step #3 - "compile-libfuzzer-address-x86_64": + go run cmd/build-oss-fuzz-corpus/main.go /workspace/out/libfuzzer-address-x86_64/fuzz_decode_seed_corpus.zip
      Step #3 - "compile-libfuzzer-address-x86_64": go: inconsistent vendoring in /src/mongo-go-driver:
      Step #3 - "compile-libfuzzer-address-x86_64": 	github.com/AdaLogics/go-fuzz-headers@v0.0.0-20230811130428-ced1acdcaa24: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
      Step #3 - "compile-libfuzzer-address-x86_64": 	github.com/AdamKorcz/go-118-fuzz-build@v0.0.0-20231105174938-2b5cbb29f3e2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
      Step #3 - "compile-libfuzzer-address-x86_64": 
      Step #3 - "compile-libfuzzer-address-x86_64": 	To ignore the vendor directory, use -mod=readonly or -mod=mod.
      Step #3 - "compile-libfuzzer-address-x86_64": 	To sync the vendor directory, run:
      Step #3 - "compile-libfuzzer-address-x86_64": 		go mod vendor
      Step #3 - "compile-libfuzzer-address-x86_64": ********************************************************************************
      Step #3 - "compile-libfuzzer-address-x86_64": Failed to build.
      Step #3 - "compile-libfuzzer-address-x86_64": To reproduce, run:
      Step #3 - "compile-libfuzzer-address-x86_64": python infra/helper.py build_image mongo-go-driver
      Step #3 - "compile-libfuzzer-address-x86_64": python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 mongo-go-driver
      Step #3 - "compile-libfuzzer-address-x86_64": ********************************************************************************
      Finished Step #3 - "compile-libfuzzer-address-x86_64"
      ERROR
      ERROR: build step 3 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
      

      Here are the steps to reproduce locally:https://google.github.io/oss-fuzz/advanced-topics/reproducing/#reproducing-build-failures

      Definition of Done: Determine the root cause of the vendor failure, and update the build.sh script in the oss-fuzz project if necessary.

            Assignee:
            Unassigned Unassigned
            Reporter:
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: