Bug 196

Summary: minor tcpconn.py fixes
Product: Ganglia Monitoring System Reporter: Kostas Georgiou <k.georgiou@imperial.ac.uk>
Component: gmondAssignee: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P2    
Version: 3.1.x   
Hardware: PC   
OS: Linux   
Attachments: patch against trunk

Description:   Opened: 2008-07-30 14:32
fd_poll.poll() sometimes fail with:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
    self.run()
  File "/usr/lib64/ganglia/python_modules/tcpconn.py", line 252, in run
    poll_events = fd_poll.poll()
error: (4, 'Interrupted system call')

which stops the module from working until a gmond restart.
------- Comment #1 From Kostas Georgiou 2008-07-30 14:36:55 -------
Created an attachment (id=149) [details]
patch against trunk

Since readlines() is blocking there is no point to use poll (especially without
a timeout). I also added a check to run time.sleep(_refresh_rate) only if we
aren't shutting down. It speeds up gmond -m at least.
------- Comment #2 From Carlo Marcelo Arenas Belon 2008-08-02 08:33:46 -------
can you also reproduce this bug in trunk without your patch?
what is triggering the "Interrupted system call" from poll()?
which version of python (2.5.?) and architecture (x86_64?)
------- Comment #3 From Carlo Marcelo Arenas Belon 2008-08-02 15:34:15 -------
Committed revision 1621 for trunk
------- Comment #4 From Carlo Marcelo Arenas Belon 2008-08-09 23:28:46 -------
Committed revision 1645 for 3.1