ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Beginner tutorials: segmentation fault with rospack depends1

asked 2013-01-06 09:19:59 -0500

updated 2013-01-08 09:07:13 -0500

I have created a package as described under /ROS/Tutorials/CreatingPackage, and everything seems ok.

However, I get a segmentation fault when I try to see the dependencies with

rospack depends1 beginner_tutorials

Has anyone else encountered this problem? What might be the cause?

My setup: Ubuntu 12.04 32 bit, ROS Groovy.

EDIT: Debug trace, obtained by following @IsaacSaito's suggestion:

(gdb) run depends1 beginner_tutorials
Starting program: /opt/ros/groovy/bin/rospack depends1 beginner_tutorials
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb7a23112 in PyObject_IsTrue () from /usr/lib/libpython2.7.so.1.0

And the contents of the single file in /var/crash:

PythonArgs: ['/usr/bin/jockey-text', '-C', '--no-dbus', '-k', '3.2.0-29-generic-pae']
Traceback:
Traceback (most recent call last):
   File "/usr/bin/jockey-text", line 128, in <module>
     sys.exit(u.run())
   File "/usr/lib/python2.7/dist-packages/jockey/ui.py", line 452, in run
     if self.check_composite():
   File "/usr/lib/python2.7/dist-packages/jockey/ui.py", line 574, in check_composite
     self.set_handler_enable(h_id, 'enable', self.argv_options.confirm)
   File "/usr/lib/python2.7/dist-packages/jockey/ui.py", line 618, in set_handler_enable
     i = convert_dbus_exceptions(self.backend().handler_info, handler_id)
   File "/usr/lib/python2.7/dist-packages/jockey/backend.py", line 98, in convert_dbus_exceptions
     return fn(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/jockey/backend.py", line 264, in handler_info
     'recommended': str(h.recommended()),
   File "/usr/share/jockey/handlers/nvidia.py", line 130, in recommended
     nd = NvidiaDetection()
   File "/usr/lib/python2.7/dist-packages/NvidiaDetector/nvidiadetector.py", line 68, in __init__
     self.getData()
   File "/usr/lib/python2.7/dist-packages/NvidiaDetector/nvidiadetector.py", line 149, in getData
     driver_version = self.__get_value_from_name(stripped_package_name)
   File "/usr/lib/python2.7/dist-packages/NvidiaDetector/nvidiadetector.py", line 87, in __get_value_from_name
     v = int(name)
 ValueError: invalid literal for int() with base 10: 'experimental-304'
UserGroups:

So it seems some python module chokes when detecting my Nvidia graphic card. I have a GeForce GT 630M, if that is relevant, and I have not installed yet any additional drivers except what Ubuntu installed by itself. I will try to see if updating the drivers will help, but seems like a weird dependency for ROS to get stuck on.

EDIT 2: Seems to be a bug in Ubuntu 12.04 and unrelated to ROS itself: bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1070795

EDIT 3: My conclusion in Edit 2 was incorrect, I had made a mistake in checking the creation date for the /var/crash file. Nothing is generated there when I run rospack depends1. The (hopefully correct) trace now! Yes, kind of a Linux noob here... :-)

(gdb) bt
#0  0xb7a23112 in PyObject_IsTrue () from /usr/lib/libpython2.7.so.1.0
#1  0xb7fabc40 in rospack::Rosstackage::isSysPackage(std::string const&) ()
   from /opt/ros/groovy/lib/librospack.so
#2  0xb7fac8ee in rospack::Rosstackage::computeDepsInternal(rospack::Stackage*, bool, std::string const&) () from /opt/ros/groovy/lib/librospack.so
#3  0xb7faccb6 in rospack::Rosstackage::computeDeps(rospack::Stackage*, bool)
() from /opt/ros/groovy/lib/librospack.so
#4  0xb7fac8b9 ...
(more)
edit retag flag offensive close merge delete

Comments

2

Can you share debug trace? For ex., "$ gdb rospack" then "run depends1 beginner_tutorials"

130s gravatar image 130s  ( 2013-01-06 10:27:18 -0500 )edit

@IsaacSaito I will post the trace when I get home today, thanks!

Cristina gravatar image Cristina  ( 2013-01-06 21:47:23 -0500 )edit

@IsaacSaito I've posted my trace, seems like a python module gets stuck while detecting my Nvidia gfx card. Still not clear what to do.

Cristina gravatar image Cristina  ( 2013-01-07 05:39:24 -0500 )edit

Also, are you sure the crash content you posted is associated with rospack? It doesn't matter if the source of bug resides in ROS or not as long as you face an error, but it seems strange to me that rospack with beginner_tutorials kicks graphic card...

130s gravatar image 130s  ( 2013-01-07 10:49:47 -0500 )edit

On gdb's console, run bt after Segmentation fault occurs so that we can see backtrace. What you pasted isn't yet really a backtrace ;)

130s gravatar image 130s  ( 2013-01-07 11:00:12 -0500 )edit

@IsaacSaito Sorry, Linux noob-ish user here...the Windows debug landscape is different :D Posted what is hopefully complete debug trace now.

Cristina gravatar image Cristina  ( 2013-01-08 09:08:44 -0500 )edit

What happens with other packages? for example, "$ rospack depends1 roscpp"? Also if you have other custom pkgs (= pkgs that you created) what happens with them?

130s gravatar image 130s  ( 2013-01-08 19:24:16 -0500 )edit

@IsaacSaito As far as I can recall, it gives me a segfault even for existing ros packages, but I'll try again to make sure. I have no other custom packages -- this happened while creating my first package as part of the beginner tutorial!

Cristina gravatar image Cristina  ( 2013-01-08 19:32:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-01-08 20:54:06 -0500

130s gravatar image

I confirm that the same phenomenon can be observed on my 32b environment. Ticket opened: https://github.com/ros/rospack/issues/4

edit flag offensive delete link more

Comments

@Cristina ticket is closed with fixation. It'll take sometime to become available from debian package. Thanks for reporting!

130s gravatar image 130s  ( 2013-01-11 07:04:37 -0500 )edit

@IsaacSaito Yep, I was following the github ticket and saw the fix...thanks a lot for your help!

Cristina gravatar image Cristina  ( 2013-01-11 07:22:09 -0500 )edit

Question Tools

Stats

Asked: 2013-01-06 09:19:59 -0500

Seen: 11,052 times

Last updated: Jan 08 '13