Project

General

Profile

Actions

Bug #18807

closed

/lib/x86_64-linux-gnu/libruby-2.7.so.2.7 issue

Added by Kakcalu13 (Kevin KO) over 2 years ago. Updated over 2 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
[ruby-core:108707]

Description

Seems like this is the right place for this issue. If this is wrong place, please let me know so I can close it promptly

My computer specs:
OS: MacOS Monetery
CPU/GPU: Apple chip (M1)
Docker: Ubuntu 20.04 Focal

I was able to run Ignition Gazebo (programmed from Ruby)

For some reason, I couldn't run Ruby on M1 using docker.

The error log:

Error setting socket option (IP_MULTICAST_IF).
Error setting socket option (IP_MULTICAST_IF).
Did you set the environment variable IGN_IP with a correct IP address? 
  [172.18.0.4] seems an invalid local IP address.
  Using 127.0.0.1 as hostname.
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6886f, in rb_vm_exec
#30   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a62130, in 
#29   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a51405, in 
#28   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6adaa, in 
#27   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a5e025, in 
#26   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x40019bc1be, in 
#25   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x40018fc5d2, in rb_protect
#24   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a759f0, in rb_yield
#23   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6886f, in rb_vm_exec
#22   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a62130, in 
#21   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a51405, in 
#20   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6adaa, in 
#19   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a5e025, in 
#18   Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x40055ca714, in 
#17   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a2f6d9, in rb_nogvl
#16   Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x40055ca8fb, in 
#15   Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x40055ef409, in 
#14   Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x40055efff4, in 
#13   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo3-ign.so.3.12.0", at 0x40060527b3, in runServer
#12   Object "/lib/x86_64-linux-gnu/libignition-gazebo3.so.3", at 0x4006544622, in ignition::gazebo::v3::Server::Server(ignition::gazebo::v3::ServerConfig const&)
#11   Object "/lib/x86_64-linux-gnu/libignition-gazebo3.so.3", at 0x400654cd6a, in 
#10   Object "/lib/x86_64-linux-gnu/libignition-transport8.so.8", at 0x4006964eeb, in ignition::transport::v8::Node::Node(ignition::transport::v8::NodeOptions const&)
#9    Object "/lib/x86_64-linux-gnu/libignition-transport8.so.8", at 0x400694466e, in 
#8    Object "/lib/x86_64-linux-gnu/libignition-transport8.so.8", at 0x400697eaf4, in ignition::transport::v8::NodeShared::NodeShared()
#7    Object "/lib/x86_64-linux-gnu/libignition-transport8.so.8", at 0x400698dff9, in ignition::transport::v8::Discovery<ignition::transport::v8::MessagePublisher>::Discovery(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool)
#6    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40056b93aa, in 
#5    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40056c26a8, in __cxa_throw
#4    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40056c23f6, in std::terminate()
#3    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40056c238b, in 
#2    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40056b6910, in 
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001bc5858, in abort
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001be618b, in gsignal
Aborted (Signal sent by tkill() 1305 0)
qemu: uncaught target signal 6 (Aborted) - core dumped
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x40018fe2ed, in ruby_run_node
#30   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x40018f9490, in 
#29   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6886f, in rb_vm_exec
#28   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a62130, in 
#27   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a51405, in 
#26   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6adaa, in 
#25   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a5e025, in 
#24   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x40019bc1be, in 
#23   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x40018fc5d2, in rb_protect
#22   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a759f0, in rb_yield
#21   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6886f, in rb_vm_exec
#20   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a62130, in 
#19   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a51405, in 
#18   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a6adaa, in 
#17   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a5e025, in 
#16   Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x40055ca714, in 
#15   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x4001a2f6d9, in rb_nogvl
#14   Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x40055ca8fb, in 
#13   Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x40055ef409, in 
#12   Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x40055efff4, in 
#11   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo3-ign.so.3.12.0", at 0x400605218d, in runGui
#10   Object "/lib/x86_64-linux-gnu/libignition-gazebo3-gui.so.3", at 0x40061a4808, in ignition::gazebo::v3::gui::runGui(int&, char**, char const*)
#9    Object "/lib/x86_64-linux-gnu/libignition-gazebo3-gui.so.3", at 0x40061a2ef0, in ignition::gazebo::v3::gui::createGui(int&, char**, char const*, char const*, bool)
#8    Object "/lib/x86_64-linux-gnu/libignition-gui3.so.3", at 0x40076777c7, in ignition::gui::Application::Application(int&, char**, ignition::gui::WindowType)
#7    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x40081a4517, in QGuiApplication::QGuiApplication(int&, char**, int)
#6    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x40081a3542, in QGuiApplicationPrivate::init()
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x4007392f54, in QCoreApplicationPrivate::init()
#4    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x40081a1707, in QGuiApplicationPrivate::createEventDispatcher()
#3    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x40081a07ad, in QGuiApplicationPrivate::createPlatformIntegration()
#2    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x400718baac, in QMessageLogger::fatal(char const*, ...) const
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001bc5858, in abort
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001be618b, in gsignal
Aborted (Signal sent by tkill() 1307 0)
qemu: uncaught target signal 6 (Aborted) - core dumped

I upgraded from 2.7 to 3.1 on docker and it doesn't do anything as it gave the same result.

Here is the small zip folder for you to see the issue quickly.

(zip insert)

This is the docker that lets you load gazebo. I added ENTRYPOINT to show you the same result. This is the VNC.

Steps to see the issue from the shell only:

  1. cd into that folder
  2. docker compose -f bug_reproduce.yml build --no-cache
  3. Wait for it complete which should be like 20 seconds or less
  4. docker compose -f bug_reproduce.yml up
  5. See the output of error.

To log in vnc by go to 127.0.0.1:6080/ on your preferred browser. You can open terminal from the start menu and see what it has. It's using ruby 2.7 by default due to apt install. I upgraded it to 3.1 and it doesn't do anything. Keep that in mind, you need to comment ENTRYPOINT ["/bin/sh", "-c", "ign gazebo -v 4 shapes.sdf"] out in Dockerfile so you can access to VNC. Once you are done with it, re-do the steps above.

Docker compose required Docker Desktop 4.7+ By the way!

Also this is already being discussed in gazebo issue as well on Github. I felt that this might be a little wrong place since it's more focus on Ruby as error mentioned. See here: https://github.com/gazebosim/gz-sim/issues/1362


Files

ruby_issue_docker.zip (925 Bytes) ruby_issue_docker.zip Kakcalu13 (Kevin KO), 05/26/2022 02:38 PM

Updated by xtkoba (Tee KOBAYASHI) over 2 years ago

Note that the stack trace shows most recent call last. I guess Ruby Core is not much relevant here because it only calls runGui in libignition-gazebo3-ign.so.3.12.0 through FFI. If anything, then the parameters for runGui might have been broken by fiddle + libffi but I cannot tell if that is the case here because no parameter info is logged in the stack trace.

Updated by Kakcalu13 (Kevin KO) over 2 years ago

xtkoba (Tee KOBAYASHI) wrote in #note-1:

Note that the stack trace shows most recent call last. I guess Ruby Core is not much relevant here because it only calls runGui in libignition-gazebo3-ign.so.3.12.0 through FFI. If anything, then the parameters for runGui might have been broken by fiddle + libffi but I cannot tell if that is the case here because no parameter info is logged in the stack trace.

Ahh, that makes sense! Thank you! Closing this since this is not Ruby Core relevant!

Updated by Kakcalu13 (Kevin KO) over 2 years ago

Kakcalu13 (Kevin KO) wrote in #note-2:

xtkoba (Tee KOBAYASHI) wrote in #note-1:

Note that the stack trace shows most recent call last. I guess Ruby Core is not much relevant here because it only calls runGui in libignition-gazebo3-ign.so.3.12.0 through FFI. If anything, then the parameters for runGui might have been broken by fiddle + libffi but I cannot tell if that is the case here because no parameter info is logged in the stack trace.

Ahh, that makes sense! Thank you! Closing this since this is not Ruby Core relevant!

Wait, how do you close this issue? lol

Actions #4

Updated by jeremyevans0 (Jeremy Evans) over 2 years ago

  • Status changed from Open to Third Party's Issue
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0