New issue
Advanced search Search tips

Issue 834474 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 834010



Sign in to add a comment

gpu_unittests failing on Linux CFI icall bots

Project Member Reported by r...@chromium.org, Apr 18 2018

Issue description

First failing builds on pinned clang and ToT clang bots:
https://ci.chromium.org/buildbot/chromium.clang/CFI%20Linux%20%28icall%29/9554
https://ci.chromium.org/buildbot/chromium.clang/CFI%20Linux%20ToT/2411

The ToT bot and the pinned bots went red right at the same time, so this was most likely caused by changes in Chromium.

The logs of one example failing test:

[ RUN      ] 0/GLES2DecoderPassthroughFixedCommandTest/45.InvalidCommand
[23397:23397:0417/113440.062029:7443218164:ERROR:gl_implementation.cc(291)] Failed to load /b/s/w/ir/out/Release/libGLESv2.so: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /b/s/w/ir/out/Release/libGLESv2.so)
[23397:23397:0417/113440.062190:7443218325:FATAL:gl_factory_x11.cc(122)] Check failed: false.
#0 0x00000217fedc base::debug::StackTrace::StackTrace()
#1 0x00000218f8c6 logging::LogMessage::~LogMessage()
#2 0x000002b3e2db gl::init::CreateOffscreenGLSurfaceWithFormat()
#3 0x000002b3dc7d gl::init::CreateOffscreenGLSurface()
#4 0x000001427a3e gpu::gles2::GLES2DecoderPassthroughTestBase::SetUp()
#5 0x000001a57d4d testing::Test::Run()
#6 0x000001a5865d testing::TestInfo::Run()
#7 0x000001a58e22 testing::TestCase::Run()
#8 0x000001a5fb63 testing::internal::UnitTestImpl::RunAllTests()
#9 0x000001a5f7ee testing::UnitTest::Run()
#10 0x000002212844 base::TestSuite::Run()
#11 0x0000012bbb31 _ZN4base8internal7InvokerINS0_9BindStateIMNS_9TestSuiteEFivEJNS0_17UnretainedWrapperIN12_GLOBAL__N_112GpuTestSuiteEEEEEEFivEE7RunImplIRKS5_RKNSt3__15tupleIJS9_EEEJLm0EEEEiOT_OT0_NSG_16integer_sequenceImJXspT1_EEEE
#12 0x0000022168de _ZNO4base12OnceCallbackIFivEE3RunEv
#13 0x000002215700 base::(anonymous namespace)::LaunchUnitTestsInternal()
#14 0x0000022155c8 base::LaunchUnitTests()
#15 0x0000012bb995 main
#16 0x7f9af5818f45 __libc_start_main
#17 0x00000109e02a _start


 

Comment 1 by p...@chromium.org, Apr 18 2018

Cc: thomasanderson@chromium.org
thomasanderson was looking at this, it was a sysroot change.
The main waterfall bot just went red as well because icall was just enabled on it, looks like that's related to this failure. I'm going to revert the change enabling icall for now https://ci.chromium.org/buildbot/chromium.memory/Linux%20CFI/7279
From what I can tell, this appears to be a clang bug.

libGLESv2.so is referencing symbols from GLIBC_2.27 when it shouldn't be:
$ nm -D --undefined-only --with-symbol-versions libGLESv2.so | grep GLIBC_2.27
                 U exp2f@GLIBC_2.27
                 U expf@GLIBC_2.27
                 U logf@GLIBC_2.27

exp2f, for example, is referenced from here:
https://cs.chromium.org/chromium/src/third_party/angle/src/compiler/translator/IntermNode.cpp?rcl=427064d2ac0bdd008cc259bb865d9d13cd7eeced&l=2609

The sysroot's math.h aliases exp2f to exp2f@GLIBC_2.2.5 to prevent using the 2.27 ones:
__asm__(".symver exp2f, exp2f@GLIBC_2.2.5");
https://cs.chromium.org/chromium/src/build/linux/sysroot_scripts/sysroot-creator.sh?rcl=a99766226185009aa064d195baaaf8b9d5ed7150&l=307

GLIBC_2.27 doesn't appear anywhere in the corresponding object file, but somehow gets referenced after linking.  If I remove -fsanitize=cfi-icall or remove the exp2f usage from IntermNode.cpp, exp2f@GLIBC_2.27 is no longer referenced by libGLESv2.so
This sounds like it might be because LowerTypeTests is not symbol version aware, I'm taking a look.
I think this is similar to the alias bug addressed in https://reviews.llvm.org/D41741. We re-emit the exp2f symbol in the merged module without the symver directive.
Owner: vtsyrklevich@chromium.org
This issue is fixed on the ToT bots with https://reviews.llvm.org/D45798 merged. I'm keeping this ticket open to track this issue being fixed so I can re-enable icall on the chromium.memory CFI bot as well.
Blockedon: 834010
Status: Fixed (was: Untriaged)
icall re-enabled on the chromium.memory CFI bot with https://chromium-review.googlesource.com/c/chromium/src/+/1026913

Sign in to add a comment