Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3094

bson_iter_binary doesn't work on a Windows build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.14.0
    • Fix Version/s: None
    • Component/s: libbson
    • Labels:
      None
    • Environment:
      Platform Info:
        OS: Windows (x86_64-w64-mingw32)
        CPU: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
        WORD_SIZE: 64
        LIBM: libopenlibm
        LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

      Description

      I'm running an appveyor script that tests libbson and libmongoc on various platforms.
      Everything works, including libmongoc API, except `bson_iter_binary`.

      The log below is not very helpful, since by the time `bson_iter_binary` is called, the thread just panics and no output or error trace is printed.

      In this case, libbson and libmongoc were built with appveyor's Visual Studio 2015 image.

      ```
      Build started
      git clone -q --branch=fn/windows https://github.com/felipenoris/Mongoc.jl.git C:\projects\mongoc-jl
      git checkout -qf 176c69b415380ef89aad9dfdcc5f770dcec28b9f
      Running Install scripts
      iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
      Installing Julia...
      Julia Version 1.0.3
      Commit 099e826241 (2018-12-18 01:34 UTC)
      Platform Info:
      OS: Windows (x86_64-w64-mingw32)
      CPU: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
      WORD_SIZE: 64
      LIBM: libopenlibm
      LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
      Environment:
      JULIA_PROJECT = @.
      Starting MongoDB
      echo "%JL_BUILD_SCRIPT%"
      "using Pkg; Pkg.build()"
      C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
      Cloning default registries into C:\Users\appveyor\.julia\registries
      Cloning registry General from "https://github.com/JuliaRegistries/General.git"
      Installed BinaryProvider ─ v0.5.3
      Building Mongoc → `C:\projects\mongoc-jl\deps\build.log`
      Resolving package versions...
      echo "%JL_TEST_SCRIPT%"
      "using Pkg; Pkg.test(coverage=true)"
      C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
      Testing Mongoc
      Resolving package versions...
      ┌ Info: Testing for platform:
      └ platform_key_abi() = Windows(:x86_64, compiler_abi=CompilerABI(:gcc4, :cxx11))
      ┌ Warning: Failed to remove test file C:\projects\mongoc-jl\test\data.bson: unlink: resource busy or locked (EBUSY)
      └ @ Main C:\projects\mongoc-jl\test\bson_tests.jl:327
      Test Summary: | Pass Total
      BSON | 10097 10097
      Server Mongo Version: 4.0.1
      ERROR: Package Mongoc errored during testing
      Stacktrace:
      [1] pkgerror(::String, ::Vararg

      {String,N}

      where N) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:120
      [2] #test#65(::Bool, ::Function, ::Pkg.Types.Context, ::Array

      {Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1357
      [3] #test at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:0 [inlined]
      [4] #test#42(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}

      ) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:273
      [5] #test#41 at .\none:0 [inlined]
      [6] #test at .\none:0 [inlined]
      [7] #test#38 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:252 [inlined]
      [8] (::getfield(Pkg.API, Symbol("#kw##test")))(::NamedTuple{(:coverage,),Tuple{Bool}}, ::typeof(Pkg.API.test)) at .\none:0
      [9] top-level scope at none:0
      ```

      Ref:

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: