[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] VirtViewer and TCP Keepalives



Hi

Further to this, I did an strace on the virtualisation host then opened a session to the spice console.

---
[root host 09:44 ~]# ps -ef | grep vm_name
qemu      5438     1 10 Aug28 ?        2-06:17:57 /usr/libexec/qemu-kvm -name vm_name -snipped-
root     30619 30384  0 09:44 pts/0    00:00:00 grep vm_name
[root host 09:44 ~]# strace -e trace=setsockopt -p 5438
Process 5438 attached - interrupt to quit
setsockopt(40, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(40, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(41, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(41, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(42, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(42, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(42, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(43, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(42, SOL_TCP, TCP_NODELAY, [1], 4) = 0

^CProcess 5438 detached
[root host 10:18 ~]#
---
(Please note that the full output is pasted into the GSS ticket 932217)

I left the spice session (using remote-viewer on F18) open (minimised and idle) for a bit over 30 minutes.  When I restored the window, it was blank and not responding to keyboard.  The strace showed no keep alives.

At this point I've strace'd on both sides of the firewalls, on both client and server, I've done packet captures but seen no keep alives.  I note that you tested using 'spicy' not remote-viewer.  Is it possible that remote-viewer didn't include the keep alives?  Is this an option that needs to be enabled somewhere?

Thanks

CC



On Wed, Sep 18, 2013 at 6:54 AM, Colin Coe <colin coe gmail com> wrote:
OK, I'm confused.  Why don't I see the keep alives in the wireshark dump?  I'm happy to upload my pcap file to dropbox.redhat.com for analysis

Apologies for harping on about this but the users are getting annoyed with their sessions freezing or terminating.  Also, we've confirmed that the exact timing is 30 minutes not 15 minutes

I had a fairly long and productive chat with one of the guys that manage the other firewall cluster.  I gave him the src and dst addresses and dst port and he was able to advise on the session state on the firewall.  If I opened a spice session to a RHEL server (no X) and minimised it, all 4 sessions on the 'odd' port started counting down from 1800.  If we leave the session minimised for then we get the "Could not connect to graphic server" or similar, can't remember exact wording.  However, if I start a spice session to a RHEL server (no X) and minimise/un-minimise it every few minutes (but no keyboard interaction) only 3 of the 4 sessions on the odd port continue counting down from 1800.  Once they hit zero, the screen is still visible but nothing I type appears on the screen and sending a keystroke with 'Send Key' does noting.

While I've been writing this, I've had an strace running on a remote-viewer session.
---
[colin fedora18 ~]$ strace -e trace=setsockopt -p 15504
Process 15504 attached
---
From another terminal session,
---
[colin fedora18 ~]$ ps -ef | grep strace
colin     15534  7107  0 06:00 pts/11   00:00:00 strace -e trace=setsockopt -p 15504
colin     16799 19435  0 06:34 pts/5    00:00:00 grep --color=auto strace
[colin fedora18 ~]$
---
So the strace has been running for about 35 minutes now, and strace has not shown a single 'setsockopt'. 

Thanks

CC

PS: Just killed the remote-viewer session and got
---
[colin fedora18 ~]$ strace -e trace=setsockopt -p 15504
Process 15504 attached
setsockopt(30, SOL_SOCKET, SO_ATTACH_FILTER, "\10\0\0\0\0\0\0\0\360\354\310\r\377\177\0\0", 16) = 0
setsockopt(30, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
+++ exited with 0 +++
[colin fedora18 ~]$
---



On Tue, Sep 17, 2013 at 8:43 PM, Marc-André Lureau <mlureau redhat com> wrote:


----- Original Message -----
> Just downloaded spice-gtk3 source. When I grep 'setsockopt', the only
> instance I see is setting TCP_NODELAY. It seems that while spice-gtk may [1]
> set SO_KEEPALIVE, spice-gtk3 does not.

spice-gtk uses glib, g_socket_set_keepalive(), it was added in 0.10:
http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=8fe6547b6181fb7acbabedcd6ed95caf263dd8cc

This can be verified with strace:

elmarco anakao:~$ strace -e trace=setsockopt -- spicy -p 5900
setsockopt(7, SOL_SOCKET, SO_ATTACH_FILTER, "\10\0\0\0\0\0\0\0\240\202J\5\377\177\0\0", 16) = 0
setsockopt(7, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
setsockopt(15, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(15, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(18, SOL_SOCKET, SO_PRIORITY, [6], 4) = 0
setsockopt(18, SOL_SOCKET, SO_RCVBUF, [65472], 4) = 0
setsockopt(18, SOL_SOCKET, SO_SNDBUF, [65472], 4) = 0
setsockopt(18, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
setsockopt(19, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(19, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(20, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(20, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(21, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(21, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(22, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(22, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(23, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(23, SOL_TCP, TCP_NODELAY, [1], 4) = 0




--
RHCE#805007969328369



--
RHCE#805007969328369

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]