Ubsan invalid vptr errors in TBB #99385

Open
opened 2022-07-04 11:19:59 +02:00 by Martijn Versteegh · 20 comments

System Information
Operating system: Linux-5.4.0-121-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.129.06

Blender Version
Broken: version: 3.2.0, branch: Unknown, commit date: Unknown Unknown, hash: rBUnknown *3.3 aplha still broken as of today
Worked:

Short description of error
When loading a .blend file with a node group containing a RayCast node in a developer-debug build the following error message is shown in the console :

/home/martijn/progs/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task.h:870:9: runtime error: member call on address 0x613000160740 which does not point to an object of type 'task'
0x6130001706c0: note: object has invalid vptr
 00 00 00 00  be be be be be be be be  be be be be be be be be  be be be be be be be be  be be be be
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr

Exact steps for others to reproduce the error

  • Compile blender with 'developer debug' options.
  • Open the attached blend file.
  • Look in the console.

test.blend

**System Information** Operating system: Linux-5.4.0-121-generic-x86_64-with-glibc2.31 64 Bits Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.129.06 **Blender Version** Broken: version: 3.2.0, branch: Unknown, commit date: Unknown Unknown, hash: `rBUnknown` *3.3 aplha still broken as of today Worked: **Short description of error** When loading a .blend file with a node group containing a RayCast node in a developer-debug build the following error message is shown in the console : ``` /home/martijn/progs/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task.h:870:9: runtime error: member call on address 0x613000160740 which does not point to an object of type 'task' 0x6130001706c0: note: object has invalid vptr 00 00 00 00 be be be be be be be be be be be be be be be be be be be be be be be be be be be be ^~~~~~~~~~~~~~~~~~~~~~~ invalid vptr ``` **Exact steps for others to reproduce the error** - Compile blender with 'developer debug' options. - Open the attached blend file. - Look in the console. [test.blend](https://archive.blender.org/developer/F13257147/test.blend)
Author
Member

Added subscriber: @Baardaap

Added subscriber: @Baardaap
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Think I've seen that before and we classified that as a bug in tbb, couldn't find the task where we talked about this before unfortunately.

Think I've seen that before and we classified that as a bug in tbb, couldn't find the task where we talked about this before unfortunately.

Added subscriber: @iss

Added subscriber: @iss

Can't reproduce here (Windows build). Also can't find duplicate task.

Can't reproduce here (Windows build). Also can't find duplicate task.
Author
Member

I'll see if I can test on another linux with another TBB version...

I'll see if I can test on another linux with another TBB version...
Author
Member

This comment was removed by @Baardaap

*This comment was removed by @Baardaap*

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Tested with Windows + ASAN. No error message.

Must be something seen only on Linux.

Tested with Windows + ASAN. No error message. Must be something seen only on Linux.
Member

Added subscribers: @ideasman42, @LazyDodo

Added subscribers: @ideasman42, @LazyDodo
Member

The error shown is a ubsan one not asan (so you'll never see it with MSVC), I was convinced we do not take issues like that on the tracker as they are usually just "noise", nice to have more correct code, but wasteful on resources, as there's about a 1000 actual bugs to look at, but @ideasman42 recently gave the OK for #99382 so my knowledge about that is likely outdated.

The error shown is a ubsan one not asan (so you'll never see it with MSVC), I was convinced we do not take issues like that on the tracker as they are usually just "noise", nice to have more correct code, but wasteful on resources, as there's about a 1000 actual bugs to look at, but @ideasman42 recently gave the OK for #99382 so my knowledge about that is likely outdated.
Author
Member

I don't really care either way. It looked scary, like TBB complained of getting random pointers to execute as function pointers. But if it's just something on my system, or just a false positive from somewhere it's fine with me to close this and move on.

The only disadvantage is that someone else will probably report it sooner or later. Because if you don't really know what the error/warning means (like me) it looks mighty scary.

edit: I saw I didn't paste in the complete error message. Oops. Added it in case it changes anything (probably not).

I don't really care either way. It looked scary, like TBB complained of getting random pointers to execute as function pointers. But if it's just something on my system, or just a false positive from somewhere it's fine with me to close this and move on. The only disadvantage is that someone else will probably report it sooner or later. Because if you don't really know what the error/warning means (like me) it looks mighty scary. edit: I saw I didn't paste in the complete error message. Oops. Added it in case it changes anything (probably not).
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

make debug developer gives me this in current master (ab3e9c47d8):

/linux_centos7_x86_64/usd/lib/libusd_usd_m.a(mallocHook.cpp.o):mallocHook.cpp:function usdBlender__pxrReserved__::ArchMallocHook::Initialize(void* (*)(unsigned long, void const*), void* (*)(void*, unsigned long, void const*), void* (*)(unsigned long, unsigned long, void const*), void (*)(void*, void const*), std::string*): error: undefined reference to '__malloc_hook'
collect2: error: ld returned 1 exit status
make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:564: bin/blender] Error 1
make[2]: *** [CMakeFiles/Makefile2:9566: source/creator/CMakeFiles/blender.dir/all] Error 2
`make debug developer` gives me this in current master (ab3e9c47d8): ``` /linux_centos7_x86_64/usd/lib/libusd_usd_m.a(mallocHook.cpp.o):mallocHook.cpp:function usdBlender__pxrReserved__::ArchMallocHook::Initialize(void* (*)(unsigned long, void const*), void* (*)(void*, unsigned long, void const*), void* (*)(unsigned long, unsigned long, void const*), void (*)(void*, void const*), std::string*): error: undefined reference to '__malloc_hook' collect2: error: ld returned 1 exit status make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:564: bin/blender] Error 1 make[2]: *** [CMakeFiles/Makefile2:9566: source/creator/CMakeFiles/blender.dir/all] Error 2 ```

Added subscriber: @brecht

Added subscriber: @brecht
@lichtwerk, possibly related to this, though not sure why it would happen only with asan: https://devtalk.blender.org/t/building-blender-on-linux-using-glibc-2-34-raises-linking-errors-from-the-usd-library/24185
Brecht Van Lommel changed title from Raycast Node causes TBB error message in 'developer debug' build. to Ubsan invalid vptr errors in TBB 2022-08-19 14:43:11 +02:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

@brecht it's the "debug" that triggers this rather than the asan, USD 22.08 has a fix, but the IO team chose to stay on 22.03 so best way to sidestep this for now is to build WITH_USD off in debug builds with new glibc

@brecht it's the "debug" that triggers this rather than the asan, USD 22.08 has a fix, but the IO team chose to stay on 22.03 so best way to sidestep this for now is to build `WITH_USD` off in debug builds with new glibc

I think it's generally fine to keep track of these as todo issues, just not as bugs.

I think it's generally fine to keep track of these as todo issues, just not as bugs.

In #99385#1406106, @LazyDodo wrote:
@brecht it's the "debug" that triggers this rather than the asan, USD 22.08 has a fix, but the IO team chose to stay on 22.03 so best way to sidestep this for now is to build WITH_USD off in debug builds with new glibc

Ok, if it's a serious problem for developers they could look into adding the symbols to libc_compat (also in LTS branches).

> In #99385#1406106, @LazyDodo wrote: > @brecht it's the "debug" that triggers this rather than the asan, USD 22.08 has a fix, but the IO team chose to stay on 22.03 so best way to sidestep this for now is to build `WITH_USD` off in debug builds with new glibc Ok, if it's a serious problem for developers they could look into adding the symbols to libc_compat (also in LTS branches).
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#99385
No description provided.