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

Provide Dockerfile or ready-made container on dockerhub #117

Open
lhog opened this issue Feb 2, 2022 · 9 comments
Open

Provide Dockerfile or ready-made container on dockerhub #117

lhog opened this issue Feb 2, 2022 · 9 comments

Comments

@lhog
Copy link

lhog commented Feb 2, 2022

Hi!

Trying to build / bench mimalloc-bench inside a pristine ubuntu:20.04 container and I'm seeing the ./build-bench-env.sh packages lean is not providing enough standard packages to kickstart from a bare distribution like containerized ubuntu.

During the course of installation I had to install ~10 extra packages and yet I didn't manage to run bench properly. Perhaps a Dockerfile or a pre-built container on dockerhub could ease the process for those not wanting to "pollute" the main OS with lots of packages and external software.

@jvoisin
Copy link
Collaborator

jvoisin commented Feb 2, 2022

What packages did you need to install?

@lhog
Copy link
Author

lhog commented Feb 2, 2022

As simple as make or gawk or time. I can provide a full log tomorrow

@jvoisin
Copy link
Collaborator

jvoisin commented Feb 3, 2022

It's weird because we do test mimalloc-bench on various distributions in our CI, and we don't have dependencies issues: https://github.com/daanx/mimalloc-bench/blob/master/.github/workflows/all.yml

@lhog
Copy link
Author

lhog commented Feb 3, 2022

github worker node is not that barren as ubuntu container.

So here's I'm delivering the promised. I'll be posting the logs and commenting what I'm trying to do to rectify the issues as I go:

2. docker run -it ubuntu:20.04
root@9241ca857197:/# git clone https://github.com/daanx/mimalloc-bench
bash: git: command not found

Okay this is expected.
apt update && apt install git
Cloned.

./build-bench-env.sh all
<....>
./build-bench-env.sh: line 367: sudo: command not found

Ok this is expected too. Although the script could check if it's run by superuser (it's the case in the container by default) and not ask for sudo. Anyway apt install sudo

  1. Continuing with ./build-bench-env.sh all
./build-bench-env.sh: line 331: curl: command not found
./build-bench-env.sh: line 331: gpg: command not found

apt install curl gpg
4. ....
./build-bench-env.sh: line 382: make: command not found
apt install make
5. ....

HEAD is now at f7c6fb6 bump version to 2.9.1
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

apt install automake
6. ....

HEAD is now at 651fe93 Fail more loudly when handling an allocated size of 0.
./build-bench-env.sh: line 467: gawk: command not found

apt install gawk
7. ....

--------------------------------------------
patch shbench
--------------------------------------------

/mimalloc-bench/bench/shbench /mimalloc-bench
failed: Connection refused.

Hmm no idea, just re-run the same script again.
8. ....

/mimalloc-bench/extern/tcg already exists; no need to git clone
M       tcmalloc/BUILD
M       tcmalloc/internal/BUILD
M       tcmalloc/testing/BUILD
M       tcmalloc/variants.bzl
HEAD is now at 651fe93 Fail more loudly when handling an allocated size of 0.
ERROR: /mimalloc-bench/extern/tcg/tcmalloc/BUILD:104:11: //tcmalloc:tcmalloc_deprecated_perthread: no such attribute 'linkshared' in 'cc_library' rule
ERROR: error loading package 'tcmalloc': Package 'tcmalloc' contains errors
INFO: Elapsed time: 0.206s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)

Hmm again.
9. Rerunning with jemalloc only and lean benchmark ./build-bench-env.sh je lean

./build-bench-env.sh: line 693: column: command not found

apt install bsdmainutils
10. Finally it has built. Not in the complete form, but let's try to bench at least jemalloc.

mkdir -p out/bench
cd out/bench
../../bench.sh je lean
<...>
Scanning dependencies of target clean-olean
Built target clean-olean
/mimalloc-bench/extern/lean/library /mimalloc-bench/out/bench
../../bench.sh: line 478: -a: command not found

/mimalloc-bench/out/bench
sed -n 478p ../../bench.sh
       $timecmd -a -o $benchres -f "$1${benchfill:${#1}} $2${allocfill:${#2}} %E %M %U %S %F %R" /usr/bin/env $3 $4 < "$infile" > "$outfile";;

This is due to "time" missing
apt install time
11. Finally lean benchmark completed on jemalloc. Other combinations show similar issues, some of them I tried yesterday and couldn't solve the issues.

@jvoisin
Copy link
Collaborator

jvoisin commented Feb 3, 2022

./build-bench-env.sh packages should just work™

@jvoisin
Copy link
Collaborator

jvoisin commented May 9, 2022

Anything else we could/should do to get this issue closed?

@lhog
Copy link
Author

lhog commented May 9, 2022

I haven't tested since the initial report.

We have should just work™ claim vs the reality I faced and documented.
Up to you to decide which one to trust.

@jvoisin
Copy link
Collaborator

jvoisin commented May 10, 2022

Can you please re-test then?

@lhog
Copy link
Author

lhog commented May 10, 2022

I'll do my best, although I have lost access to my personal PC for next couple of months.

lhog added a commit to lhog/mimalloc-bench that referenced this issue Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants