Bug 109259 - Mesa compiled with LLVM/clang-7.0 segfaults
Summary: Mesa compiled with LLVM/clang-7.0 segfaults
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: 18.3
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-09 12:47 UTC by Tomasz Paweł Gajc
Modified: 2019-09-18 20:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tomasz Paweł Gajc 2019-01-09 12:47:31 UTC
Hi,

we have noticed that mesa-18.3.x segfault when it is compiled with LLVM/clang-7.0.x and run on older hardware.

After some deep digging we noticed this may be related to missing AVX instructions on these machines, even if we build for generic x86_64, i686 targets.

Fast workaround for eliminating segfaults was to build Mesa with gcc :(
https://github.com/OpenMandrivaAssociation/mesa/commit/4d330587a4d80012c5888e1a33a01a7a979b84e8

Rebuilding Mesa with LLVM/clang-7.0.1 still segfaults. 

Our users have reported this occurs on:
r600 driver
nvidia gfx card
AMD Athlon II X4 620
AMD Phenom II x4 N930
Intel Quad 9650
Intel i3 530

Links to bug reports:
https://issues.openmandriva.org/show_bug.cgi?id=2381
https://issues.openmandriva.org/show_bug.cgi?id=2393
Comment 1 Tomasz Paweł Gajc 2019-01-09 12:48:21 UTC
Build logs for mesa compiled with LLVM/clang-7.0.1 can be found here
https://abf.openmandriva.org/build_lists/351189
Comment 2 Tomasz Paweł Gajc 2019-01-09 12:54:29 UTC
When building mesa with clang these flags are used
-pthread -mavx2 -mfma -mbmi2 -mf16c -DKNOB_ARCH=KNOB_ARCH_AVX2 
 with gcc
[-pthread -mavx -DKNOB_ARCH=KNOB_ARCH_AVX
Comment 3 Dylan Baker 2019-01-09 18:12:15 UTC
I'm confused, you're targeting generic x86_64, but compiling with -mavx and -mavx2?

Additionally, there's a bug with SWR (I can't find it right now), due to global constructors that mean that if you build SWR you have to have the special instructions it relies on.
Comment 4 GitLab Migration User 2019-09-18 20:27:31 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1035.


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.