[Mesa-dev] Error: unsupported relocations

Jan Vesely jan.vesely at rutgers.edu
Mon Jun 3 00:58:34 UTC 2019


On Sun, 2019-06-02 at 20:09 -0400, James Harvey wrote:
> I've started a thread on the llvm mailing list.  See
> http://lists.llvm.org/pipermail/llvm-dev/2019-June/132750.html
> 
> I don't know if it's needed, but if anyone has a commit in llvm that
> started this, that might be helpful.

thanks. however most LLVM developers contributing to AMDGPU backend
are AMD folks. The ROCm based stack can handle relocations, so it's up
to a volunteer to step up and post a patch (either for mesa or llvm).
Fewer relocations should mean faster dispatch, so you they should be
interested in taking the LLVM fix.

I've started looking, but the elf structure lists relocations against
a section (STT_SECTION), so I still don't know where to get target
address.

Jan

> 
> On Sat, Jun 1, 2019 at 10:56 PM Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > Hi,
> > 
> > On Sat, 2019-06-01 at 18:21 -0400, James Harvey wrote:
> > > On Sat, Jun 1, 2019 at 6:19 PM James Harvey <jamespharvey20 at gmail.com> wrote:
> > > > On Tue, Feb 19, 2019 at 7:52 PM james harvey <jamespharvey20 at gmail.com> wrote:
> > > > > Commit 9baacf3f is: "radeonsi: Refuse to accept code with unhandled
> > > > > relocations".
> > > > > 
> > > > > This has broken ImageMagick for many people using AMD graphics cards.
> > > > > See https://github.com/ImageMagick/ImageMagick/issues/1366
> > > > > 
> > > > > ImageMagick responded: "It looks like this error message is created by
> > > > > the mesa driver. I have no idea what causes this message and if there
> > > > > is anything what we could do to prevent this from happening."
> > > > > 
> > > > > And, hasn't responded back for requests for what additional
> > > > > information I could tell mesa.
> > > > > 
> > > > > I see the mesa commit is to prevent GPU hangs, so I'm all for the commit.
> > > > > 
> > > > > I'm just asking what would need to be done by who to get ImageMagick
> > > > > working again, using opencl-mesa.  Using opencl-amd has been a
> > > > > workaround for some people.  Not sure if this is something mesa just
> > > > > hasn't implemented that opencl-amd has, or if it's something
> > > > > ImageMagick needs to do differently.
> > > > 
> > > > Ping?  Mesa + ImageMagick convert is broken, affecting lots of people,
> > > > but neither project is saying anything.
> > > 
> > > Sorry all, please reply to this post rather than the last.  Copy-paste
> > > failure of email addresses of people listed in mesa patch, fixed.
> > 
> > sorry I missed the previous email. The issues has been discussed at
> > [0].
> > 
> > tldr; the referenced mesa commit prevents GPU hangs/crashes caused by
> > changes in LLVM.
> > 
> > longer story:
> > AMDGPU llvm backend used to inline all function calls until llvm-6.
> > llvm-6+ uses functions calls and issues relocations for each function
> > invocation. unhandled relocations lead to GPU hangs/crashes.
> > either clover/mesa needs to handle relocations, or LLVM needs to stop
> > using relocations for internal symbols (they are not needed).
> > 
> > I've neither time, nor energy, nor access to hw, to fix things up
> > every time AMD changes break something in clover, and nobody else has
> > stepped up.
> > moreover, mesa made it clear that volunteer contributions and needs
> > are inferior to corporate stakeholders (not even worth CI cycles).
> > thus, clover on amd gpus is in damage mitigation mode; errors are
> > better than crashes, crashes are better than hangs.
> > 
> > Chances are that clover over NIR will work before the current issues
> > are fixed.
> > 
> > regards,
> > Jan
> > 
> > [0] https://bugs.freedesktop.org/show_bug.cgi?id=105113
> > 
> > > _______________________________________________
> > > mesa-dev mailing list
> > > mesa-dev at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > 
> > --
> > Jan Vesely <jan.vesely at rutgers.edu>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190602/5edaa068/attachment-0001.sig>


More information about the mesa-dev mailing list