[X2Go-Dev] Bug#1016: python-x2go breaks with gevent 1.1.0

Cezary Statkiewicz cezio at thelirium.net
Fri Apr 1 19:27:59 CEST 2016


Package: python-x2go
Version: 0.5.0.4

 Hi,

 I'm using x2go python bindings, and noticed that X2GoSession's .suspend() can 
break with gevent 1.1. I've downgraded gevent to 1.0.2 and unchanged code 
works fine with it.

 Sample code (i believe taken from a sample code):


 class Client(X2GoClient):
    def do_connect(self):
        ...
        sid = self.register_session(server=session_args.pop('server', None),
                                    username=session_args.pop('username', 
None),
                                    profile_name=session_args.pop('profile_name', 
None),
                                    port=session_args.pop('port', None),
                                    return_object=True)
        sid.update_params(session_args)
        sid.connect()
        self.clean_sessions(sid.uuid)
        sid.start(cmd='XFCE')

        session_name = sid.get_session_name()
        if session_name is None:
            log.error("X2Go session creation: Session name is None, 
terminating")
            return
        sid.suspend()
        ...


 Traceback:


  File "/usr/lib/python2.7/dist-packages/x2go/session.py", line 2303, in 
suspend
    self._lock.release()
  File "gevent/_semaphore.py", line 266, in 
gevent._semaphore.BoundedSemaphore.release (gevent/gevent._semaphore.c:4866)
  File "gevent/_semaphore.py", line 268, in 
gevent._semaphore.BoundedSemaphore.release (gevent/gevent._semaphore.c:4802)
thread.error: Semaphore released too many times



 Best Regards,

 Cezary Statkiewicz
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20160401/f7c8f726/attachment.pgp>


More information about the x2go-dev mailing list