vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

Issue #393 resolved
Takehiko NOZAKI repo owner created an issue
Jan 23 19:00:06 tycho /netbsd: vmt0: failed to send TCLO outgoing ping
Jan 23 19:00:07 tycho /netbsd: vmware: sending length failed, eax=00000000, ecx=00000000
Jan 23 19:00:07 tycho /netbsd: vmt0: failed to send TCLO outgoing ping
Jan 23 19:00:08 tycho /netbsd: vmware: sending length failed, eax=00000000, ecx=00000000
Jan 23 19:00:08 tycho /netbsd: vmt0: failed to send TCLO outgoing ping
...

Comments (21)

  1. Takehiko NOZAKI reporter

    in vmt_tclo_tick()

            if (sc->sc_tclo_ping) {
                    if (vm_rpc_send(&sc->sc_tclo_rpc, NULL, 0) != 0) {
                            device_printf(sc->sc_dev, "failed to send TCLO outgoing ping\n");
                            sc->sc_rpc_error = 1;
                            goto out;
                    }
            }
    

    if vm_rpc_send() + TCLO ping faild, set sc->sc_rpc_error = 1 and bail out.

    but nobody care about it.

    out:
            callout_schedule(&sc->sc_tclo_tick, sc->sc_tclo_ping ? hz : 1);
    

    if sc->sc_rpc_error = 1 then we should have to call vmt_rpc_close().

    but the code only called it next callout with “reset” event recieved

            if (strcmp(sc->sc_rpc_buf, "reset") == 0) {
    
                    if (sc->sc_rpc_error != 0) {
                            device_printf(sc->sc_dev, "resetting rpc\n");
                            vm_rpc_close(&sc->sc_tclo_rpc);
                            /* reopen and send the reset reply next time around */
                            goto out;
                    }
    

    it may never happened.

  2. Takehiko NOZAKI reporter

    following patch seems solves the problem.

    diff --git a/sys/arch/x86/x86/vmt.c b/sys/arch/x86/x86/vmt.c
    index e521cfa24b..18faa10a9f 100644
    --- a/sys/arch/x86/x86/vmt.c
    +++ b/sys/arch/x86/x86/vmt.c
    @@ -729,13 +729,6 @@ vmt_tclo_tick(void *xarg)
    
        if (strcmp(sc->sc_rpc_buf, "reset") == 0) {
    
    -       if (sc->sc_rpc_error != 0) {
    -           device_printf(sc->sc_dev, "resetting rpc\n");
    -           vm_rpc_close(&sc->sc_tclo_rpc);
    -           /* reopen and send the reset reply next time around */
    -           goto out;
    -       }
    -
            if (vm_rpc_send_str(&sc->sc_tclo_rpc, VM_RPC_RESET_REPLY) != 0) {
                device_printf(sc->sc_dev, "failed to send reset reply\n");
                sc->sc_rpc_error = 1;
    @@ -851,6 +844,12 @@ vmt_tclo_tick(void *xarg)
        }
    
     out:
    +   if (sc->sc_rpc_error != 0) {
    +       device_printf(sc->sc_dev, "resetting rpc\n");
    +       vm_rpc_close(&sc->sc_tclo_rpc);
    +       /* reopen and send the reset reply next time around */
    +   }
    +
        callout_schedule(&sc->sc_tclo_tick, sc->sc_tclo_ping ? hz : 1);
     }
    

  3. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset 1a5df6d43f1d>>

  4. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset 8b4c8e988712>>

  5. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset e15925eb33e6>>

  6. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset 613aac52e53a>>

  7. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset f268f3f1b7b1>>

  8. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset ecffe36fe640>>

  9. Takehiko NOZAKI reporter

    BUGFIX: Issue #393 - vmt(4) reports 'vmt0: failed to send TCLO outgoing ping vmware: sending length failed, eax=00000000, ecx=00000000'

    • do vm_rpc_open(sc->sc_tclo_rpc) not device attach but tclo_tick callout
    • use delay variable tell tick time to callout_schedule
    • use vm_rpc_alive() instead of sc_tclo_rpc_open
    • tiny improvisation of sc_tclo_ping status and next callout_schedule tick

    → <<cset 21349b4e0aeb>>

  10. Log in to comment