Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal Instruction on UTM M2 Apple Silicon #598

Closed
w3ichen opened this issue Jun 8, 2024 · 1 comment
Closed

Illegal Instruction on UTM M2 Apple Silicon #598

w3ichen opened this issue Jun 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@w3ichen
Copy link

w3ichen commented Jun 8, 2024

Environment

  • OS Version: Ubuntu 20.04
  • Source or binary build? Binary version libignition-math6-dev 6.15.1-1~focal
  • UTM Virtual Machine Ubuntu 20.04 x86_64 emulation
  • Ros1 noetic
  • Gazebo11

Description

  • Expected behavior: Runs without error
  • Actual behavior: Illegal instruction SIGILL error, gzserver process has died, exit code 132

Steps to reproduce

  1. Launching gazebo starts without error (ie. roslaunch husky_gazebo husky_playpen.launch)
  2. Launching ros navigation stack and sensors causes the gazebo to error out (ie. roslaunch husky_viz view_robot.launch)

Output

Illegal instruction (core dumped)
[gazebo-2] process has died [pid 13647, exit code 132, cmd /opt/ros/noetic/lib/gazebo_ros/gzserver -e ode /home/husky
name: =gazebo
ot/src/mobile_manipulator/worlds/env.world __name:=gazebo - 1og:=/home/.ros/log/8ba903b4-242b-11ef-bc74-bbef25f09167/gazebo-2.log].
log file: /home/.ros/log/8ba903b4-242b-11ef-bc74-bbef25f09167/gazebo-2*.

GDB backtrace is showing gazebo math function is failing:
Error is coming from /lib/x86_64-linux-gnu/libignition-math6.so.6 with function generate_canonical

(gdb) bt

   #0  0x00007ffff60d6963 in double std::generate_canonical<double, 53ul, std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul> >(std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul>&)
    () at /lib/x86_64-linux-gnu/libignition-math6.so.6
#1  0x00007ffff60d6a04 in double std::normal_distribution<double>::operator()<std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul> >(std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul>&, std::normal_distribution<double>::param_type const&) ()
    at /lib/x86_64-linux-gnu/libignition-math6.so.6
#2  0x00007ffff60d6154 in ignition::math::v6::Rand::DblNormal(double, double)
    () at /lib/x86_64-linux-gnu/libignition-math6.so.6
#3  0x00007ffff72b16e7 in gazebo::sensors::GaussianNoiseModel::ApplyImpl(double, double) () at /lib/x86_64-linux-gnu/libgazebo_sensors.so.11
#4  0x00007ffff72cdf71 in gazebo::sensors::Noise::Apply(double, double) ()
    at /lib/x86_64-linux-gnu/libgazebo_sensors.so.11
#5  0x00007ffff72d1286 in gazebo::sensors::RaySensor::UpdateImpl(bool) ()
    at /lib/x86_64-linux-gnu/libgazebo_sensors.so.11
#6  0x00007ffff72d59a9 in gazebo::sensors::Sensor::Update(bool) ()
    at /lib/x86_64-linux-gnu/libgazebo_sensors.so.11
#7  0x00007ffff72e0f35 in gazebo::sensors::SensorManager::SensorContainer::Update(bool) () at /lib/x86_64-linux-gnu/libgazebo_sensors.so.11
#8  0x00007ffff72e0797 in gazebo::sensors::SensorManager::SensorContainer::RunLoop() () at /lib/x86_64-linux-gnu/libgazebo_sensors.so.11
#9  0x00007ffff59b543b in  ()
    at /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0
#10 0x00007ffff6f28609 in start_thread (arg=<optimized out>)
    at pthread_create.c:477
#11 0x00007ffff7464353 in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
@w3ichen w3ichen added the bug Something isn't working label Jun 8, 2024
@w3ichen
Copy link
Author

w3ichen commented Jun 8, 2024

I fixed this by building from source inside my UTM virtual machine, instead of using the binary from apt-get install.

  1. I built from source according to these instructions on the ign-math6 branch.
  2. Then replaced the .so file in /lib sudo cp at lib/x86_64-linux-gnu/libignition-math6.so.6 /lib/x86_64-linux-gnu/libignition-math6.so.6

@w3ichen w3ichen closed this as completed Jun 8, 2024
@github-project-automation github-project-automation bot moved this from Inbox to Done in Core development Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant