bad_alloc and SIGABRT - Microsoft Read OCR container - Windows Server 2019

I am trying to run the Microsoft Read OCR 3.2 containers using the preview build of Docker on Windows Server 2019 (with Linux image support).
I followed the instructions to enable Linux container support and then followed the instructions by Microsoft on how to use their Read OCR containers.

Expected behavior

For the container to start and run normally

Actual behavior

The container starts but I keep getting this error:

Using '/share' for shared mounts.
Logging to console.
Submitting metering to '{ENDPOINT}'.
Running container with version: opr32.Release.1.9.0
Using memory queue.
Service info name: Ocr
Using file-based Object storage.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
*** Aborted at 1618503147 (unix time) try "date -d @1618503147" if you are using GNU date ***
PC: @                0x0 (unknown)
*** SIGABRT (@0x262b) received by PID 9771 (TID 0x7f0469ca9780) from PID 9771; stack trace: ***
    @     0x7f0459d982be (unknown)
    @     0x7f045a60f630 (unknown)
    @     0x7f0459236387 (unknown)
    @     0x7f0459237a78 (unknown)
    @     0x7f0459e60a95 (unknown)
    @     0x7f0459e5ea06 (unknown)
    @     0x7f0459e5ea33 (unknown)
    @     0x7f0459e5ec53 (unknown)
    @     0x7f0459e5f1ed (unknown)
    @     0x7f0459ebdcd9 (unknown)
    @     0x7f0459ebf371 (unknown)
    @     0x7f0459ebf45c (unknown)
    @     0x7f045a96ef9d (unknown)
    @     0x7f045a9d0606 (unknown)
    @     0x7f045a9d9f88 (unknown)
    @     0x7f03e3fe19a4 (unknown)

Information

  • the output of DockerDebugInfo.ps1 using Powershell on Windows

    • I have the log but cannot upload it due to new user restriction
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )

    • Windows: Windows Server 2019
    • Docker: Docker version 17.10.0-ee-preview-3, build 1649af8

Steps to reproduce the behavior

  1. Get Preview build of Docker on Windows Server
    Install-Module DockerProvider
    Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview

  2. Enable Linux container support before restarting Docker service
    [Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", $null, "Machine")
    Restart-Service docker

  3. Follow the rest of the instructions from the Microsoft page mentioned above.

1 Like

I am also facing the same error. Any resolution?

However, isn’t this the command to switch to Linux? (1 instead of $null)
[Environment]::SetEnvironmentVariable(“LCOW_SUPPORTED”, “1”, “Machine”)

With this also, I get the same error. I am having hard time to understand the error and have not found any solution so far. I would really appreciate if anyone could provide the solution.