Bug#1067005: libLLVM.so symbols are no longer versioned?

Roman Lebedev lebedev.ri at gmail.com
Sat Mar 16 18:49:29 GMT 2024


Package: libllvm18
Version: 1:18.1.1-1
Severity: serious
File: /usr/lib/llvm-18/lib/libLLVM.so.18.1, /usr/lib/x86_64-linux-gnu/libLLVM-17.so.1
X-Debbugs-Cc: Sylvestre Ledru <sylvestre at debian.org>, Gianfranco Costamagna <costamagnagianfranco at yahoo.it>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I'm having a bit of a deja-vu here, because this exact kind of bug was
happening a while ago and was fixed, but looks like it's back?
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846410
(same bugs happened in other distros too)

(TLDR: when two different libLLVM versions happen to [transitively] exist
within one running process, you may get weird segfaults.)

Could you please double-check that the symbols for the `libLLVM.so.18.1`
and `libLLVM-17.so.1` are versioned? If they are not, this bugs' severity
is actually Grave (and affecting at least LLVM17 too?)

Concretely, i'm hitting it when building halide package and then trying to
run it's tests with mesa's RustiCL implementation, llvmpipe driver.
To reproduce, `gbp buildpackage` on
https://salsa.debian.org/LebedevRI-guest/halide/-/commits/debian-opencl-FOR-BUGREPORT

Weirdly-enough, it happens when building the package,
but does not happen with manually hand-built halide.
```
$ export Halide_TARGET=host-opencl
$ export OCL_ICD_VENDORS=rusticl.icd
$ export RUSTICL_ENABLE=llvmpipe
$ gdb /build/halide-17.0.1-build/build/stage-2/halide/test/correctness/correctness_boundary_conditions -ex 'run' -ex 'thread apply all bt full'
GNU gdb (Debian 13.2-1+b1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /build/halide-17.0.1-build/build/stage-2/halide/test/correctness/correctness_boundary_conditions...
Starting program: /build/halide-17.0.1-build/build/stage-2/halide/test/correctness/correctness_boundary_conditions 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdce006c0 (LWP 172580)]
[New Thread 0x7fffdc4006c0 (LWP 172581)]
[New Thread 0x7fffdba006c0 (LWP 172582)]
[New Thread 0x7fffdb0006c0 (LWP 172583)]
[New Thread 0x7fffda6006c0 (LWP 172584)]
[New Thread 0x7fffd9c006c0 (LWP 172585)]
[New Thread 0x7fffd92006c0 (LWP 172586)]
[New Thread 0x7fffd3e006c0 (LWP 172587)]
[New Thread 0x7fffd34006c0 (LWP 172588)]
[New Thread 0x7fffd2a006c0 (LWP 172589)]
[New Thread 0x7fffd20006c0 (LWP 172590)]
[New Thread 0x7fffd16006c0 (LWP 172591)]
[New Thread 0x7fffd0c006c0 (LWP 172592)]
[New Thread 0x7fffc7e006c0 (LWP 172593)]
[New Thread 0x7fffc74006c0 (LWP 172594)]
[New Thread 0x7fffc6a006c0 (LWP 172595)]
[New Thread 0x7fffc60006c0 (LWP 172596)]
[New Thread 0x7fffc56006c0 (LWP 172597)]
[New Thread 0x7fffc4c006c0 (LWP 172598)]
[New Thread 0x7fffbbe006c0 (LWP 172599)]
[New Thread 0x7fffbb4006c0 (LWP 172600)]
[New Thread 0x7fffbaa006c0 (LWP 172601)]
[New Thread 0x7fffba0006c0 (LWP 172602)]
[New Thread 0x7fffb96006c0 (LWP 172603)]
[New Thread 0x7fffb8c006c0 (LWP 172604)]
[New Thread 0x7fffafe006c0 (LWP 172605)]
[New Thread 0x7fffaf4006c0 (LWP 172606)]
[New Thread 0x7fffaea006c0 (LWP 172607)]
[New Thread 0x7fffae0006c0 (LWP 172608)]
[New Thread 0x7fffad6006c0 (LWP 172609)]
[New Thread 0x7fffacc006c0 (LWP 172610)]
[New Thread 0x7fffa3e006c0 (LWP 172611)]
[New Thread 0x7fffa34006c0 (LWP 172612)]
[New Thread 0x7fffa2a006c0 (LWP 172613)]
[New Thread 0x7fffa20006c0 (LWP 172614)]
[New Thread 0x7fffa16006c0 (LWP 172615)]
[New Thread 0x7fffa0c006c0 (LWP 172616)]
[New Thread 0x7fff97e006c0 (LWP 172617)]
[New Thread 0x7fff974006c0 (LWP 172618)]
[New Thread 0x7fff96a006c0 (LWP 172619)]
[New Thread 0x7fff960006c0 (LWP 172620)]
[New Thread 0x7fff956006c0 (LWP 172621)]
[New Thread 0x7fff94c006c0 (LWP 172622)]
[New Thread 0x7fff8be006c0 (LWP 172623)]
[New Thread 0x7fff8b4006c0 (LWP 172624)]
[New Thread 0x7fff8aa006c0 (LWP 172625)]
[New Thread 0x7fff8a0006c0 (LWP 172626)]
[New Thread 0x7fff896006c0 (LWP 172627)]
[New Thread 0x7fff88c006c0 (LWP 172628)]
[New Thread 0x7fff7fe006c0 (LWP 172629)]
[New Thread 0x7fff7f4006c0 (LWP 172630)]
[New Thread 0x7fff7ea006c0 (LWP 172631)]
[New Thread 0x7fff7e0006c0 (LWP 172632)]
[New Thread 0x7fff7d6006c0 (LWP 172633)]
[New Thread 0x7fff7cc006c0 (LWP 172634)]
[New Thread 0x7fff73e006c0 (LWP 172635)]
[New Thread 0x7fff734006c0 (LWP 172636)]
[New Thread 0x7fff72a006c0 (LWP 172637)]
[New Thread 0x7fff720006c0 (LWP 172638)]
[New Thread 0x7fff716006c0 (LWP 172639)]
[New Thread 0x7fff70c006c0 (LWP 172640)]
[New Thread 0x7fff67e006c0 (LWP 172641)]
[New Thread 0x7fff674006c0 (LWP 172642)]
[New Thread 0x7fff66a006c0 (LWP 172643)]
[New Thread 0x7fffd88006c0 (LWP 172645)]

Thread 1 "correctness_bou" received signal SIGSEGV, Segmentation fault.
0x00007fffef1a6160 in llvm::AnalysisManager<llvm::Module>::getResultImpl(llvm::AnalysisKey*, llvm::Module&) () from /usr/lib/llvm-18/lib/libLLVM.so.18.1

<...>

Thread 1 (Thread 0x7fffea839280 (LWP 172577) "correctness_bou"):
#0  0x00007fffef1a6160 in llvm::AnalysisManager<llvm::Module>::getResultImpl(llvm::AnalysisKey*, llvm::Module&) () from /usr/lib/llvm-18/lib/libLLVM.so.18.1
No symbol table info available.
#1  0x00007fffef1a6077 in llvm::AnalysisManager<llvm::Module>::getResultImpl(llvm::AnalysisKey*, llvm::Module&) () from /usr/lib/llvm-18/lib/libLLVM.so.18.1
No symbol table info available.
#2  0x00007fffef1d0a1d in llvm::VerifierPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) () from /usr/lib/llvm-18/lib/libLLVM.so.18.1
No symbol table info available.
#3  0x00007ffff0659681 in ?? () from /usr/lib/llvm-18/lib/libLLVM.so.18.1
No symbol table info available.
#4  0x00007fffe1d2e264 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) () from /lib/x86_64-linux-gnu/libLLVM-17.so.1
No symbol table info available.
#5  0x00007fffdecb10e4 in ?? () from /lib/x86_64-linux-gnu/libclang-cpp.so.17
No symbol table info available.
#6  0x00007fffdecaa082 in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) () from /lib/x86_64-linux-gnu/libclang-cpp.so.17
No symbol table info available.
#7  0x00007fffdf039e9e in ?? () from /lib/x86_64-linux-gnu/libclang-cpp.so.17
No symbol table info available.
#8  0x00007fffddce58e6 in clang::ParseAST(clang::Sema&, bool, bool) () from /lib/x86_64-linux-gnu/libclang-cpp.so.17
No symbol table info available.
#9  0x00007fffdfa2f949 in clang::FrontendAction::Execute() () from /lib/x86_64-linux-gnu/libclang-cpp.so.17
No symbol table info available.
#10 0x00007fffdf9a9364 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from /lib/x86_64-linux-gnu/libclang-cpp.so.17
No symbol table info available.
#11 0x00007fffe8e915f3 in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#12 0x00007fffe8e9330e in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#13 0x00007fffe8e8790d in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#14 0x00007fffe88015a1 in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#15 0x00007fffe875fc7b in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#16 0x00007fffe875ef02 in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#17 0x00007fffe8722dcc in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#18 0x00007fffe8722a49 in ?? () from /lib/x86_64-linux-gnu/libRusticlOpenCL.so.1
No symbol table info available.
#19 0x00007fffea81beb7 in ?? ()
No symbol table info available.
#20 0x0100000000000000 in ?? ()
No symbol table info available.
#21 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) A debugging session is active.

        Inferior 1 [process 172577] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
make[4]: Leaving directory '/build/halide-17.0.1'

```

Roman.


- -- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'unstable-debug'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.9-amd64 (SMP w/32 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libllvm18:amd64 depends on:
ii  libc6       2.37-15.1
ii  libedit2    3.1-20230828-1
ii  libffi8     3.4.6-1
ii  libgcc-s1   14-20240303-1
ii  libstdc++6  14-20240303-1
ii  libtinfo6   6.4+20240113-1
ii  libxml2     2.9.14+dfsg-1.3+b2
ii  libz3-4     4.8.12-3.1+b2
ii  libzstd1    1.5.5+dfsg2-2
ii  zlib1g      1:1.3.dfsg-3.1

libllvm18:amd64 recommends no packages.

libllvm18:amd64 suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+UikBxeiu50LOdFYgbqkFMWfZdAFAmX16bkACgkQgbqkFMWf
ZdCyug//auWBEcbChrJdlYCabf6upvF5vtVrRTx00xzA5GPbSJ725m3y3pDFH01a
c0Pt7AyxIZq8jRuzYeKQe8y2M6z/cAMN6RxvMKz35c/mwRDCmPWlOthvsHzKuZF0
hCwe+ADBE7KjkA9xSyHMJ+081Quh6+SiVvmrb+3hks4FNq6gp5Vv18kW8EHDCYoH
H4+407Pxx+GzqOTDt/KApTPtsApZIzPu1+jy4SyVoTwmoaM2KIEUMGe0AmCV7vMT
r8f6QijQx5ldtQSV1QO02abfjBrNLqLw/OeU6PQZz7qOr1+i6jo4doLKPW9IwHUP
XO7hduMFU5zzn6CoUOy/yolGyqxB/YWjB2UItpEDZDfDAU4a1+yDWD3W2zSI152V
4IluJb/9KJkXjfbtv53m+Pv51YKXhmAUIjAsHMgJS5KHxNl0DNsKUt+Fl7YiC4Zc
0FtLsZcdtqjrADhsKe8vWKu/rjt/PMLmMqRIcntvkr/GG8u5gbq48MRNedRN/P+S
oUYnQsB3CQ3/bUQZAQhIigXeXdzCb4fU5Swe2KS0JcSPNWJpgbzXk42y9bxPoYB7
CRhkzqnxe24MiA1A0dQclH0wc+EVftVnfrNVU4p2GSobjlVpYv+onrYBKDptSZ3o
P+jTOi6igVznYX75tUhy1ZsKxVsM43KX/92HXSQQu0naBGi+hWQ=
=9Akx
-----END PGP SIGNATURE-----



More information about the Pkg-llvm-team mailing list