Bug 1139164

Summary: valgrind: shiploads of errors reported for libGL mesa/dri/intel i965
Product: [Fedora] Fedora Reporter: Fabio Valentini <decathorpe>
Component: mesaAssignee: Adam Jackson <ajax>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 21CC: ajax, ignatenko
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-11 11:54:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
valgrind log
none
valgrind log with debuginfo none

Description Fabio Valentini 2014-09-08 09:21:47 UTC
Created attachment 935280 [details]
valgrind log

Description of problem:
I was debugging a simple game I was writing and, as always, ran the thing through valgrind to check for errors on my side. I encountered something more discomforting than that - valgrind reports _thousands_ of invalid memory reads AND writes in functions called by libGL. Then I ran glxgears, which produced the same errors, so my programming is not at fault here.

Most of the reported errors are of the form:

==3289== Invalid write of size 4
==3289==    at 0x9ABC0F4: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A814DF: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A903CD: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A4B2A9: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A7F672: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A80070: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A43A5A: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x9A29C92: ??? (in /usr/lib64/dri/i965_dri.so)
==3289==    by 0x4E84B6F: ??? (in /usr/lib64/libGL.so.1.2.0)
==3289==    by 0x401D57: ??? (in /usr/bin/glxgears)
==3289==    by 0x573C0DF: (below main) (in /usr/lib64/libc-2.19.90.so)
==3289==  Address 0x7f78f7597a6c is not stack'd, malloc'd or (recently) free'd

They seem to happen at initialisation and stop as soon as the window is displayed and the gears are running (see log, line = 6936).

When closing glxgears, another 20000 lines of errors are logged by valgrind. Summary is:

==3289== LEAK SUMMARY:
==3289==    definitely lost: 3,799 bytes in 16 blocks
==3289==    indirectly lost: 1,132 bytes in 6 blocks
==3289==      possibly lost: 22,577,821 bytes in 8,178 blocks
==3289==    still reachable: 263,306 bytes in 260 blocks
==3289==         suppressed: 0 bytes in 0 blocks
==3289== Reachable blocks (those to which a pointer was found) are not shown.
==3289== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==3289== 
==3289== For counts of detected and suppressed errors, rerun with: -v
==3289== ERROR SUMMARY: 10001592 errors from 2112 contexts (suppressed: 0 from 0)

Version-Release number of selected component (if applicable):
mesa-libGL 10.3-0.rc1.20140824
libdrm 2.4.56-2
glx-utils 8.2.0-2.fc21

How reproducible:
run 'valgrind --leak-check=full --track-origins=yes glxgears &> glxgears.log'

Actual results:
10001592 errors

Expected results:
no errors?



I'd like to help debug this problem, if you need any more info.

Comment 1 Fabio Valentini 2014-10-12 10:59:54 UTC
Created attachment 946087 [details]
valgrind log with debuginfo

This still happens after upgrades to mesa, libdrm and linux kernel. Installed debuginfo packages to clear up valgrind output.

Since valgrind tells me to "fix your program" this seems to be a rather severe case of bad programming ...

Comment 2 Fedora End Of Life 2015-11-04 15:03:21 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fabio Valentini 2015-11-11 11:54:34 UTC
This seems to have been fixed in the meantime. Closing now ...