Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored

nsoffer at redhat.com nsoffer at redhat.com
Sat Nov 28 00:21:33 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: guest-agent: desktopLock exception on EBADF should be ignored
......................................................................


Patch Set 5:

(1 comment)

https://gerrit.ovirt.org/#/c/47404/5//COMMIT_MSG
Commit Message:

Line 7: guest-agent: desktopLock exception on EBADF should be ignored
Line 8: 
Line 9: There's no more logging of the EBADF exceptions on desktopLock, since
Line 10: this is very likely to happen on a migration and in general does not
Line 11: provide with any additional value.
Should add also that EBADF means the socket was closed.

Can you explain how the socket got closed? Looking at the guestagent code, I  don't see how a socket can get become closed expect:
- Calling GuestAgent.stop()
- Tiny window when reconnecting after listener detected a disconnect (unlikely)

The log in the bug show that the chanel listener detected that fileno 37 as closed:

    VM Channels Listener::INFO::2014-10-12 21:20:46,548::vmchannels::54::vds::(_handle_event) Received 00000019 on fileno 37

There are no logs showing where fileno 37 came from and how it was added to the channel
listener, maybe because this log is using info log level.

2 seconds later, we see 4 exceptions generated by 4 threads calling desktopLock in the same second:

    Thread-61::ERROR::2014-10-12 21:20:48,152::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed
    Traceback (most recent call last):
      File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock
        self._forward("lock-screen")
      File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward
        self._sock.send(message)
      File "/usr/lib64/python2.7/socket.py", line 170, in _dummy
        raise error(EBADF, 'Bad file descriptor')
    error: [Errno 9] Bad file descriptor

    Thread-62::ERROR::2014-10-12 21:20:48,153::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed
    Traceback (most recent call last):
      File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock
        self._forward("lock-screen")
      File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward
        self._sock.send(message)                                                                                                                                                
      File "/usr/lib64/python2.7/socket.py", line 170, in _dummy
        raise error(EBADF, 'Bad file descriptor')
    error: [Errno 9] Bad file descriptor

    Thread-63::ERROR::2014-10-12 21:20:48,153::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed
    Traceback (most recent call last):
      File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock
        self._forward("lock-screen")
      File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward
        self._sock.send(message)
      File "/usr/lib64/python2.7/socket.py", line 170, in _dummy
        raise error(EBADF, 'Bad file descriptor')
    error: [Errno 9] Bad file descriptor

    Thread-64::ERROR::2014-10-12 21:20:48,186::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed
    Traceback (most recent call last):
      File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock
        self._forward("lock-screen")
      File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward
        self._sock.send(message)
      File "/usr/lib64/python2.7/socket.py", line 170, in _dummy
        raise error(EBADF, 'Bad file descriptor')
    error: [Errno 9] Bad file descriptor

So this cannot be the tiny race after a disconnect.

Can you explain why do we call desktopLock 4 times in the same second from 4 threads?

It seem that there are other unexplained issues here, and hiding the EBADF is not fixing the root cause.
Line 12: 
Line 13: All other exceptions are still logged, in case something unexpected
Line 14: happens.
Line 15: 


-- 
To view, visit https://gerrit.ovirt.org/47404
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list