Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-7403

vzct: Container with VNC password in domain.xml cannot start

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Fix Version/s: Vz7.0-Update-next
    • Component/s: Libvirt
    • Security Level: Public

      Description

      >Description of problem:
      Container with plain-text VNC password specified in domain.xml cannot start due to libvirt internal error:

      error: Failed to start domain 100500
      error: internal error: cannot mix caller fds with blocking execution

      >How reproducible:
      100%

      >Steps to Reproduce:
      1. create container
      ===========
      vzctl create 100500
      ===========

      2. virsh edit container's domain config
      ===========
      virsh -c 'vzct:///system' edit 100500
      ===========

      3. make sure to specify vnc password
      ===========
      ...
          <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='MyPasswd'>
            <listen type='address' address='127.0.0.1'/>
          </graphics>
        </devices>
      </domain>
      ===========

      >Actual results:
      ===========
      [root@chi-solus4 ~]# virsh -c 'vzct:///system&#39; start 100500
      error: Failed to start domain 100500
      error: internal error: cannot mix caller fds with blocking execution
      ===========

      >Expected results:
      container starts successfully

      >Additional info (see https://openvz.org/Reporting_OpenVZ_problem):
      This bug prevents provisioning, hence blocker priority.

      Bug was introduced in commit https://src.openvz.org/projects/OVZ/repos/libvirt/commits/1e34b0dbb6a392dbb4d836865fe205d35591e11a

      We fail in https://src.openvz.org/projects/OVZ/repos/libvirt/browse/src/util/vircommand.c?at=refs%2Fheads%2Fvz7.5-u4#2451

      Simultaneous use of infd, errfd and outfd may lead to deadlocks according to the comment in virCommandRun, hence libvirt fails such invocations pre-emptively. Prior to the commit, errfd and outfd were not set, thus async_io was equal to false, hence problem didn't exist in the first place.

      gdb output from 7.5.4 to illustrate current state in virCommandRun:
      ===========
      (gdb) p cmd->infd
      $3 = -1
      (gdb) p cmd->outfdptr
      $4 = (int *) 0x7f58d5f8b7d0
      (gdb) p cmd->outbuf
      $5 = (char **) 0x0
      (gdb) p cmd->errbuf
      $6 = (char **) 0x0
      (gdb) p cmd->inbuf
      $7 = 0x7f58b06f92d0 "MyPasswd"
      ===========

        Attachments

          Activity

            People

            Assignee:
            aleksandr.leskin Aleksandr Leskin
            Reporter:
            vokhmyanin Pavel Vokhmyanin
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified