[Bug 1882998] Re: Cannot import openvdb 6.2 on Focal due to jemalloc

Mathew Hodson 1882998 at bugs.launchpad.net
Sun Dec 27 00:42:06 UTC 2020


Fixed upstream with
https://github.com/AcademySoftwareFoundation/openvdb/commit/0fa1c68314dfac1822711f5775976ce0735e041e

** Description changed:

- See here : https://github.com/AcademySoftwareFoundation/openvdb/issues/732
- It seems the issue is due to jemalloc.
- Using openvdb7.0 the problem dispears, probably thanks to the following:
+ [Impact]
  
- * d/control: Remove dependency to jemalloc. See #951704 for details
+  * This issue causes apps to be unable to dlopen libopenvdb6.2 or any
+ shared libraries that depend directly or indirectly on libopenvdb6.2.
+ Notably this includes libopenimageio2.1 and anything that depends on it.
+ The python3-openvdb package also doesn't work in focal at present
+ because of this issue.
  
- Would it be possible to remove the dependency to jemalloc on the focal
- version (6.2) or backport version 7.0 from groovy to focal ?
+  * This issue is a good candidate for backporting to focal because (1)
+ the fix is a very modest change to the build of the libopenvdb6.2
+ package; (2) this is a regression from the previous stable release of
+ Ubuntu (bionic); (3) several packages are affected by it.
+ 
+  * The change already in groovy fixes this issue by not building
+ libopenvdb with jemalloc.
+ 
+ [Test Case]
+ 
+  * `apt install python3-openvdb && python3 -c "import pyopenvdb"` should
+ succeed, but because of this issue it currently fails with the error
+ "cannot allocate memory in static TLS block".
+ 
+  * Also, the following C program should print a non-nil value to stdout:
+ 
+ ```c
+ #include <dlfcn.h>
+ #include <stdio.h>
+ 
+ void main() {
+   printf("%p\n", dlopen("/usr/lib/x86_64-linux-gnu/libopenvdb.so.6.2", RTLD_NOW));
+ }
+ ```
+ 
+ [Regression Potential]
+ 
+  * Regressions are unlikely because the only change is to the choice of
+ allocator for libopenvdb6.2 when configuring the build with CMake.
+ 
+  * There is no need for a patch to libopenvdb.
+ 
+  * The patch applied in groovy is https://salsa.debian.org/multimedia-
+ team/openvdb/-/commit/ac393d95aa19d29c23a97dca1ace23061ebe5c17
+ 
+ [Other Info]
+ 
+  * There are workarounds for this issue, but each has its own drawbacks
+ and may not be possible in every situation where this issue could occur.
+ 
+  * Upstream issue
+ https://github.com/AcademySoftwareFoundation/openvdb/issues/732
  
  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: libopenvdb-dev 6.2.1-8ubuntu1
  ProcVersionSignature: Ubuntu 5.4.0-33.37-generic 5.4.34
  Uname: Linux 5.4.0-33-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.2
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Jun 10 19:49:55 2020
  InstallationDate: Installed on 2020-05-15 (26 days ago)
  InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
  SourcePackage: openvdb
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1882998

Title:
  Cannot import openvdb 6.2 on Focal due to jemalloc

Status in jemalloc package in Ubuntu:
  Confirmed
Status in openvdb package in Ubuntu:
  Fix Released
Status in jemalloc source package in Focal:
  New
Status in openvdb source package in Focal:
  New
Status in jemalloc package in Debian:
  New

Bug description:
  [Impact]

   * This issue causes apps to be unable to dlopen libopenvdb6.2 or any
  shared libraries that depend directly or indirectly on libopenvdb6.2.
  Notably this includes libopenimageio2.1 and anything that depends on
  it. The python3-openvdb package also doesn't work in focal at present
  because of this issue.

   * This issue is a good candidate for backporting to focal because (1)
  the fix is a very modest change to the build of the libopenvdb6.2
  package; (2) this is a regression from the previous stable release of
  Ubuntu (bionic); (3) several packages are affected by it.

   * The change already in groovy fixes this issue by not building
  libopenvdb with jemalloc.

  [Test Case]

   * `apt install python3-openvdb && python3 -c "import pyopenvdb"`
  should succeed, but because of this issue it currently fails with the
  error "cannot allocate memory in static TLS block".

   * Also, the following C program should print a non-nil value to
  stdout:

  ```c
  #include <dlfcn.h>
  #include <stdio.h>

  void main() {
    printf("%p\n", dlopen("/usr/lib/x86_64-linux-gnu/libopenvdb.so.6.2", RTLD_NOW));
  }
  ```

  [Regression Potential]

   * Regressions are unlikely because the only change is to the choice
  of allocator for libopenvdb6.2 when configuring the build with CMake.

   * There is no need for a patch to libopenvdb.

   * The patch applied in groovy is https://salsa.debian.org/multimedia-
  team/openvdb/-/commit/ac393d95aa19d29c23a97dca1ace23061ebe5c17

  [Other Info]

   * There are workarounds for this issue, but each has its own
  drawbacks and may not be possible in every situation where this issue
  could occur.

   * Upstream issue
  https://github.com/AcademySoftwareFoundation/openvdb/issues/732

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: libopenvdb-dev 6.2.1-8ubuntu1
  ProcVersionSignature: Ubuntu 5.4.0-33.37-generic 5.4.34
  Uname: Linux 5.4.0-33-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.2
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Jun 10 19:49:55 2020
  InstallationDate: Installed on 2020-05-15 (26 days ago)
  InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
  SourcePackage: openvdb
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/jemalloc/+bug/1882998/+subscriptions



More information about the Ubuntu-sponsors mailing list