Hi Ken,<div>I made the changes you asked me to in xmlrpc.py and here's the debug message I get on the console now:</div><div><br></div><div><div>Unhandled exception in thread started by <bound method TCPServer.run of <rospy.impl.tcpros_base.TCPServer object at 0x29cf4d0>></div>
<div>Traceback (most recent call last):</div><div>  File "/home/aarumbak/ros/ros/core/rospy/src/rospy/impl/tcpros_base.py", line 141, in run</div><div>Creating action server for manipulation/right_arm/put</div><div>
[ERROR] 1296509499.251038: ERROR: error running XML-RPC server: </div><div>Traceback (most recent call last):</div><div>  File "/home/aarumbak/ros/ros/core/rospy/src/rospy/impl/msnode.py", line 86, in run</div><div>
    super(ROSNode, self).run()</div><div>  File "/home/aarumbak/ros/ros/core/roslib/src/roslib/xmlrpc.py", line 246, in run</div><div>    raise Exception("unhandled exception [%s]"%(str(e)))</div><div>
Exception: unhandled exception [(4, 'Interrupted system call')]</div><div><br></div><div>    (client_sock, client_addr) = self.server_sock.accept()</div><div>  File "/usr/lib/python2.6/socket.py", line 197, in accept</div>
<div>    sock, addr = self._sock.accept()</div><div>socket.error: [INFO] 1296509499.252298: Manipulation applet is dying. RIP.</div><div>[Errno 4] Interrupted system call</div></div><div><br></div><div>I've also attached the log file for my rosnode to this email. The exception says that it is an Interrupted system call and it appears to be the socket accept call. I was wondering if it would make sense to write a signal handler or wrap this with some kind of No_Interrupts macro so that the accept call doesnt get interrupted again. But this would ofcourse be cosmetic and not treat the real cause. I am going to try debugging this more, since getting the software to work is absolutely essential for my project. But if I cant go much further, I will try running this on Ubuntu 10.04, which for some reason does not seem to give this problem. Thanks a lot and please let me know if there are other things I should try to fix this.</div>
<div>-Arjun.</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Mon, Jan 31, 2011 at 2:59 PM, Ken Conley <span dir="ltr"><<a href="mailto:kwc@willowgarage.com" target="_blank">kwc@willowgarage.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Arjun,<br>
<br>
The behavior is a bit weird.  The socket.error should have been caught<br>
in xmlrpc instead of passed on.  In Python 2.6, socket.error should be<br>
a subclass of IOError.<br>
<br>
Can you try adding a block like this to xmrpc.py and seeing if it<br>
changes the behavior?  It's basically a copy of the IOError branch,<br>
but with the specific socket.error type.<br>
<br>
 - Ken<br>
<br>
Before the final except block, after the IOError block:<br>
<br>
           except socket.error as (errno, errstr):<br>
<div>               # check for interrupted call, which can occur if we're<br>
               # embedded in a program using signals.  All other<br>
               # exceptions break _run.<br>
               if self.is_shutdown:<br>
                   pass<br>
               elif errno != 4:<br>
                   self.is_shutdown = True<br>
                   logger.error("serve forever IOError: %s,<br>
%s"%(errno, errstr))<br>
                   raise<br>
<br>
<br>
</div>Also, for more debugging, modify the final except block:<br>
<br>
           except Exception as e:<br>
<div>               if self.is_shutdown:<br>
                   pass<br>
               else:<br>
</div>                   raise Exception("unhandled exception [%s]"(str(e)) )<br>
<div><div></div><div><br>
On Mon, Jan 31, 2011 at 9:08 AM, Arjun <<a href="mailto:akarjun@gmail.com" target="_blank">akarjun@gmail.com</a>> wrote:<br>
> Hi Ken,<br>
> I got the ros core code from the ros1.2 branch again today and rebuilt it.<br>
> It has the code from the patch you sent me and I can also confirm that the<br>
> xmlrpc.py file does end with the code snippet from your email. The debug<br>
> message on the console output now has more information and so does the log<br>
> file for my rosnode. The console debug message for my node now says,<br>
> Traceback (most recent call last):<br>
>   File "/home/aarumbak/ros/ros/core/rospy/src/rospy/impl/tcpros_base.py",<br>
> line 141, in run<br>
>     (client_sock, client_addr) = self.server_sock.accept()<br>
>   File "/usr/lib/python2.6/socket.py", line 197, in accept<br>
>     sock, addr = self._sock.accept()<br>
> socket.error: [Errno 4] Interrupted system call<br>
> [ERROR] 1296493143.981902: ERROR: error running XML-RPC server:<br>
> Traceback (most recent call last):<br>
>   File "/home/aarumbak/ros/ros/core/rospy/src/rospy/impl/msnode.py", line<br>
> 86, in run<br>
>     super(ROSNode, self).run()<br>
>   File "/home/aarumbak/ros/ros/core/roslib/src/roslib/xmlrpc.py", line 221,<br>
> in run<br>
>     self.server.serve_forever()<br>
>   File "/usr/lib/python2.6/SocketServer.py", line 224, in serve_forever<br>
>     r, w, e = select.select([self], [], [], poll_interval)<br>
> error: (4, 'Interrupted system call')<br>
> I have also attached the log files with this email. Thanks a lot!<br>
> -Arjun.<br>
><br>
><br>
> On Mon, Jan 31, 2011 at 2:37 AM, Ken Conley <<a href="mailto:kwc@willowgarage.com" target="_blank">kwc@willowgarage.com</a>> wrote:<br>
>><br>
>> Hi Arjun,<br>
>><br>
>> The necessary info is missing due to a bug in the call to the logger.<br>
>> Can you try the attached patch?<br>
>><br>
>> Also, can you confirm that your roslib/src/roslib/xmlrpc.py ends with<br>
>> the code block below?<br>
>><br>
>> thanks,<br>
>> Ken<br>
>><br>
>>        while not self.is_shutdown:<br>
>>            try:<br>
>>                self.server.serve_forever()<br>
>>            except IOError as (errno, errstr):<br>
>>                # check for interrupted call, which can occur if we're<br>
>>                # embedded in a program using signals.  All other<br>
>>                # exceptions break _run.<br>
>>                if self.is_shutdown:<br>
>>                    pass<br>
>>                elif errno != 4:<br>
>>                    self.is_shutdown = True<br>
>>                    logger.error("serve forever IOError: %s,<br>
>> %s"%(errno, errstr))<br>
>>                    raise<br>
>>            except:<br>
>>                if self.is_shutdown:<br>
>>                    pass<br>
>>                else:<br>
>>                    raise<br>
>><br>
>><br>
>> On Sun, Jan 30, 2011 at 10:10 PM, Arjun <<a href="mailto:akarjun@gmail.com" target="_blank">akarjun@gmail.com</a>> wrote:<br>
>> > Hi Ken,<br>
>> > Thanks a lot for offering to take a look. I've attached the log file for<br>
>> > my<br>
>> > node and also the master.log file with this email. I mentioned openrave<br>
>> > only<br>
>> > because the previous person with the socket error used it as well and I<br>
>> > was<br>
>> > wondering if there was some connection there.<br>
>> > -Arjun.<br>
>> ><br>
>> > On Mon, Jan 31, 2011 at 12:29 AM, Ken Conley <<a href="mailto:kwc@willowgarage.com" target="_blank">kwc@willowgarage.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Hi Arjun,<br>
>> >><br>
>> >> I would need the log file from your actual node instead.  The rosout<br>
>> >> log file is just for the rosout node.  There should be a log file if<br>
>> >> you "roscd log" and look for your node's name.<br>
>> >><br>
>> >> Regardless, the patch for xmlrpc.py is not relevant here, as this is a<br>
>> >> different section of code.  The log file would hopefully provide more<br>
>> >> detail as to whether the above error is the cause or just a symptom.<br>
>> >> I haven't used rospy inside of openrave, so I'm not sure I can be of<br>
>> >> much help, though I could think of ways to make the code more robust<br>
>> >> to whatever the problem is.<br>
>> >><br>
>> >>  - Ken<br>
>> >><br>
>> >> On Sun, Jan 30, 2011 at 1:46 AM, Arjun <<a href="mailto:akarjun@gmail.com" target="_blank">akarjun@gmail.com</a>> wrote:<br>
>> >> > Hi all,<br>
>> >> >  I am getting a socket error when I launch my program (which uses<br>
>> >> > openrave).<br>
>> >> > The launch file launches a single node running on the same machine as<br>
>> >> > the<br>
>> >> > roscore. I am using Ubuntu 10.10 and my Python install is version<br>
>> >> > 2.6. I<br>
>> >> > did<br>
>> >> > look up the archives and found that someone else had mentioned this<br>
>> >> > same<br>
>> >> > problem about a couple of weeks ago and Ken Conley had addressed it.<br>
>> >> > I<br>
>> >> > followed the advice from Ken Conley in that thread and changed my<br>
>> >> > .rosinstall file to install from the ros1.2 branch instead just for<br>
>> >> > the<br>
>> >> > ros<br>
>> >> > stack. This gave me the latest xmlrpc.py file, which I verified with<br>
>> >> > the<br>
>> >> > previous thread, but I still get the same error.<br>
>> >> > Here's the error:<br>
>> >> > Unhandled exception in thread started by <bound method TCPServer.run<br>
>> >> > of<br>
>> >> > <rospy.impl.tcpros_base.TCPServer object at 0x37a0990>><br>
>> >> > Traceback (most recent call last):<br>
>> >> >   File<br>
>> >> > "/home/aarumbak/ros/ros/core/rospy/src/rospy/impl/tcpros_base.py",<br>
>> >> > line 141, in run<br>
>> >> >     (client_sock, client_addr) = self.server_sock.accept()<br>
>> >> >   File "/usr/lib/python2.6/socket.py", line 197, in accept<br>
>> >> >     sock, addr = self._sock.accept()<br>
>> >> > socket[INFO] 1296375790.973933: Manipulation applet is dying. RIP.<br>
>> >> > .error: [Errno 4] Interrupted system call<br>
>> >> > FYI, we run this software on Ubuntu 10.04 and I've never seen this<br>
>> >> > error<br>
>> >> > before. I got this error on Ubuntu 9.10 before (strangely the problem<br>
>> >> > went<br>
>> >> > away then) and now in 10.10. Any help would be much appreciated.<br>
>> >> > -Arjun.<br>
>> >> > attachment: relevant log file.<br>
>> >> ><br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > ros-users mailing list<br>
>> >> > <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
>> >> > <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
>> >> ><br>
>> >> ><br>
>> >> _______________________________________________<br>
>> >> ros-users mailing list<br>
>> >> <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
>> >> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > ros-users mailing list<br>
>> > <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
>> > <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
>> ><br>
>> ><br>
>><br>
>> _______________________________________________<br>
>> ros-users mailing list<br>
>> <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
>> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> ros-users mailing list<br>
> <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
><br>
><br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</div></div></blockquote></div><br></div>