From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102432] [regression] Steam fails to start with libdrm 2.4.83 Date: Sun, 27 Aug 2017 15:42:06 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1552721874==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id A94F66E21F for ; Sun, 27 Aug 2017 15:42:06 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1552721874== Content-Type: multipart/alternative; boundary="15038485260.cf4F9.23947"; charset="UTF-8" --15038485260.cf4F9.23947 Date: Sun, 27 Aug 2017 15:42:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102432 Bug ID: 102432 Summary: [regression] Steam fails to start with libdrm 2.4.83 Product: DRI Version: XOrg git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: libdrm Assignee: dri-devel@lists.freedesktop.org Reporter: gr.muench@gmail.com After update, nothing happens, console log: *** Error in `/home/greg/.local/share/Steam/ubuntu12_32/steam': realloc(): invalid next size: 0x585f5050 *** ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt". libdrm 2.4.82 fixes this. Radeon HD 7970 with enabled amdgpu instead of radeon. --=20 You are receiving this mail because: You are the assignee for the bug.= --15038485260.cf4F9.23947 Date: Sun, 27 Aug 2017 15:42:06 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 102432
Summary [regression] Steam fails to start with libdrm 2.4.83
Product DRI
Version XOrg git
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component libdrm
Assignee dri-devel@lists.freedesktop.org
Reporter gr.muench@gmail.com

After update, nothing happens, console log:

*** Error in `/home/greg/.local/share/Steam/ubuntu12_32/steam': realloc():
invalid next size: 0x585f5050 ***
ILocalize::AddFile() failed to load file
"public/steambootstrapper_english.txt".

libdrm 2.4.82 fixes this.

Radeon HD 7970 with enabled amdgpu instead of radeon.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15038485260.cf4F9.23947-- --===============1552721874== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1552721874==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102432] [regression] Steam fails to start with libdrm 2.4.83 Date: Sun, 27 Aug 2017 17:04:21 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2146379180==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 708E96E22C for ; Sun, 27 Aug 2017 17:04:21 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============2146379180== Content-Type: multipart/alternative; boundary="15038534610.ACe1FCE.9409"; charset="UTF-8" --15038534610.ACe1FCE.9409 Date: Sun, 27 Aug 2017 17:04:21 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102432 Gregor M=C3=BCnch changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #1 from Gregor M=C3=BCnch --- Forget everything, solution: Ok, the problem is that nobody updated lib32-libdrm in arch. Its still at 2.4.81 so way to old. I installed now the git versions of both packages wit= ch brings them effectively to 2.4.83 r0 and the problem went away. In the meantime, I even tried to bisect: 0167e6836e91947418fec36c3b4b396760d0f345 is the first bad commit commit 0167e6836e91947418fec36c3b4b396760d0f345 Author: Jan Vesely Date: Fri Jul 28 01:46:45 2017 -0400 amdgpu: Add FX-9800P Bristol Ridge iGPU id Signed-off-by: Jan Vesely Reviewed-by: Michel D=C3=A4nzer :040000 040000 8b07e8bdce21260ecccb07f424348b838a787472 2c65bba8b27ddf5329fa9f1e3501f33225ca909a M data confirmed by reverting, though its pointless. --=20 You are receiving this mail because: You are the assignee for the bug.= --15038534610.ACe1FCE.9409 Date: Sun, 27 Aug 2017 17:04:21 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated Gregor M=C3=BCnch changed bug 10243= 2
What Removed Added
Resolution --- INVALID
Status NEW RESOLVED

Commen= t # 1 on bug 10243= 2 from Gregor M=C3=BCnch
Forget everything, solution:

Ok, the problem is that nobody updated lib32-libdrm in arch. Its still at
2.4.81 so way to old. I installed now the git versions of both packages wit=
ch
brings them effectively to 2.4.83 r0 and the problem went away.

In the meantime, I even tried to bisect:

0167e6836e91947418fec36c3b4b396760d0f345 is the first bad commit
commit 0167e6836e91947418fec36c3b4b396760d0f345
Author: Jan Vesely <jan.ve=
sely@rutgers.edu>
Date:   Fri Jul 28 01:46:45 2017 -0400

    amdgpu: Add FX-9800P Bristol Ridge iGPU id

    Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
    Reviewed-by: Michel D=C3=A4nzer <michel.daenzer@amd.com>

:040000 040000 8b07e8bdce21260ecccb07f424348b838a787472
2c65bba8b27ddf5329fa9f1e3501f33225ca909a M      data

confirmed by reverting, though its pointless.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15038534610.ACe1FCE.9409-- --===============2146379180== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============2146379180==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102432] [regression] Steam fails to start with libdrm 2.4.83 Date: Thu, 31 Aug 2017 17:05:42 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1250869818==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D13389817 for ; Thu, 31 Aug 2017 17:05:42 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1250869818== Content-Type: multipart/alternative; boundary="15041991420.EeF2C.7321"; charset="UTF-8" --15041991420.EeF2C.7321 Date: Thu, 31 Aug 2017 17:05:42 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102432 --- Comment #2 from Jan Vesely --- (In reply to Gregor M=C3=BCnch from comment #1) > Forget everything, solution: >=20 > Ok, the problem is that nobody updated lib32-libdrm in arch. Its still at > 2.4.81 so way to old. I installed now the git versions of both packages > witch brings them effectively to 2.4.83 r0 and the problem went away. >=20 > In the meantime, I even tried to bisect: >=20 > 0167e6836e91947418fec36c3b4b396760d0f345 is the first bad commit > commit 0167e6836e91947418fec36c3b4b396760d0f345 > Author: Jan Vesely > Date: Fri Jul 28 01:46:45 2017 -0400 >=20 > amdgpu: Add FX-9800P Bristol Ridge iGPU id >=20=20=20=20=20 > Signed-off-by: Jan Vesely > Reviewed-by: Michel D=C3=A4nzer >=20 > :040000 040000 8b07e8bdce21260ecccb07f424348b838a787472 > 2c65bba8b27ddf5329fa9f1e3501f33225ca909a M data >=20 > confirmed by reverting, though its pointless. the list of ids needs to be sinced across 32/64 bit versions. The parsing mechanism is flimsy and adding an entry to /usr/share/libdrm/amdgpu.ids crashes libdrm --=20 You are receiving this mail because: You are the assignee for the bug.= --15041991420.EeF2C.7321 Date: Thu, 31 Aug 2017 17:05:42 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 2 on bug 10243= 2 from Jan Vesely
(In reply to Gregor M=C3=BCnch from comment #1)
> Forget everything, solution:
>=20
> Ok, the problem is that nobody updated lib32-libdrm in arch. Its still=
 at
> 2.4.81 so way to old. I installed now the git versions of both packages
> witch brings them effectively to 2.4.83 r0 and the problem went away.
>=20
> In the meantime, I even tried to bisect:
>=20
> 0167e6836e91947418fec36c3b4b396760d0f345 is the first bad commit
> commit 0167e6836e91947418fec36c3b4b396760d0f345
> Author: Jan Vesely <j=
an.vesely@rutgers.edu>
> Date:   Fri Jul 28 01:46:45 2017 -0400
>=20
>     amdgpu: Add FX-9800P Bristol Ridge iGPU id
>=20=20=20=20=20
>     Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
>     Reviewed-by: Michel D=C3=A4nzer <michel.daenzer@amd.com>
>=20
> :040000 040000 8b07e8bdce21260ecccb07f424348b838a787472
> 2c65bba8b27ddf5329fa9f1e3501f33225ca909a M	data
>=20
> confirmed by reverting, though its pointless.

the list of ids needs to be sinced across 32/64 bit versions.
The parsing mechanism is flimsy and adding an entry to
/usr/share/libdrm/amdgpu.ids crashes libdrm


You are receiving this mail because:
  • You are the assignee for the bug.
= --15041991420.EeF2C.7321-- --===============1250869818== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1250869818==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102432] [regression] Steam fails to start with libdrm 2.4.83 Date: Fri, 01 Sep 2017 01:08:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1047783638==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A8E86E7AC for ; Fri, 1 Sep 2017 01:08:41 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1047783638== Content-Type: multipart/alternative; boundary="15042281211.6CDdE12.5300"; charset="UTF-8" --15042281211.6CDdE12.5300 Date: Fri, 1 Sep 2017 01:08:41 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102432 --- Comment #3 from Michel D=C3=A4nzer --- (In reply to Jan Vesely from comment #2) > The parsing mechanism is flimsy and adding an entry to > /usr/share/libdrm/amdgpu.ids crashes libdrm Can you share more details about how adding en entry to /usr/share/libdrm/amdgpu.ids causes a crash? --=20 You are receiving this mail because: You are the assignee for the bug.= --15042281211.6CDdE12.5300 Date: Fri, 1 Sep 2017 01:08:41 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 3 on bug 10243= 2 from Michel D=C3=A4nzer
(In reply to Jan Vesely from comment #2)
> The parsing mechanism is flimsy and adding an en=
try to
> /usr/share/libdrm/amdgpu.ids crashes libdrm

Can you share more details about how adding en entry to
/usr/share/libdrm/amdgpu.ids causes a crash?


You are receiving this mail because:
  • You are the assignee for the bug.
= --15042281211.6CDdE12.5300-- --===============1047783638== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1047783638==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102432] [regression] Steam fails to start with libdrm 2.4.83 Date: Fri, 01 Sep 2017 18:44:01 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1030215558==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7ECC16E8B0 for ; Fri, 1 Sep 2017 18:44:01 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1030215558== Content-Type: multipart/alternative; boundary="15042914411.79168ab.4604"; charset="UTF-8" --15042914411.79168ab.4604 Date: Fri, 1 Sep 2017 18:44:01 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102432 --- Comment #4 from Jan Vesely --- (In reply to Michel D=C3=A4nzer from comment #3) > (In reply to Jan Vesely from comment #2) > > The parsing mechanism is flimsy and adding an entry to > > /usr/share/libdrm/amdgpu.ids crashes libdrm >=20 > Can you share more details about how adding en entry to > /usr/share/libdrm/amdgpu.ids causes a crash? using libdrm-2.4.82-1.fc26.x86_64 (there have been no other changes in amdgpu_asic_id.c in later releases) sudo vim /usr/share/libdrm/amdgpu.ids add a line like the one in the above mentioned commit glxinfo -> crash clinfo -> crash glxgears -> crash looking at the code adding one entry means that table_size =3D=3D table_max= _size + 1. therefore all initially callocated (line 132) memory is used. memset(line 191) then writes beyond the allocated memory and corrupts libc internal structures. the following realloc(line 194) then crashes. see below for both valgrind trace showing the invalid write, and gdb trace showing the crash. moving the memset(line 191) after the last realloc block should be enough to fix the problem. I have verified that adding 2 entries to /usr/share/libdrm/amdgpu.ids is a workaround, realloc on line 159 triggers and prevents illegal write from memset(line 191). clinfo backtrace from gdb (the machine is accessed remotely, but the crashes happen even if used locally): Program received signal SIGABRT, Aborted. 0x00007ffff761769b in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff761769b in raise () from /lib64/libc.so.6 #1 0x00007ffff76194a0 in abort () from /lib64/libc.so.6 #2 0x00007ffff765d8e1 in __libc_message () from /lib64/libc.so.6 #3 0x00007ffff766bd19 in _int_realloc () from /lib64/libc.so.6 #4 0x00007ffff766e7eb in realloc () from /lib64/libc.so.6 #5 0x00007fffedcd120c in amdgpu_parse_asic_ids (p_asic_id_table=3Dp_asic_id_table@entry=3D0x5555557c9ff8) at amdgpu_asic_i= d.c:194 #6 0x00007fffedcd386c in amdgpu_device_initialize (fd=3Dfd@entry=3D4, major_version=3Dmajor_version@entry=3D0x7fffffffd5c4, minor_version=3Dminor_version@entry=3D0x7fffffffd5c8,=20 device_handle=3Ddevice_handle@entry=3D0x7fffffffd5e0) at amdgpu_device.= c:276 #7 0x00007fffee1b3adf in amdgpu_winsys_create (fd=3Dfd@entry=3D4, screen_create=3D0x7fffee2054d0 ) at amdgpu_winsys.c= :562 #8 0x00007fffee101d8f in create_screen (fd=3D4) at pipe_radeonsi.c:14 #9 0x00007ffff7296348 in clover::device::device(clover::platform&, pipe_loader_device*) () from /lib64/libMesaOpenCL.so.1 #10 0x00007ffff72bb68b in clover::intrusive_ref clover::create(clover::platform&, pipe_loader_device*&) () from /lib64/libMesaOpenCL.so.1 #11 0x00007ffff72bb2d9 in clover::platform::platform() () from /lib64/libMesaOpenCL.so.1 #12 0x00007ffff7265248 in __static_initialization_and_destruction_0 () from /lib64/libMesaOpenCL.so.1 #13 0x00007ffff7265278 in _GLOBAL__sub_I_platform.cpp () from /lib64/libMesaOpenCL.so.1 #14 0x00007ffff7de6d73 in _dl_init () from /lib64/ld-linux-x86-64.so.2 #15 0x00007ffff7debcca in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 #16 0x00007ffff7732a2f in _dl_catch_error () from /lib64/libc.so.6 #17 0x00007ffff7deb1d9 in _dl_open () from /lib64/ld-linux-x86-64.so.2 #18 0x00007ffff79b2f26 in dlopen_doit () from /lib64/libdl.so.2 #19 0x00007ffff7732a2f in _dl_catch_error () from /lib64/libc.so.6 #20 0x00007ffff79b36a5 in _dlerror_run () from /lib64/libdl.so.2 #21 0x00007ffff79b2fb1 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2 #22 0x00007ffff7bbb982 in _load_icd (lib_path=3D0x5555557734d0 "libMesaOpenCL.so.1", num_icds=3D0) at ocl_icd_loader.c:184 #23 _open_driver (file_path=3D, dir_path=3D, num_icds=3D0) at ocl_icd_loader.c:237 #24 _open_drivers (dir_path=3D, dir=3D) at ocl_icd_loader.c:250 #25 __initClIcd () at ocl_icd_loader.c:646 #26 _initClIcd_real () at ocl_icd_loader.c:702 #27 0x00007ffff7bbd994 in _initClIcd () at ocl_icd_loader.c:724 #28 clGetPlatformIDs (num_entries=3D0, platforms=3D0x0, num_platforms=3D0x55555576a798 ) at ocl_icd_loader.c:846 #29 0x00005555555596c2 in main (argc=3D1, argv=3D0x7fffffffe108) at src/clinfo.c:2723 running in valgrind prevents the crash but it complains about invalid write= in that function: =3D=3D3701=3D=3D Command: clinfo =3D=3D3701=3D=3D=20 =3D=3D3701=3D=3D Invalid write of size 8 =3D=3D3701=3D=3D at 0xF13A1DE: UnknownInlinedFun (string3.h:90) =3D=3D3701=3D=3D by 0xF13A1DE: amdgpu_parse_asic_ids (amdgpu_asic_id.c:1= 91) =3D=3D3701=3D=3D by 0xF13C86B: amdgpu_device_initialize (amdgpu_device.c= :276) =3D=3D3701=3D=3D by 0xEBF6ADE: amdgpu_winsys_create (amdgpu_winsys.c:562) =3D=3D3701=3D=3D by 0xEB44D8E: create_screen (pipe_radeonsi.c:14) =3D=3D3701=3D=3D by 0x5AAD347: clover::device::device(clover::platform&, pipe_loader_device*) (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5AD268A: clover::intrusive_ref clover::create(clover::platform&, pipe_loader_device*&) (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5AD22D8: clover::platform::platform() (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5A7C247: __static_initialization_and_destruction_0= (int, int) (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5A7C277: _GLOBAL__sub_I_platform.cpp (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x4010D72: _dl_init (in /usr/lib64/ld-2.25.so) =3D=3D3701=3D=3D by 0x4015CC9: dl_open_worker (in /usr/lib64/ld-2.25.so) =3D=3D3701=3D=3D by 0x53B0A2E: _dl_catch_error (in /usr/lib64/libc-2.25.= so) =3D=3D3701=3D=3D Address 0x57c72b0 is 0 bytes after a block of size 2,464 = alloc'd =3D=3D3701=3D=3D at 0x4C30A1E: calloc (vg_replace_malloc.c:711) =3D=3D3701=3D=3D by 0xF139E92: amdgpu_parse_asic_ids (amdgpu_asic_id.c:1= 32) =3D=3D3701=3D=3D by 0xF13C86B: amdgpu_device_initialize (amdgpu_device.c= :276) =3D=3D3701=3D=3D by 0xEBF6ADE: amdgpu_winsys_create (amdgpu_winsys.c:562) =3D=3D3701=3D=3D by 0xEB44D8E: create_screen (pipe_radeonsi.c:14) =3D=3D3701=3D=3D by 0x5AAD347: clover::device::device(clover::platform&, pipe_loader_device*) (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5AD268A: clover::intrusive_ref clover::create(clover::platform&, pipe_loader_device*&) (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5AD22D8: clover::platform::platform() (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5A7C247: __static_initialization_and_destruction_0= (int, int) (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x5A7C277: _GLOBAL__sub_I_platform.cpp (in /usr/lib64/libMesaOpenCL.so.1.0.0) =3D=3D3701=3D=3D by 0x4010D72: _dl_init (in /usr/lib64/ld-2.25.so) =3D=3D3701=3D=3D by 0x4015CC9: dl_open_worker (in /usr/lib64/ld-2.25.so) --=20 You are receiving this mail because: You are the assignee for the bug.= --15042914411.79168ab.4604 Date: Fri, 1 Sep 2017 18:44:01 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 4 on bug 10243= 2 from Jan Vesely
(In reply to Michel D=C3=A4nzer from comment #3)
> (In reply to Jan Vesely from comment #2)
> > The parsing mechanism is flimsy and adding an entry to
> > /usr/share/libdrm/amdgpu.ids crashes libdrm
>=20
> Can you share more details about how adding en entry to
> /usr/share/libdrm/amdgpu.ids causes a crash?

using libdrm-2.4.82-1.fc26.x86_64 (there have been no other changes in
amdgpu_asic_id.c in later releases)

sudo vim /usr/share/libdrm/amdgpu.ids
add a line like the one in the above mentioned commit

glxinfo -> crash
clinfo -> crash
glxgears -> crash

looking at the code adding one entry means that table_size =3D=3D table_max=
_size +
1. therefore all initially callocated (line 132) memory is used.
memset(line 191) then writes beyond the allocated memory and corrupts libc
internal structures. the following realloc(line 194) then crashes.
see below for both valgrind trace showing the invalid write, and gdb trace
showing the crash.

moving the memset(line 191) after the last realloc block should be enough to
fix the problem.
I have verified that adding 2 entries to /usr/share/libdrm/amdgpu.ids is a
workaround, realloc on line 159 triggers and prevents illegal write from
memset(line 191).


clinfo backtrace from gdb (the machine is accessed remotely, but the crashes
happen even if used locally):
Program received signal SIGABRT, Aborted.
0x00007ffff761769b in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff761769b in raise () from /lib64/libc.so.6
#1  0x00007ffff76194a0 in abort () from /lib64/libc.so.6
#2  0x00007ffff765d8e1 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff766bd19 in _int_realloc () from /lib64/libc.so.6
#4  0x00007ffff766e7eb in realloc () from /lib64/libc.so.6
#5  0x00007fffedcd120c in amdgpu_parse_asic_ids
(p_asic_id_table=3Dp_asic_id_table@entry=3D0x5555557c9ff8) at amdgpu_as=
ic_id.c:194
#6  0x00007fffedcd386c in amdgpu_device_initialize (fd=3Dfd@entry=3D4,
major_version=3Dmajor_version@entry=3D0x7fffffffd5c4,
minor_version=3Dminor_version@entry=3D0x7fffffffd5c8,=20
    device_handle=3Ddevice_handle@entry=3D0x7fffffffd5e0) at amdgpu_dev=
ice.c:276
#7  0x00007fffee1b3adf in amdgpu_winsys_create (fd=3Dfd@entry=3D4,
screen_create=3D0x7fffee2054d0 <radeonsi_screen_create>) at amdgpu_wi=
nsys.c:562
#8  0x00007fffee101d8f in create_screen (fd=3D4) at pipe_radeonsi.c:14
#9  0x00007ffff7296348 in clover::device::device(clover::platform&,
pipe_loader_device*) () from /lib64/libMesaOpenCL.so.1
#10 0x00007ffff72bb68b in clover::intrusive_ref<clover::device>
clover::create<clover::device, clover::platform&,
pipe_loader_device*&>(clover::platform&, pipe_loader_device*&=
;) ()
   from /lib64/libMesaOpenCL.so.1
#11 0x00007ffff72bb2d9 in clover::platform::platform() () from
/lib64/libMesaOpenCL.so.1
#12 0x00007ffff7265248 in __static_initialization_and_destruction_0 () from
/lib64/libMesaOpenCL.so.1
#13 0x00007ffff7265278 in _GLOBAL__sub_I_platform.cpp () from
/lib64/libMesaOpenCL.so.1
#14 0x00007ffff7de6d73 in _dl_init () from /lib64/ld-linux-x86-64.so.2
#15 0x00007ffff7debcca in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#16 0x00007ffff7732a2f in _dl_catch_error () from /lib64/libc.so.6
#17 0x00007ffff7deb1d9 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#18 0x00007ffff79b2f26 in dlopen_doit () from /lib64/libdl.so.2
#19 0x00007ffff7732a2f in _dl_catch_error () from /lib64/libc.so.6
#20 0x00007ffff79b36a5 in _dlerror_run () from /lib64/libdl.so.2
#21 0x00007ffff79b2fb1 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.=
so.2
#22 0x00007ffff7bbb982 in _load_icd (lib_path=3D0x5555557734d0
"libMesaOpenCL.so.1", num_icds=3D0) at ocl_icd_loader.c:184
#23 _open_driver (file_path=3D<optimized out>, dir_path=3D<optimiz=
ed out>,
num_icds=3D0) at ocl_icd_loader.c:237
#24 _open_drivers (dir_path=3D<optimized out>, dir=3D<optimized ou=
t>) at
ocl_icd_loader.c:250
#25 __initClIcd () at ocl_icd_loader.c:646
#26 _initClIcd_real () at ocl_icd_loader.c:702
#27 0x00007ffff7bbd994 in _initClIcd () at ocl_icd_loader.c:724
#28 clGetPlatformIDs (num_entries=3D0, platforms=3D0x0,
num_platforms=3D0x55555576a798 <num_platforms>) at ocl_icd_loader.c:8=
46
#29 0x00005555555596c2 in main (argc=3D1, argv=3D0x7fffffffe108) at
src/clinfo.c:2723

running in valgrind prevents the crash but it complains about invalid write=
 in
that function:
=3D=3D3701=3D=3D Command: clinfo
=3D=3D3701=3D=3D=20
=3D=3D3701=3D=3D Invalid write of size 8
=3D=3D3701=3D=3D    at 0xF13A1DE: UnknownInlinedFun (string3.h:90)
=3D=3D3701=3D=3D    by 0xF13A1DE: amdgpu_parse_asic_ids (amdgpu_asic_id.c:1=
91)
=3D=3D3701=3D=3D    by 0xF13C86B: amdgpu_device_initialize (amdgpu_device.c=
:276)
=3D=3D3701=3D=3D    by 0xEBF6ADE: amdgpu_winsys_create (amdgpu_winsys.c:562)
=3D=3D3701=3D=3D    by 0xEB44D8E: create_screen (pipe_radeonsi.c:14)
=3D=3D3701=3D=3D    by 0x5AAD347: clover::device::device(clover::platform&a=
mp;,
pipe_loader_device*) (in /usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5AD268A: clover::intrusive_ref<clover::device&g=
t;
clover::create<clover::device, clover::platform&,
pipe_loader_device*&>(clover::platform&, pipe_loader_device*&=
;) (in
/usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5AD22D8: clover::platform::platform() (in
/usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5A7C247: __static_initialization_and_destruction_0=
(int, int)
(in /usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5A7C277: _GLOBAL__sub_I_platform.cpp (in
/usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x4010D72: _dl_init (in /usr/lib64/ld-2.25.so)
=3D=3D3701=3D=3D    by 0x4015CC9: dl_open_worker (in /usr/lib64/ld-2.25.so)
=3D=3D3701=3D=3D    by 0x53B0A2E: _dl_catch_error (in /usr/lib64/libc-2.25.=
so)
=3D=3D3701=3D=3D  Address 0x57c72b0 is 0 bytes after a block of size 2,464 =
alloc'd
=3D=3D3701=3D=3D    at 0x4C30A1E: calloc (vg_replace_malloc.c:711)
=3D=3D3701=3D=3D    by 0xF139E92: amdgpu_parse_asic_ids (amdgpu_asic_id.c:1=
32)
=3D=3D3701=3D=3D    by 0xF13C86B: amdgpu_device_initialize (amdgpu_device.c=
:276)
=3D=3D3701=3D=3D    by 0xEBF6ADE: amdgpu_winsys_create (amdgpu_winsys.c:562)
=3D=3D3701=3D=3D    by 0xEB44D8E: create_screen (pipe_radeonsi.c:14)
=3D=3D3701=3D=3D    by 0x5AAD347: clover::device::device(clover::platform&a=
mp;,
pipe_loader_device*) (in /usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5AD268A: clover::intrusive_ref<clover::device&g=
t;
clover::create<clover::device, clover::platform&,
pipe_loader_device*&>(clover::platform&, pipe_loader_device*&=
;) (in
/usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5AD22D8: clover::platform::platform() (in
/usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5A7C247: __static_initialization_and_destruction_0=
(int, int)
(in /usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x5A7C277: _GLOBAL__sub_I_platform.cpp (in
/usr/lib64/libMesaOpenCL.so.1.0.0)
=3D=3D3701=3D=3D    by 0x4010D72: _dl_init (in /usr/lib64/ld-2.25.so)
=3D=3D3701=3D=3D    by 0x4015CC9: dl_open_worker (in /usr/lib64/ld-2.25.so)=


You are receiving this mail because:
  • You are the assignee for the bug.
= --15042914411.79168ab.4604-- --===============1030215558== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1030215558==--