-
Notifications
You must be signed in to change notification settings - Fork 0
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
maliput_viewer2.sh crash with OGRE EXCEPTION: Vertex Buffer: Out of memory in GLHardwareVertexBuffer::lock #405
Comments
I couldn't reproduce it yet. I will dig deeper. |
Thanks for the update. |
Are you referring to the text in the buttons on the right side of the screenshot? I so, I agree that is an issue. |
Just encountered this when loading
After specifying Figure8.xodr, the screen at first froze: Then, after a while, the map appeared. However, once I try to interact by rotating the view, it crashed:
|
I confirm I can reproduce the bug. |
This error points to that simply the video card runs out of memory. (VRAM). I can take a look at how we are rendering things in the scene and try to identify if there is a more proper way to do this. (Probably checking how ignition performs this). Is there a chance that you @scpeters have seen this kind of issue before? |
I haven't seen this before |
For reference, here are the specs of the video card I am using:
Looks like it has 2GB of RAM. |
In my case: $ nvidia-smi
Thu May 27 16:33:37 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130 Driver Version: 384.130 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1060 Off | 00000000:01:00.0 Off | N/A |
| N/A 63C P3 19W / N/A | 1550MiB / 6072MiB | 8% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1305 G /usr/lib/xorg/Xorg 836MiB |
| 0 2608 G compiz 169MiB |
| 0 2940 G ...-token=50F682ABB3395D5372029391B31E4C00 101MiB |
| 0 20782 G ...-token=D422EDBD02F49F043FC6084E69295963 80MiB |
| 0 29007 G ...AAgAAAAAAAAACAAAAAAAAAA= --shared-files 359MiB |
+-----------------------------------------------------------------------------+ |
I ran into this bug trying to analyze straight_forward.xodr, which can be downloaded via the link below. To reproduce, open the viewer by executing the command below, then loading straight_forward.xodr:
The following viewer shows up: Left-click on a lane. The viewer will immediately crash with the following error:
It is 100% reproducible. The machine has relatively beefy NVIDIA GPUs:
|
The above error also happens if I use Malidrive 1.0:
I can middle-click and drag to rotate the visualization, and scroll the mouse to zoom in/out. It only crashes when I left-click on a lane. |
I confirm it also happens with maliput_multilane. |
Checking this issue I noticed what I logged here: #407 (comment) I suspect there is a misconfiguration of the nvidia drivers. Google search on Ogre exceptions as this one points in that direction as well. |
I tried the
|
I did try it this morning and got the same result as you. |
This post indicates that |
I did check the ogre log (see inside the docker container at |
I found an error in the NVidia dockerfile: https://github.com/ToyotaResearchInstitute/maliput_infrastructure/pull/210/files#diff-2cbc4ed79e6f64d9c41f1a01b9600e73c3fc34f9b735bdd4826703ade62e17acL48-L49 and https://github.com/ToyotaResearchInstitute/maliput_infrastructure/blob/main/docker/Dockerfile.nvidia#L20 . I will send a PR to fix but it did not fix the bug here. |
Thanks, I also checked my |
Updated title of ticket to reflect the fact that it happens using multiple backends. |
I have built a workspace with ign libraries from sources and I have downgraded ign-gui3 from 3.5.1 to 3.5.0. Same result. Running in bionic. |
BTW, it's important to point out that the error happens when running the RayTracing. I can move the view around, zoom in and out but when I click on the mesh it fails. |
I have also checked ign-rendering 3.4.0 without any luck. Note that ign-rendering 3.5.0 was released in |
The non-nvidia docker image does not work out of the box. ign-gui / rendering fails with glx errors. Next step: try ign samples to verify the same behavior. |
I checked it and it is working just fine with default libraries from debian packages. Will start removing stuff from the maliput_viewer to identify what is causing the error because there is no need now to think there is something else. |
I would try disabling from the code the part where we do raytracing to get the lane selected. To see if it is related to that. |
I ran with gdb the application and found the following: Thread 1 "visualizer" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff5c9d921 in __GI_abort () at abort.c:79
#2 0x00007ffff62f2957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff62f8ae6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff62f8b21 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff62f8d54 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007fffbe51aaca in Ogre::GLHardwareVertexBuffer::lockImpl(unsigned long, unsigned long, Ogre::HardwareBuffer::LockOptions) ()
from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so
#7 0x00007fffbe516236 in ?? () from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so
#8 0x00007fffccfd9cb2 in ignition::rendering::v3::OgreRayQuery::MeshInformation(Ogre::Mesh const*, unsigned long&, Ogre::Vector3*&, unsigned long&, unsigned long*&,
ignition::math::v6::Vector3<double> const&, ignition::math::v6::Quaternion<double> const&, ignition::math::v6::Vector3<double> const&) () from /usr/lib/x86_64-linux-gnu/ign-rendering-3/engine-plugins/libignition-rendering-ogre.so
#9 0x00007fffccfda979 in ignition::rendering::v3::OgreRayQuery::ClosestPoint() ()
from /usr/lib/x86_64-linux-gnu/ign-rendering-3/engine-plugins/libignition-rendering-ogre.so
#10 0x00007fffbc0b9174 in delphyne::gui::MaliputViewerPlugin::ScreenToScene (this=this@entry=0x5555564329d0, _screenX=468,
_screenY=<optimized out>)
at /home/agalbachicar/maliput_ws/src/delphyne_gui/delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc:723
#11 0x00007fffbc0c205a in delphyne::gui::MaliputViewerPlugin::MouseClickHandler (this=0x5555564329d0,
_mouseEvent=_mouseEvent@entry=0x7fffffffc600)
at /home/agalbachicar/maliput_ws/src/delphyne_gui/delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc:591
#12 0x00007fffbc0c3c22 in delphyne::gui::MaliputViewerPlugin::eventFilter (this=0x5555564329d0, _obj=0x555556422d60,
_event=0x7fffffffc600)
at /home/agalbachicar/maliput_ws/src/delphyne_gui/delphyne_gui/visualizer/maliput_viewer_plugin/maliput_viewer_plugin.cc:571
#13 0x00007ffff6ae15bc in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff6ae16af in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff6ae176a in QCoreApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff6ae18d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff47c48e0 in QQuickWindow::sendEvent(QQuickItem*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#18 0x00007ffff47c7f71 in QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem*, QQuickPointerEvent*, QSet<QQuickItem*>*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#19 0x00007ffff47c897a in QQuickWindowPrivate::deliverPressEvent(QQuickPointerEvent*, QSet<QQuickItem*>*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#20 0x00007ffff47c8d39 in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#21 0x00007ffff47c95d5 in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) () When inspecting how things are done between I'll investigate how easy is to execute a task in an OpenGL context through ignition without breaking the rendering pipeline that is already available in ign-gui Scene3D plugin. @scpeters I think you might be interested in passing this information down to ignition gui and rendering folks. |
I think this is related to #393; I guess I forgot to come back to this |
I think we should cache the mouse event data and wait for the |
Yes, yesterday we discussed this with @agalbachicar and we believe it is related to it. He will install by source and try these new changes in |
I had previously looked at the code that was merged, and there is one bit of functionality that is missing. The *ClickToScene events provide a We currently use the knowledge of whether something was clicked or not, and deselect if nothing was clicked, so I think that extra data field is important. |
Good point. This is what is returned when the cast doesn't intersects an object: // Set point to be 10m away if no intersection found
return this->dataPtr->rayQuery->Origin() +
this->dataPtr->rayQuery->Direction() * 10; I wonder if we could use that info to know if a lane was hit or not. |
we call GetLaneFromWorldPosition using the |
FYI, RoadGeometry::ToRoadPosition() already has that logic (minimize h) as one of the decision rules. |
the ign-gui 3.6.0 release is imminent gazebosim/gz-gui#233 |
I've started testing this approach with ign-gui3 3.6.0 debs in eb947ea. I'm currently running into a bunch of seg-faults related to the MouseHover action, which I think is a bug in ign-gui3 (gazebosim/gz-gui#209 (comment)) |
I sent #433 which solves the problem here but exposes the problem in ign-gui that @scpeters commented in #405 (comment) |
I just got a new laptop with nvidia gpu and it is interesting that I wasn't able to reproduce the error:
|
Resuming the work on this issue. The error is still reproducible in bionic with an updated graphic card driver for me: +-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.91.03 Driver Version: 460.91.03 CUDA Version: N/A |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 1060 Off | 00000000:01:00.0 Off | N/A |
| N/A 58C P5 10W / N/A | 412MiB / 6078MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
|
@francocipollone confirmed this error is not reproducible in focal. I'm closing this ticket in favor of using all delphyne repos in focal and deprecating its use in bionic. |
Steps to reproduce:
./install/delphyne_gui/bin/maliput_viewer2.sh --malidrive_backend=malidrive2
Application should immediately crash with:
This is on a Lenovo T460p laptop running Ubuntu 18.04 with a GeForce 940MX GPU.
The text was updated successfully, but these errors were encountered: