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

[ Repo auth ] Fails to build a byte code repository on hhvm 4.168+ #9236

Closed
lexidor opened this issue Oct 1, 2022 · 8 comments
Closed

[ Repo auth ] Fails to build a byte code repository on hhvm 4.168+ #9236

lexidor opened this issue Oct 1, 2022 · 8 comments

Comments

@lexidor
Copy link
Collaborator

lexidor commented Oct 1, 2022

Describe the bug
When trying to build a byte code repository in docker, hhvm 4.168 fails with a set_mempolicy: Operation not permitted

Standalone code, or other way to reproduce the problem

<<__EntryPoint>>
function main(): void {}
hhvm.repo.authoritative=true
hhvm.repo.path=./hhvm.hhbc
hhvm.server.allow_run_as_root=true

Steps to reproduce the behavior:

  1. Create an empty Hack project in an hhvm/hhvm docker container
  2. Add an empty hhconfig file.
  3. Put an empty entry point, as shown above in src/main.hack
  4. Put the INI file shown above in repo-auth.ini
  5. Create a repo using hhvm --hphp --input-dir $(pwd) --output-dir .
  6. When running under hhvm/hhvm@4.167-latest, observe a successful creation of hhvm.hhbc in the project directory.
  7. Run the server using hhvm -m server --no-config -c repo-auth.ini
  8. Curl (with option verbose flag) localhost from within the container. Observe an HTTP 200 without content.

Expected behavior

As described in steps to reproduce

Actual behavior

Step 5. fails with the following error:

...
Extern worker error while indexing: Execution of `hphpc-index` failed: exited with status 1
stderr:
set_mempolicy: Operation not permitted
...

Environment

  • Operating system

Host system Ubuntu 22.04.

  • Installation method

hhvm/hhvm on dockerhub

  • HHVM Version

4.168.0, as provided in the docker container

Additional context
I did already change the commands to be compatible with the removed cli flags from hhvm 4.167.0.

@Atry
Copy link
Contributor

Atry commented Oct 3, 2022

Is it a docker specific problem? Did you test repo mode without a docker container?

@Atry
Copy link
Contributor

Atry commented Oct 3, 2022

Looks similar to the CI failures in https://github.com/hhvm/hacktest/pull/115/files

@Atry
Copy link
Contributor

Atry commented Oct 5, 2022

This is not a docker specific problem. I can reproduce it without a docker container.

@Atry Atry changed the title [ Repo auth ] Fails to build a byte code repository under docker on hhvm 4.168+ [ Repo auth ] Fails to build a byte code repository on hhvm 4.168+ Oct 5, 2022
@Atry
Copy link
Contributor

Atry commented Oct 5, 2022

I can also reproduce it with the nix based universal HHVM deb package

@Atry
Copy link
Contributor

Atry commented Oct 5, 2022

I cannot reproduce this issue with a HHVM built from clang.

@Atry
Copy link
Contributor

Atry commented Oct 5, 2022

As a workaround, you can use the HHVM package built from clang to use repo auth.

You can find the instruction to install hhvm_clang packages at hhvm/user-documentation#1295

@Atry
Copy link
Contributor

Atry commented Oct 5, 2022

The nightly version 2022.09.01 is good to use repo mode, while the nightly version 2022.09.02 is not.

The failure seems related with 280e689.

@Atry
Copy link
Contributor

Atry commented Oct 21, 2022

Fixed in 1174b9f

@Atry Atry closed this as completed Oct 21, 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