Dear Mark,
Mark Wielaard wrote on 03.08.2015 21:47:
> On Mon, Aug 03, 2015 at 08:31:12PM +0200, Kai Wasserbäch wrote:
>> Steps to reproduce:
> 
> This is going to be a bit hard for me to reproduce since I don't
> actually use Debian for development (sorry). I do work on upstream
> elfutils though.
> 
>> - you need a AMD GPU powered by the radeonsi driver
> 
> I don't have one of those.

If you want to see anything beyond what's in the backtrace and register dump
(<https://bugs.freedesktop.org/attachment.cgi?id=117480>), let me know, I can
run these tests as often as needed. I might just have to switch between good and
bad versions.

>> - build Mesa with the radeonsi driver (it uses LLVM as a backend to generate
>> machine instructions, the compiled result is returned as an ELF, hence the
>> dependency on libelf) linked against a current libelf1 (or take my build,
>> if you wish)
> 
> A build would be helpful I think.

Ok, her you go:
<http://dev.carbon-project.org/debian/bts/794488/bts794488_mesa.tar.xz>
(password for access sent to you in private; this is just there to limit
traffic, feel free to share these files wherever you want)

A few notes on that file:
- the bad folder contains a Mesa build, which crashes/is linked against libelf1
- the good folder contains a Mesa build, which runs the test fine/is linked
against libelfg0
- each folder contains a full set of all binary packages for amd64/x86_64 and
the source package, which was used to generate them.
- I didn't include the i386 build
- radeonsi_dri.so is in libgl1-mesa-dri
- both packages were linked against libLLVM-3.8.so.1 from
<http://llvm.org/apt/unstable/pool/main/l/llvm-toolchain-snapshot/libllvm3.8_3.8~svn243678-1~exp1_amd64.deb>
(this link might go dead, when a new version is built, but I have a local copy I
can send you).

> Could you point me to the source code that does the libelf calls to create
> the ELF file? Maybe reading the source helps to figure out what might go
> wrong. The stacktrace from the test doesn't immediately seem to give a
> direct clue.

I think all the ELF stuff is encapsulated in
<http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/radeon_elf_util.c>
(and the header for that). The functions defined therein are called from
<http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeonsi/si_shader.c>
and
<http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeonsi/si_compute.c>
if I haven't missed something. Michel can probably spot any mistakes in this,
therefore I CCed him on this message.

Let me know, if you need something else.

Cheers,
Kai

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to