mcom errors cause Stage to shutdown

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

mcom errors cause Stage to shutdown

Adam Ray
I posted a message about the error (-1) sending request and I have
determined that this error occurs when one robot is trying to pop/read
at the exact same time that another robot is trying to push onto the
same channel and type.

I have dealt with this error in my control program, but I am having
another error now.  Occasionally, when a robot reads at the same time
that another robot is pushing on the same channel and type, the robot
reads error free...but the data is composed of random non-character
symbols.  Immediately following, the stage driver shuts down with the
on-screen message "Shutting stage driver down".

Does anyone know how to stop the stage driver from automatically
shutting down?  I could deal with this erroneous data problem in my
control code if the stage driver would not automatically shutdown.

thanks,
adam


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: mcom errors cause Stage to shutdown

Reed Hedges-2

mcom really ought to either protect the buffer with a mutex, or use a different
kind of data structure that does not require a mutex.  If you've looked at the
code, it's kind of confusing sometimes and I'm sure there are several bugs still
lurking in there.

I assume Stage is shutting down because the mcom Player driver is crashing or
overflowing some buffer such that Stage is getting erroneous commands from
Player.  Are there any other messages printed that might indicate why Stage
decided to shut down?  What version of Stage and Player is this?

Reed


Adam Ray wrote:

> I posted a message about the error (-1) sending request and I have
> determined that this error occurs when one robot is trying to pop/read
> at the exact same time that another robot is trying to push onto the
> same channel and type.
>
> I have dealt with this error in my control program, but I am having
> another error now.  Occasionally, when a robot reads at the same time
> that another robot is pushing on the same channel and type, the robot
> reads error free...but the data is composed of random non-character
> symbols.  Immediately following, the stage driver shuts down with the
> on-screen message "Shutting stage driver down".
>
> Does anyone know how to stop the stage driver from automatically
> shutting down?  I could deal with this erroneous data problem in my
> control code if the stage driver would not automatically shutdown.
>
> thanks,
> adam
>


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: mcom errors cause Stage to shutdown

Adam Ray
In reply to this post by Adam Ray
I have actually found a temporary fix to the mcom error problem.  I'm
using Player-1.6.4 and Stage-1.6.2

In the file "player-1.6.4/client_libs/c++/mcomproxy.cc" I have added a
few lines in the MComProxy::Read section of the code (~line 70) that
check each character in the reply.data.data string to see if it is a
recognizable character (a-z,A-Z,0-9, or NULL) and returns (-1) if any
characters are not recognizable.

I'm pretty sure this is an inefficient fix, but it has worked for my
purposes so far.


adam


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: mcom errors cause Stage to shutdown

Reed Hedges-2
Adam Ray wrote:

> I have actually found a temporary fix to the mcom error problem.  I'm
> using Player-1.6.4 and Stage-1.6.2
>
> In the file "player-1.6.4/client_libs/c++/mcomproxy.cc" I have added a
> few lines in the MComProxy::Read section of the code (~line 70) that
> check each character in the reply.data.data string to see if it is a
> recognizable character (a-z,A-Z,0-9, or NULL) and returns (-1) if any
> characters are not recognizable.
>
> I'm pretty sure this is an inefficient fix, but it has worked for my
> purposes so far.


Yes, it's the mcom Player plugin that really needs to be fixed, though glad you
found a way to make it work for you. I feel responsible for mcom since I sort of
inherited it from the original author, but I never use it myself anymore and
don't really know how to fix this.  Sorry!

Reed



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

lodo Player driver

Julian Hoare
In reply to this post by Adam Ray
Hi all, I am trying to use the lodo plugin driver but keep getting seg
faults from the player server.

I thought it may have been my config files or client app, but even when I
try to run the "driver test" as recommended by Andrew;

%player -r test_data.log test_log.cfg

I get a seg fault after the player server loads up.

I am using Player 1.6.5 and I get this error on both lodo_driver.so
libraries from pmap-0.1.0 and lodo-0.0.0 packages.

Any idea?

Cheers,


Julian




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: lodo Player driver

Brian Gerkey

On Sep 29, 2005, at 5:43 AM, Julian Hoare wrote:

> Hi all, I am trying to use the lodo plugin driver but keep getting seg
> faults from the player server.
>
> I thought it may have been my config files or client app, but even  
> when I
> try to run the "driver test" as recommended by Andrew;
>
> %player -r test_data.log test_log.cfg
>
> I get a seg fault after the player server loads up.

Can you send a gdb backtrace?

     brian.

--
Brian Gerkey
[hidden email]
http://gerkey.org





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

RE: lodo Player driver

Julian Hoare
[root@localhost lodo-0.0.0]# gdb player
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run -r test_data.log test_log.cfg
Starting program: /usr/local/bin/player -r test_data.log test_log.cfg
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xa52000
[Thread debugging using libthread_db enabled]
[New Thread -1208960800 (LWP 5066)]
** Player v1.6.5 **
* Part of the Player/Stage Project [http://playerstage.sourceforge.net].
* Copyright 2000-2005 Brian Gerkey, Richard Vaughan, Andrew Howard,
* Nate Koenig and contributors.
* Released under the GNU General Public License.
Startup options: [TCP]

Parsing configuration file "test_log.cfg"
trying to load /home/jaho434/lodo-0.0.0/lodo_driver.so...success
invoking player_driver_init()...plugin init
success
Using device table:
------------------------------------------------------------
driver readlog provides 6665:position:1 6665:laser:0
driver lodo_driver provides 6665:position:10 6665:laser:10
------------------------------------------------------------
listening on ports: 6665
[New Thread -1234150480 (LWP 5069)]
[New Thread -1251869776 (LWP 5070)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1234150480 (LWP 5069)]
0x006dec0c in ____strtol_l_internal () from /lib/tls/libc.so.6
(gdb) bt
#0  0x006dec0c in ____strtol_l_internal () from /lib/tls/libc.so.6
#1  0x006de99f in __strtol_internal () from /lib/tls/libc.so.6
#2  0x0807fd9f in ReadLog::ParsePosition (this=0x9ee0638, id={code = 4,
index = 1, port = 6665}, linenum=1, token_count=12,
    tokens=0xb67013f0, time={tv_sec = 1075006297, tv_usec = 760999}) at
stdlib.h:332
#3  0x0808157c in ReadLog::ParseData (this=0x9ee0638, id={code = 4, index =
1, port = 6665}, linenum=1, token_count=12,
    tokens=0xb67013f0, time={tv_sec = 1075006297, tv_usec = 760999}) at
readlog.cc:843
#4  0x08081ab3 in ReadLog::Main (this=0x9ee0638) at readlog.cc:611
#5  0x080697c2 in Driver::DummyMain (devicep=0x9ee0638) at driver.cc:537
#6  0x008fa341 in start_thread () from /lib/tls/libpthread.so.0
#7  0x00779fee in clone () from /lib/tls/libc.so.6
(gdb)



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Brian
Gerkey
Sent: Friday, 30 September 2005 1:01 AM
To: [hidden email]
Subject: Re: [Playerstage-users] lodo Player driver


On Sep 29, 2005, at 5:43 AM, Julian Hoare wrote:

> Hi all, I am trying to use the lodo plugin driver but keep getting seg
> faults from the player server.
>
> I thought it may have been my config files or client app, but even  
> when I
> try to run the "driver test" as recommended by Andrew;
>
> %player -r test_data.log test_log.cfg
>
> I get a seg fault after the player server loads up.

Can you send a gdb backtrace?

     brian.

--
Brian Gerkey
[hidden email]
http://gerkey.org





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: lodo Player driver

Brian Gerkey

On Sep 30, 2005, at 1:32 AM, Julian Hoare wrote:
>
> (gdb) run -r test_data.log test_log.cfg
> Starting program: /usr/local/bin/player -r test_data.log test_log.cfg

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1234150480 (LWP 5069)]
> 0x006dec0c in ____strtol_l_internal () from /lib/tls/libc.so.6
> (gdb) bt
> #0  0x006dec0c in ____strtol_l_internal () from /lib/tls/libc.so.6
> #1  0x006de99f in __strtol_internal () from /lib/tls/libc.so.6
> #2  0x0807fd9f in ReadLog::ParsePosition (this=0x9ee0638, id={code  
> = 4,
> index = 1, port = 6665}, linenum=1, token_count=12,
>     tokens=0xb67013f0, time={tv_sec = 1075006297, tv_usec =  
> 760999}) at
> stdlib.h:332

Looks like you're seeing this bug:

http://sourceforge.net/tracker/index.php?
func=detail&aid=1220767&group_id=42445&atid=433164

In this case readlog is expecting the newer position log format,  
which include a stall field.  I guess the test_data.log is in the  
older format, without that field.  You can either make a new log  
(using a physical or simulated robot), or add that field to  
test_data.log (basically, add a single zero at the end of every line  
that starts with "position").

At some point I'll try to make readlog more robust.

     brian.

--
Brian Gerkey
[hidden email]
http://gerkey.org





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users