With libssh 0.6.0, x2goclient consumes 100% cpu on connection. The trigger for this is that ssh_select() was rewritten to use poll() instead of select(). poll() has a timeout in milliseconds, select() in microseconds. x2goclient requests a timeout of 500 microseconds which is getting rounded down to a timeout of 0 milliseconds for poll().
However, this still seems to point to some poor coding on the part of x2goclient that we're using such short timeouts. Why can't we just wait forever in ssh_select() in SshMasterConnection::channelLoop() ?
-- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane orion@nwra.com Boulder, CO 80301 http://www.nwra.com
Hello Orion,
We can't wait forever in ssh_select, we must perform other tasks in loop, for example accepting forwarded connections. However, I have already increased a select timeout and made a lot of other changes in ssh code of X2Go Client. The changes are not yet in master GIT because they depend on reverse forwarding fixes, that I made to libssh. As soon as we have libssh packages ready, I'll push my local commits to GIT.
regards, Alex
Am 22.01.2014 22:36, schrieb Orion Poplawski:
With libssh 0.6.0, x2goclient consumes 100% cpu on connection. The trigger for this is that ssh_select() was rewritten to use poll() instead of select(). poll() has a timeout in milliseconds, select() in microseconds. x2goclient requests a timeout of 500 microseconds which is getting rounded down to a timeout of 0 milliseconds for poll().
However, this still seems to point to some poor coding on the part of x2goclient that we're using such short timeouts. Why can't we just wait forever in ssh_select() in SshMasterConnection::channelLoop() ?
Oleksandr Shneyder | Email: o.shneyder@phoca-gmbh.de phoca GmbH | Tel. : 0911 - 14870374 0 Bräuhausgasse 9 | Fax. : 0911 - 14870374 9 D-82205 Gilching | Mobil: 0163 - 49 64 461
Geschäftsführung: Dipl.-Inf. Oleksandr Shneyder
Hi Alex,
On Do 23 Jan 2014 00:36:37 CET, Oleksandr Shneyder wrote:
Am 22.01.2014 22:36, schrieb Orion Poplawski:
With libssh 0.6.0, x2goclient consumes 100% cpu on connection. The trigger for this is that ssh_select() was rewritten to use poll() instead
of select(). poll() has a timeout in milliseconds, select() in microseconds. x2goclient requests a timeout of 500 microseconds which is getting rounded down to a timeout of 0 milliseconds for poll().However, this still seems to point to some poor coding on the part of x2goclient that we're using such short timeouts. Why can't we just wait forever in ssh_select() in SshMasterConnection::channelLoop() ?
Hello Orion,
We can't wait forever in ssh_select, we must perform other tasks in loop, for example accepting forwarded connections. However, I have already increased a select timeout and made a lot of other changes in ssh code of X2Go Client. The changes are not yet in master GIT because they depend on reverse forwarding fixes, that I made to libssh. As soon as we have libssh packages ready, I'll push my local commits to GIT.
I have merged the revtunnel branch of x2goclient.git now into the
repo's master branch.
For Debian, I already have provided the libssh fixes
(0.5.4-2~debX+x2go1 where X in {6, 7, 8}.
For Ubuntu and our Fedora/EPEL builds this is still pending and on my
todo list.
Please commit your recent (local) changes on top of the current master HEAD.
Thanks, Mike
--
DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...