Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning about missing 'libjemalloc.so' with 22.7.0-RC3 on Ubuntu 22.04 server #4191

Closed
remyroy opened this issue Jul 28, 2022 · 6 comments
Closed
Assignees
Labels

Comments

@remyroy
Copy link

remyroy commented Jul 28, 2022

Description

As a user of Besu, I don't expect to see any error message when starting Besu so that I have a high confidence about my usage of this software.

Acceptance Criteria

  • No error message is shown when starting Besu.

Steps to Reproduce (Bug)

  1. Download Besu 22.7.0-RC3 on Ubuntu 22.04 server
  2. Install libjemalloc with sudo apt install libjemalloc2
  3. Install Eclipse Tumerin JDK from Adoptium
  4. Start besu with bin/besu --version
  5. Notice the following error message: ERROR: ld.so: object 'libjemalloc.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Expected behavior: No error message is shown when starting Besu.

Actual behavior: The following error message is shown when starting besu: ERROR: ld.so: object 'libjemalloc.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Frequency: 100% of the time

Versions (Add all that apply)

  • Software version: besu/v22.7.0-RC3/linux-x86_64/openjdk-java-17
  • Java version:
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
  • OS Name & Version:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
  • Kernel Version: Linux ubuntu-serser-2204 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Virtual Machine software & version: VMware® Workstation 16 Player (16.2.4 build-20089737)

Temporary solution

I edited /bin/besu and replaced the LD_PRELOAD line with: export LD_PRELOAD=libjemalloc.so.2 and it fixed my issue. This might be a naming thing on Ubuntu as the libjemalloc is installed in /usr/lib/x86_64-linux-gnu/libjemalloc.so.2.

Other more elegant solutions might involve using a symlink as part of the installation on Ubuntu or rewriting that unixStartScript to account for different libjemalloc names.

Related

PR who introduced this change: #4126
Author of this change: @garyschulte
Reviewer: @jflo

@daniellehrner
Copy link
Contributor

@remyroy Could you try to install libjemalloc-dev? We use that one in the docker images and don't see any error message.

@remyroy
Copy link
Author

remyroy commented Jul 28, 2022

It seems like installing the libjemalloc-dev package also installs the libjemalloc2 package and it creates the required symlink on Ubuntu 22.04.

$ ls -al /usr/lib/x86_64-linux-gnu/libjemalloc*
-rw-r--r-- 1 root root 1119814 Jan 24  2022 /usr/lib/x86_64-linux-gnu/libjemalloc.a
-rw-r--r-- 1 root root 1119970 Jan 24  2022 /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a
lrwxrwxrwx 1 root root      16 Jan 24  2022 /usr/lib/x86_64-linux-gnu/libjemalloc.so -> libjemalloc.so.2
-rw-r--r-- 1 root root  744440 Jan 24  2022 /usr/lib/x86_64-linux-gnu/libjemalloc.so.2

It also fixes this issue. This can be closed.

@garyschulte
Copy link
Contributor

I think we are going to keep this issue open and use it to track a better UX for this error. The benefits of using jemalloc are substantial, so it is worth a better and more actionable error.

@iamhsk iamhsk added the doc-change-required Indicates an issue or PR that requires doc to be updated label Aug 1, 2022
@non-fungible-nelson
Copy link
Contributor

Hi docs team - please ping me when you pick this up

@macfarla macfarla added the Stale label Dec 6, 2024
@macfarla
Copy link
Contributor

macfarla commented Dec 6, 2024

@garyschulte is this still relevant?

@garyschulte
Copy link
Contributor

fixed by #4237

@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants