Hi Brian,<div><br></div><div>Wim and I have been working on a project with some of the folks at Willow Garage to restructure some of the internals of pr2_mechanism.  We've been very careful in ensuring that we keep API compatibility with the previous releases.  Unfortunately, however, we were unaware of the ABI compatibility requirements specified in REP 9.  Our changes included an ABI breaking change in pr2_mechanism, which would cause all sorts of memory errors for anyone that compiled against an old pr2_mechanism deb and then upgraded it.  We're sorry for introducing that bug into your system.</div>

<div><br></div><div>Given that we've already released this ABI breaking change and reverting would result in another ABI breaking change, I think that keeping the latest version of pr2_mechanism in the release is our best way to proceed.</div>

<div><br></div><div>In this case, we knew we were making an ABI breaking change, and we could have saved you a bunch of debugging time by sending out an email mentioning the ABI change.  However, in many cases, I think developers may not even realize that they're making this sort of breaking change.  Without some sort of automated ABI checking, it may be hard to enforce REP 9.</div>

<div><br></div><div>I'm sorry again for putting you on this segfaulting, glibc corrupting, memory error hunt.  Please let me know if there's anything we can do to help.</div><div><br></div><div>Vijay Pradeep</div>

<div>hiDOF, Inc.</div><div>Co-Founder</div><div><br><div class="gmail_quote">On Thu, Jan 3, 2013 at 11:01 AM, Brian Gerkey <span dir="ltr"><<a href="mailto:gerkey@osrfoundation.org" target="_blank">gerkey@osrfoundation.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi,<br>
<br>
We recently experienced the following problem: a binary deb that we<br>
build against ROS Fuerte started producing mysterious crashes when<br>
installed on a fresh system.  It had previously been working fine, and<br>
still worked fine on some not-freshly installed systems.<br>
<br>
After a bit of head-scratching, we hypothesized that something had<br>
changed in the underlying Fuerte debs.  So we tried compiling our<br>
code, without changes, against the latest Fuerte debs.  That worked<br>
fine.  So we did a no-op re-release of our package, to produce a new<br>
deb built against the latest Fuerte debs.  That works fine, too. So,<br>
for now, our problem is solved.<br>
<br>
But I'd like to avoid this problem in the future.  I captured the<br>
relevant dpkg state of a system with the older Fuerte debs installed<br>
and the same system after removing ros-fuerte-* and reinstalling.  I<br>
narrowed the differences down to:<br>
<br>
< ii  ros-fuerte-pr2-controllers<br>
1.8.0-s1351921336~precise                 PR2 Controllers<br>
< ii  ros-fuerte-pr2-mechanism<br>
1.6.1-s1351920681~precise                 PR2 mechanism<br>
---<br>
> ii  ros-fuerte-pr2-controllers               1.8.1-s1356572075~precise                 PR2 Controllers<br>
> ii  ros-fuerte-pr2-mechanism                 1.6.4-s1356571098~precise                 PR2 mechanism<br>
<br>
I'm guessing that in one or both of those packages, ABI compatibility<br>
was violated in a release somewhere in the intervening releases.  In<br>
our code, we're using both of those packages in plugins that load into<br>
Gazebo, so it makes sense that ABI-breaking changes there would cause<br>
the crash we were seeing.  I'd like to narrow it down to one or the<br>
other of those two packages, but I would either need to build from<br>
source or pull the older debs from somewhere; are old ROS debs<br>
archived?<br>
<br>
We are guaranteeing ABI compatibility for stable packages within a ROS<br>
distribution, right?  REP 9 says yes:<br>
<a href="http://www.ros.org/reps/rep-0009.html" target="_blank">http://www.ros.org/reps/rep-0009.html</a>.  But are developers and<br>
maintainers aware of that policy?  And are we doing any checking,<br>
automatic or otherwise, for compatibility?<br>
<br>
While in this case it may have just been an errant change to a stable<br>
package, it can easily happen again, and it can be painful to debug.<br>
Any ideas on what to do to better support our use case, where we're<br>
building debs on top of ROS debs?  I'd really prefer not to replicate<br>
the strict version-locking system that the ROS debs use; ABI<br>
compatibility is supposed to make that sort of thing unnecessary.<br>
<br>
As a stopgap measure, it would be enough for us to know when new debs<br>
go into the public ROS repo.  Maybe an email could go to this list<br>
when that sync is done?  Then we could trigger rebuilds of our<br>
ROS-dependent debs.<br>
<br>
    brian.<br>
<br>
p.s. If you care to reproduce the problem, on an Ubuntu 12.04 Precise system:<br>
<br>
1. Add our repo:<br>
sudo sh -c 'echo "deb <a href="http://packages.osrfoundation.org/drc/ubuntu" target="_blank">http://packages.osrfoundation.org/drc/ubuntu</a><br>
precise main" > /etc/apt/sources.list.d/drc-latest.list'<br>
wget <a href="http://packages.osrfoundation.org/drc.key" target="_blank">http://packages.osrfoundation.org/drc.key</a> -O - | sudo apt-key add -<br>
<br>
2. Install drcsim (you'll get the fixed version, 1.3.1):<br>
sudo apt-get update<br>
sudo apt-get install drcsim<br>
<br>
3. Launch the simulation (it should work, displaying a simulation with<br>
a humanoid robot swaying slightly):<br>
. /usr/share/drcsim/setup.sh<br>
roslaunch atlas_utils atlas.launch<br>
<br>
4. Revert to drcsim 1.3.0:<br>
sudo apt-get remove drcsim<br>
wget <a href="http://gazebosim.org/assets/distributions/drcsim_1.3.0_amd64.deb" target="_blank">http://gazebosim.org/assets/distributions/drcsim_1.3.0_amd64.deb</a><br>
sudo dpkg -i drcsim_1.3.0_amd64.deb<br>
<br>
5. Launch the simulation (it should crash, perhaps after briefly<br>
displaying a simulation with an empty world):<br>
. /usr/share/drcsim/setup.sh<br>
roslaunch atlas_utils atlas.launch<br>
<br>
Note: drcsim 1.3.0 and 1.3.1 are very nearly code-identical.  Below is<br>
a diff of the source tarballs from which the debs were built (you can<br>
get them from <a href="http://gazebosim.org/assets/distributions" target="_blank">http://gazebosim.org/assets/distributions</a>).  The "Only<br>
in" differences come from the fact that 1.3.0 was released with an<br>
older version of a tool that wasn't smart enough to remove detritus<br>
that the developer had in his or her local working copy.  And I've<br>
verified that building 1.3.0 from source, with the detritus present,<br>
against the newer Fuerte debs works fine.<br>
<br>
Only in drcsim-1.3.0: atlas_drc_rename.sh<br>
diff -ur drcsim-1.3.0/CMakeLists.txt drcsim-1.3.1/CMakeLists.txt<br>
--- drcsim-1.3.0/CMakeLists.txt 2012-12-21 16:21:45.000000000 -0800<br>
+++ drcsim-1.3.1/CMakeLists.txt 2013-01-02 21:19:20.000000000 -0800<br>
@@ -5,7 +5,7 @@<br>
<br>
 set (DRC_SIM_MAJOR_VERSION 1)<br>
 set (DRC_SIM_MINOR_VERSION 3)<br>
-set (DRC_SIM_PATCH_VERSION 0)<br>
+set (DRC_SIM_PATCH_VERSION 1)<br>
 set (DRC_SIM_VERSION ${DRC_SIM_MAJOR_VERSION}.${DRC_SIM_MINOR_VERSION})<br>
 set (DRC_SIM_VERSION_FULL<br>
${DRC_SIM_MAJOR_VERSION}.${DRC_SIM_MINOR_VERSION}.${DRC_SIM_PATCH_VERSION})<br>
 message (STATUS "${PROJECT_NAME} version ${DRC_SIM_VERSION_FULL}")<br>
Only in drcsim-1.3.0: CMakeLists.txt.orig<br>
Only in drcsim-1.3.1: .hg_archival.txt<br>
diff -ur drcsim-1.3.0/.hgtags drcsim-1.3.1/.hgtags<br>
--- drcsim-1.3.0/.hgtags        2012-12-21 16:21:45.000000000 -0800<br>
+++ drcsim-1.3.1/.hgtags        2013-01-02 21:19:20.000000000 -0800<br>
@@ -73,4 +73,8 @@<br>
 1557aec7da4cd5d53febcd81b666689af1732c5f drcsim-prerelease_1.2.1<br>
 6f896feb2bec52739622e97a7d6cdd518eb2b735 drcsim-prerelease_1.2.1<br>
 4b10e0f62abb21f1b2a1498738e110623085c29d drcsim-prerelease_1.3.0<br>
-f0f919ec908db051bb7657e2bd0d8e0d7b06583f drcsim_1.3.0<br>
+0117103c92002c100b2ccf459f0d791b86054283 drcsim_1.3.1<br>
+0117103c92002c100b2ccf459f0d791b86054283 drcsim_1.3.1<br>
+756c72598020b604d8e39fe1db9274b5fc92e8cc drcsim_1.3.1<br>
+756c72598020b604d8e39fe1db9274b5fc92e8cc drcsim_1.3.1<br>
+2cdef74a2f7177c0410c1272bee34e1d70ada0da drcsim_1.3.1<br>
Only in drcsim-1.3.0/models/atlas: drc_robot.gv<br>
Only in drcsim-1.3.0/models/atlas: drc_robot.pdf<br>
Only in drcsim-1.3.0/models/atlas/meshes: l_clav.dae.orig<br>
Only in drcsim-1.3.0/models/atlas/meshes: r_clav.dae.orig<br>
Only in drcsim-1.3.0/models/atlas: model.sdf.orig<br>
Only in drcsim-1.3.0/models/atlas: model.sdf.rej<br>
Only in drcsim-1.3.0/models: drc_robot.gv<br>
Only in drcsim-1.3.0/models: drc_robot.sdf<br>
Only in drcsim-1.3.0/models/drc_terrain/materials/textures:<br>
dirt_diffusespecular.png<br>
Only in drcsim-1.3.0/models/drc_terrain/materials/textures: dirt_normal.png<br>
Only in drcsim-1.3.0/models/drc_terrain/materials/textures:<br>
fungus_diffusespecular.png<br>
Only in drcsim-1.3.0/models/drc_terrain/materials/textures: fungus_normal.png<br>
Only in drcsim-1.3.0/models/drc_terrain/materials/textures:<br>
grass_diffusespecular.png<br>
Only in drcsim-1.3.0/models/drc_terrain/materials/textures: grass_normal.png<br>
Only in drcsim-1.3.0/models: low_poly_golf_cart.model-1.0<br>
Only in drcsim-1.3.0/models: pr2.model<br>
Only in drcsim-1.3.0/plugins/ros: .DRCRobotPlugin.cc.swo<br>
Only in drcsim-1.3.0/plugins/ros: gazebo_ros_api_plugin.cpp.orig<br>
Only in drcsim-1.3.0/plugins/ros: gazebo_ros_api_plugin.h.orig<br>
Only in drcsim-1.3.0/plugins/ros: gazebo_ros_bumper.cpp<br>
Only in drcsim-1.3.0/plugins/ros: gazebo_ros_bumper.h<br>
Only in drcsim-1.3.0/plugins/ros: MultiSenseSLPlugin.cpp.1<br>
Only in drcsim-1.3.0/plugins/ros: MultiSenseSLPlugin.h.1<br>
Only in drcsim-1.3.0/plugins/ros: test.cpp<br>
Only in drcsim-1.3.0/ros/atlas_utils/cmake: bdip-config.cmake<br>
Only in drcsim-1.3.0/ros/atlas_utils/cmake: pkgconfig<br>
Only in drcsim-1.3.0/ros/atlas_utils: drc_robot.sdf<br>
Only in drcsim-1.3.0/ros/atlas_utils: model.urdf<br>
Only in drcsim-1.3.0/ros/atlas_utils/raw: my_gripper.sdf<br>
Only in drcsim-1.3.0/ros/atlas_utils: test.launch<br>
Only in drcsim-1.3.0/ros/atlas_utils/urdf: drc_robot.urdf.orig<br>
Only in drcsim-1.3.0/ros/atlas_utils/urdf: drc_robot.urdf.rej<br>
Only in drcsim-1.3.0/ros/simple_trajectory: bin<br>
Only in drcsim-1.3.0: test.c<br>
Only in drcsim-1.3.0: tutorials<br>
Only in drcsim-1.3.0/worlds: CMakeLists.txt.orig<br>
Only in drcsim-1.3.0/worlds: drc_robot.world.orig<br>
Only in drcsim-1.3.0/worlds: .drc_robot.world.swo<br>
Only in drcsim-1.3.0/worlds: empty.world<br>
</blockquote></div><br></div>