Bug 111001 - Valgrind show a lot of invalid read/write when running Godot Engine
Summary: Valgrind show a lot of invalid read/write when running Godot Engine
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-26 10:21 UTC by Rafał
Modified: 2019-06-26 12:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Valgrind Laptop (619.29 KB, text/plain)
2019-06-26 10:21 UTC, Rafał
Details

Description Rafał 2019-06-26 10:21:57 UTC
Created attachment 144638 [details]
Valgrind Laptop

Hi,
I tried to use valgrind on laptop, but it shows a lot of invalid reads/writes when running Godot(log Valgrind.txt). 
On system with Nvidia(PC Specs below) this error doesn't occurs.

To reproduce bug probably Godot must be compiled from source(howto https://docs.godotengine.org/en/latest/development/compiling/compiling_for_x11.html)

git clone https://github.com/godotengine/godot.git
cd godot
scons p=x11 -j3
bin/godot.x11.tools.64


When I open it
My Laptop Specs:
 Intel HD 3000
 Intel i3 2330m
 Ubuntu 19.04
 Mesa 19.2.0-devel - padoka PPA
My PC Specs:
 Intel i7 4770K
 Nvidia GTX 970, 430.26

Valgrind commmand

valgrind --log-file="/home/rafal/valgrind.txt" --leak-check=full --show-leak-kinds=definite --child-silent-after-fork=yes godot

(--child-silent-after-fork is needed because https://github.com/godotengine/godot/issues/29844#issuecomment-502772087)
Comment 1 Rafał 2019-06-26 10:26:15 UTC
This error probably also doesn't occur on Fedora 27 with RX580 Mesa - 17.2.4 - https://github.com/godotengine/godot/issues/16214#issuecomment-361773504
Comment 2 Rafał 2019-06-26 11:11:31 UTC
Oh, nevermind
I found that this bug is over six year old - https://www.phoronix.com/scan.php?page=news_item&px=MTQzNjk
Comment 3 Jason Ekstrand 2019-06-26 12:47:18 UTC
The real issue here is that we have lots of GPU allocations that don't come in through libc so valgrind doesn't know about them.  Valgrind then complains every time we touch these allocations from the CPU even though it's totally valid.  If you install the valgrind-devel package and build mesa yourself, it should detect valgrind and add hints to the driver to help valgrind out errors will go away.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.