X2Go Bug report logs - #1158
PyHoca GUI still showing terminated session (error: Semaphore released too many times)

Package: pyhoca-gui; Maintainer for pyhoca-gui is X2Go Developers <x2go-dev@lists.x2go.org>; Source for pyhoca-gui is src:pyhoca-gui.

Reported by: Michael Ledin <m.ledin@appheads.ru>

Date: Thu, 16 Mar 2017 18:55:01 UTC

Severity: normal

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 16 Mar 2017 18:52:49 +0000
From m.ledin@appheads.ru  Thu Mar 16 19:52:47 2017
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05,SPF_HELO_PASS,
	URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id CBD6F5DAD0
	for <submit@bugs.x2go.org>; Thu, 16 Mar 2017 19:52:46 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id r7hCZEyfWomy for <submit@bugs.x2go.org>;
	Thu, 16 Mar 2017 19:52:40 +0100 (CET)
X-Greylist: delayed 546 seconds by postgrey-1.35 at ymir.das-netzwerkteam.de; Thu, 16 Mar 2017 19:52:39 CET
Received: from mail.appheads.ru (appheads.ru [188.166.77.242])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id D4E6E5DA4A
	for <submit@bugs.x2go.org>; Thu, 16 Mar 2017 19:52:39 +0100 (CET)
Received: from [192.168.1.126] (broadband-188-32-81-169.moscow.rt.ru [188.32.81.169])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.appheads.ru (Postfix) with ESMTPSA id 3A17E1E323E
	for <submit@bugs.x2go.org>; Thu, 16 Mar 2017 14:43:33 -0400 (EDT)
To: submit@bugs.x2go.org
From: Michael Ledin <m.ledin@appheads.ru>
Subject: PyHoca GUI still showing terminated session (error: Semaphore
 released too many times)
Message-ID: <8ec191af-1f0a-86e0-14f2-a987bcb8850a@appheads.ru>
Date: Thu, 16 Mar 2017 21:42:56 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Package: pyhoca-gui

Version: 0.5.0.4

I'm using Archlinux and installed pyhoca-gui from AUR. Before that I 
used x2goclient and created several profiles there so in pyhoca-gui I 
continued to use these profiles.

I connect to server and then start new desktop environment (XFCE). Then 
I try to terminate the session. It terminated but PyHoca still shows it 
in server menu like "Running: ...session name here" but in gray color 
and session menu is not accessible so I can not terminate it again.

Here is the full log for "pyhoca-gui -d":

21:25:37: Warning: Mismatch between the program and library build 
versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1010,wx 
containers,compatible with 2.8),
and wxPython used 3.0 (wchar_t,compiler with C++ ABI 1009,wx 
containers,compatible with 2.8).
pyhoca-gui[11764] (PyHoca-GUI) DEBUG: PyHoca-GUI's user interface 
language is: en_US.
pyhoca-gui[11764] (PyHoca-GUI) INFO: PyHoca GUI is starting up
pyhoca-gui[11764] (PyHoca-GUI) INFO: start TaskBarIcon of type: 
('__WXGTK__', 'wxGTK', 'unicode', 'gtk2', 'wx-assertions-on', 'SWIG-1.3.29')
pyhoca-gui[11764] (PyHoca-GUI) WARN: the current release of PyHoca-GUI 
does not support client configuration
pyhoca-gui[11764] (x2gosessregistry-pylib) NOTICE: registering X2Go 
session AppHeads WAN...
pyhoca-gui[11764] (x2goclient-pylib) NOTICE: initializing X2Go session...
pyhoca-gui[11764] (x2gocontrolsession-pylib) NOTICE: connecting to 
[my.domain.here]:22
pyhoca-gui[11764] (PyHoca-GUI) NOTICE: [AppHeads WAN - connect] SSH key 
authentication has been successful.
pyhoca-gui[11764] (x2gosessregistry-pylib) NOTICE: using already 
initially-registered yet-unused session fa565712-0a75-11e7-9d4b-58946b494d4c
pyhoca-gui[11764] (x2goclient-pylib) NOTICE: initializing X2Go session...
pyhoca-gui[11764] (x2gosession-pylib) NOTICE: Using session 
appheads-50-1489688865_stDXFCE_dp24 as master session for profile 
AppHeads WAN.
pyhoca-gui[11764] (PyHoca-GUI) NOTICE: [AppHeads WAN - start] New X2Go 
session starting up... appheads-50-1489688865_stDXFCE_dp24
pyhoca-gui[11764] (x2goterminalsession-pylib) NOTICE: x2goumount-session 
(all mounts) for session appheads-50-1489688865_stDXFCE_dp24 has been 
successful
pyhoca-gui[11764] (x2goterminalsession-pylib) NOTICE: cleaning up 
session appheads-50-1489688865_stDXFCE_dp24 after termination
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gevent/greenlet.py", line 536, 
in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/x2go/client.py", line 1680, in 
terminate_session
    return session.terminate()
  File "/usr/lib/python2.7/site-packages/x2go/session.py", line 2374, 
in terminate
    self._lock.release()
  File "src/gevent/_semaphore.py", line 266, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5353)
  File "src/gevent/_semaphore.py", line 268, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5291)
error: Semaphore released too many times
Thu Mar 16 21:26:52 2017 <Greenlet at 0x7f340f8a5910: <bound method 
PyHocaGUI.terminate_session of <pyhoca.wxgui.frontend.PyHocaGUI; proxy 
of <Swig Object of type 'wxPyApp *' at 0x55e7af0c6320> 
>>('fa565712-0a75-11e7-9d4b-58946b494d4c', 
session_name='appheads-50-1489688865_stDXFCE_dp24', 
match_profile_name=u'AppHeads WAN')> failed with error

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/x2go/guardian.py", line 116, 
in guardian
    update_mounts=self.auto_update_listmounts_cache,
  File "/usr/lib/python2.7/site-packages/x2go/client.py", line 3148, in 
update_cache_all_profiles
    update_mounts=update_mounts,
  File "/usr/lib/python2.7/site-packages/x2go/client.py", line 3089, in 
update_cache_by_profile_name
    self.listsessions_cache.update(profile_name, 
update_sessions=_update_sessions, update_desktops=_update_desktops, 
update_mounts=_update_mounts, )
  File "/usr/lib/python2.7/site-packages/x2go/cache.py", line 135, in 
update
    self._update_sessions(profile_name, control_session)
  File "/usr/lib/python2.7/site-packages/x2go/cache.py", line 204, in 
_update_sessions
    self.x2go_listsessions_cache[profile_name]['sessions'] = 
control_session.list_sessions()
  File 
"/usr/lib/python2.7/site-packages/x2go/backends/control/plain.py", line 
1749, in list_sessions
    self.associated_terminals[_session_name].__del__()
  File 
"/usr/lib/python2.7/site-packages/x2go/backends/terminal/plain.py", line 
413, in __del__
    self._x2go_tidy_up()
  File 
"/usr/lib/python2.7/site-packages/x2go/backends/terminal/plain.py", line 
424, in _x2go_tidy_up
    self._share_local_folder_lock.release()
  File "src/gevent/_semaphore.py", line 266, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5353)
  File "src/gevent/_semaphore.py", line 268, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5291)
error: Semaphore released too many times

If I'll try then to disconnect from server then GUI shows that server is 
disconnected but I still will get the following log output:

pyhoca-gui[11764] (PyHoca-GUI) NOTICE: [AppHeads WAN - disconnect] X2Go 
Profile is now disconnected.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gevent/greenlet.py", line 536, 
in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/x2go/client.py", line 3005, in 
disconnect_profile
    _retval = s.disconnect() | _retval
  File "/usr/lib/python2.7/site-packages/x2go/session.py", line 1377, 
in disconnect
    self._lock.release()
  File "src/gevent/_semaphore.py", line 266, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5353)
  File "src/gevent/_semaphore.py", line 268, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5291)
error: Semaphore released too many times
Thu Mar 16 21:28:59 2017 <Greenlet at 0x7f340f8a5370: <bound method 
PyHocaGUI.disconnect_profile of <pyhoca.wxgui.frontend.PyHocaGUI; proxy 
of <Swig Object of type 'wxPyApp *' at 0x55e7af0c6320> >>(u'AppHeads 
WAN')> failed with error


Next if I try to connect to server again then GUI looks like I was 
connected to server, but previously terminated session is showed like 
running (though pressing "Show session windows" results in nothing) and 
"An unknown error occured during authentication" message is popped up 
and the following log is outputed:


pyhoca-gui[11764] (x2gosessregistry-pylib) NOTICE: registering X2Go 
session AppHeads WAN...
pyhoca-gui[11764] (x2goclient-pylib) NOTICE: initializing X2Go session...
pyhoca-gui[11764] (PyHoca-GUI) NOTICE: [AppHeads WAN - unknown error] An 
unknown error occurred during authentication!
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gevent/greenlet.py", line 536, 
in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/pyhoca/wxgui/frontend.py", 
line 636, in _do_authenticate
    self._X2GoClient__connect_session(session_uuid, 
add_to_known_hosts=self.add_to_known_hosts)
  File "/usr/lib/python2.7/site-packages/x2go/client.py", line 1367, in 
connect_session
    sshproxy_force_password_auth=sshproxy_force_password_auth,
  File "/usr/lib/python2.7/site-packages/x2go/session.py", line 1355, 
in connect
    self.update_status()
  File "/usr/lib/python2.7/site-packages/x2go/session.py", line 1603, 
in update_status
    session_list = self.control_session.list_sessions()
  File 
"/usr/lib/python2.7/site-packages/x2go/backends/control/plain.py", line 
1749, in list_sessions
    self.associated_terminals[_session_name].__del__()
  File 
"/usr/lib/python2.7/site-packages/x2go/backends/terminal/plain.py", line 
413, in __del__
    self._x2go_tidy_up()
  File 
"/usr/lib/python2.7/site-packages/x2go/backends/terminal/plain.py", line 
424, in _x2go_tidy_up
    self._share_local_folder_lock.release()
  File "src/gevent/_semaphore.py", line 266, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5353)
  File "src/gevent/_semaphore.py", line 268, in 
gevent._semaphore.BoundedSemaphore.release 
(src/gevent/gevent._semaphore.c:5291)
error: Semaphore released too many times
Thu Mar 16 21:34:17 2017 <Greenlet at 0x7f340f8a5370: <bound method 
PyHocaGUI._do_authenticate of <pyhoca.wxgui.frontend.PyHocaGUI; proxy of 
<Swig Object of type 'wxPyApp *' at 0x55e7af0c6320> 
>>(<wx._core.CommandEvent; proxy of <Swig Object of t, 
'299442ea-0a77-11e7-9d4b-58946b494d4c')> failed with error


After that if I press "Disconnect from server" nothing happens except 
showing popup that profile is disconnected though GUI says that there is 
still active connection and I even can start new desktop session.

pyhoca-cli also has that "Semaphore released too many times" error. I 
will report it as separate bug.


--

Michael Ledin



Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Apr 19 15:57:57 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.