Container running on Windows Core 1803 -- error INVALID DEVICE REQUEST RRS feed

  • Question

  • Container is running on Windows Core 1803. Docker server version is 18.03.1-ee-2. Container is launched using bind point -- local disk is mounted via --volume and inside container that bind point is mapped as drive using registry "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices".

    The problem is not present when executing the same file API on host, when executing API on container then Process Monitor shows API failure -- error INVALID DEVICE REQUEST.  For some reason container file IO layer is trying to execute UnlockFileAll API and this call fails. After that file is completely locked. File can be unlocked only if bringing disk offline via DISKPART will help.

    I do not experience the same error running container on Windows Server 1607.

    Any ideas, is it known issue ? 

    Friday, October 26, 2018 3:02 PM

All replies

  • Greetings,

    Would you mind to explain a little bit more? Why "mapped as drive" is required?

    Usually we bind a local folder via --volume parameter.

    Sic Parvis Magna

    Sunday, October 28, 2018 1:33 PM
  • Bind mounts allow a container to share a directory with the host.

    We do try to containerize legacy application. This application works fine on container running on Windows Server 1607. Our ultimate goal is to use existing application without changing any lines of code -- for this reason we need to be able to use absolute file paths. For example, x:\Data on host needs to be mapped exactly x:\Data on container.

    Docker info:

    Default Isolation: process
    Kernel Version: 10.0 17134 (17134.1.amd64fre.rs4_release.180410-1804)
    Operating System: Windows Server Datacenter Version 1803 (OS Build 17134.345)

    Process Monitor output on container running Windows Server Core 1803:

    CreateFile X:\Data\log\2018\10\php\notice.log SUCCESS Desired Access: Generic Write, Read Attributes, Dis"nowrap">SUCCESS
    UnlockFileSingle X:\Data\log\2018\10\php\notice.log RANGE NOT LOCKED Offset: 0, Length: 1
    LockFile X:\Data\log\2018\10\php\notice.log SUCCESS Exclusive: True, Offset: 0, Length: 1, Fail Immediately: False
    QueryStandardInformationFile X:\Data\log\2018\10\php\notice.log SUCCESS AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory: False
    WriteFile X:\Data\log\2018\10\php\notice.log SUCCESS Offset: 0, Length: 1,648, Priority: Normal
    UnlockFileAll X:\Data\log\2018\10\php\notice.log INVALID DEVICE REQUEST Offset: 0, Length: 0
    CloseFile X:\Data\log\2018\10\php\notice.log SUCCESS
    • Edited by narvakeemik Monday, October 29, 2018 9:44 AM
    Monday, October 29, 2018 9:21 AM
  • OK, i know the reason after reading following article.

    Is it possible to use Windows Server, version 1809?

    Sic Parvis Magna

    Monday, October 29, 2018 2:08 PM

    We use exactly the same described solution for creating symlink between host volume and container directory. We are on mercy of AWS, there is no AMI version 1809 available yet.

    Version 1709:
    - Does not experience INVALID DEVICE REQUEST error
    - Is missing gracefully shut down the container feature

    Version 1803:
    - Does experience INVALID DEVICE REQUEST error
    - Includes gracefully shut down the container feature

    Will there be a hotfix available for Server Core version 1803 ?

    • Edited by narvakeemik Tuesday, October 30, 2018 8:51 AM
    Tuesday, October 30, 2018 6:02 AM
  • Greetings,

    Thanks for sharing. I suggest to file an issue in following project.

    You may @PatrickLang for confirmation.

    Sic Parvis Magna

    Wednesday, October 31, 2018 1:15 AM