ldtpd hangs sometimes when importing ldtp module

Bug #551457 reported by Ara Pulido
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LDTP
Fix Released
Medium
ldtp (Ubuntu)
Fix Released
High
Ara Pulido

Bug Description

Binary package hint: ldtp

In Ubuntu 10.04, when I import ldtp module, I get a connection refused error.
After two or three attempts the module is correctly imported.

This is happening with ldtp 2.0.4.

In [1]: import ldtp

** (-c:4829): WARNING **: Trying to register gtype 'WnckWindowState' as enum
when in fact it is of type 'GFlags'

** (-c:4829): WARNING **: Trying to register gtype 'WnckWindowActions' as enum
when in fact it is of type 'GFlags'

** (-c:4829): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask'
as enum when in fact it is of type 'GFlags'
---------------------------------------------------------------------------
error Traceback (most recent call last)

/home/ara/curro/mago/trunk2/<ipython console> in <module>()

/usr/lib/pymodules/python2.6/ldtp/__init__.py in <module>()
    255 return None
    256
--> 257 _populateNamespace(globals())
    258 _pollEvents = PollEvents()
    259 thread.start_new_thread(_pollEvents.run, ())

/usr/lib/pymodules/python2.6/ldtp/__init__.py in _populateNamespace(d)
     58
     59 def _populateNamespace(d):
---> 60 for method in client._client.system.listMethods():
     61 if method.startswith('system.'):
     62 continue

/usr/lib/python2.6/xmlrpclib.pyc in __call__(self, *args)
   1197 return _Method(self.__send, "%s.%s" % (self.__name, name))
   1198 def __call__(self, *args):
-> 1199 return self.__send(self.__name, args)
   1200
   1201 ##

/usr/lib/python2.6/xmlrpclib.pyc in __request(self, methodname, params)
   1487 self.__handler,
   1488 request,
-> 1489 verbose=self.__verbose
   1490 )
   1491

/usr/lib/pymodules/python2.6/ldtp/client.pyc in request(self, host, handler,
request_body, verbose)
     59 # Retry connecting again

     60 return xmlrpclib.Transport.request(
---> 61 self, host, handler, request_body, verbose=0)
     62 raise
     63 except xmlrpclib.Fault, e:

/usr/lib/python2.6/xmlrpclib.pyc in request(self, host, handler, request_body,
verbose)
   1233 self.send_host(h, host)
   1234 self.send_user_agent(h)
-> 1235 self.send_content(h, request_body)
   1236
   1237 errcode, errmsg, headers = h.getreply()

/usr/lib/python2.6/xmlrpclib.pyc in send_content(self, connection,
request_body)
   1347 connection.putheader("Content-Type", "text/xml")
   1348 connection.putheader("Content-Length", str(len(request_body)))
-> 1349 connection.endheaders()
   1350 if request_body:
   1351 connection.send(request_body)

/usr/lib/python2.6/httplib.pyc in endheaders(self)
    902 raise CannotSendHeader()
    903
--> 904 self._send_output()
    905
    906 def request(self, method, url, body=None, headers={}):

/usr/lib/python2.6/httplib.pyc in _send_output(self)
    774 msg = "\r\n".join(self._buffer)
    775 del self._buffer[:]
--> 776 self.send(msg)
    777
    778 def putrequest(self, method, url, skip_host=0,
skip_accept_encoding=0):

/usr/lib/python2.6/httplib.pyc in send(self, str)
    733 if self.sock is None:
    734 if self.auto_open:
--> 735 self.connect()
    736 else:
    737 raise NotConnected()

/usr/lib/python2.6/httplib.pyc in connect(self)
    714 """Connect to the host and port specified in __init__."""
    715 self.sock = socket.create_connection((self.host,self.port),
--> 716 self.timeout)
    717
    718 if self._tunnel_host:

/usr/lib/python2.6/socket.pyc in create_connection(address, timeout)
    510 except error, msg:
    511 if sock is not None:
    512 sock.close()
    513
--> 514 raise error, msg

error: [Errno 111] Connection refused

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ldtp 2.0.4-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-17.26-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-17-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
CheckboxSubmission: a08fd14ff73f03f0a48f9e6d0af6c8e2
CheckboxSystem: bb422ca46d02494cdbc459927a98bc2f
Date: Tue Mar 30 08:52:07 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: ldtp

Revision history for this message
Ara Pulido (ara) wrote :
Changed in ldtp (Ubuntu):
status: New → In Progress
assignee: nobody → Ara Pulido (apulido)
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ldtp - 2.0.5-0ubuntu1

---------------
ldtp (2.0.5-0ubuntu1) lucid; urgency=low

  * Bug fix upstream release
    + ldtpd hangs sometimes when importing ldtp module (LP: #551457)
 -- Ara Pulido <email address hidden> Tue, 30 Mar 2010 09:18:27 +0200

Changed in ldtp (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Ara Pulido (ara) wrote :

This keeps happening (not that often, but occasionally under heavy I/O load) in ldtp 2.0.5
I will keep testing the latests commits in GIT.

Changed in ldtp (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ldtp - 2.0.6-0ubuntu1

---------------
ldtp (2.0.6-0ubuntu1) lucid; urgency=low

  * Bug fix upstream release
    + Regression in upstream:
      Component does not have a getchild method (LP: #257560)
    + Ldtpd is still hanging under heavy I/O (LP: #551457)
 -- Ara Pulido <email address hidden> Wed, 14 Apr 2010 13:04:35 +0200

Changed in ldtp (Ubuntu):
status: Triaged → Fix Released
Changed in ldtp:
status: Unknown → Fix Released
Revision history for this message
NarsuMan (narsuman) wrote :

Hello!

I have noticed same kind of problems with ubuntu 10.4 running as vmware image.
I cannot startup ldtp at all it hang on terminal.

------------------>

nestuser@ubuntu:~$ ldtp

** (ldtp:2757): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (ldtp:2757): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (ldtp:2757): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'

<---------------------------

Revision history for this message
Nagappan Alagappan (nagappan) wrote :

If you start the binary from terminal, it will keep running until you press control+c. You have to import it inside python terminal. Hope this helps.

Thanks

Changed in ldtp:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.