Repository navigation
Failed to Hugify the .text Section - HardwareCounter perf_event_open failed with Permission Denied #9063
Description
I'm trying to learn Hack following this tutorial so I set up an Ubuntu 20.04 VirtualBox machine (guest) on my Windows 10 (host) laptop as a dev server. I successfully installed Hack and VS Code along with the Hack extension for IntelliSense, hinting, and code highlighting.
However, when I run hhvm -m server -p 8080 the server seems to launch and I can see the code results in a browser, but I get this error:
Failed to hugify the .text section
I tried changing a text string and saving it and now I get this error:
HardwareCounter: perf_event_open failed with: Permission denied
Have been unable to find anything except this post (#8168) which unfortunately did not offer a solution that I could understand as a newbie to HHVM and an Ubuntu novice.
Steps to reproduce the behavior:
- Install Ubuntu server 20.04 (minimal version). (Mine was installed as VirtualBox guest, but this may not matter)
- Install VS Code
- Install HHVM in terminal (bash)
- Install Hack extension in VS Code
- Create a project as per https://docs.hhvm.com/hack/getting-started/getting-started
- Launch localhost:8080/hello.hack in browser (Firefox)
- See error 1
- Change "Hello World" to "Hello ERIC" in hello.hack in VS Code and save
- Refresh the browser
- See error 2
Error 1
Error 2
Expected behavior
I was following a tutorial and wasn't sure what to expect. Unsure if the errors I'm reporting will cause a problem, but so far it looks like everything is ok. But, reporting in case this trips somebody else up so it can at least be addressed and known.
Environment
- Operating system
Ubuntu 20.04.4 LTS (Focal Fossa)
- Installation method
apt-get update
apt-get install software-properties-common apt-transport-https
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94
add-apt-repository https://dl.hhvm.com/ubuntu
apt-get update
apt-get install hhvm
- HHVM Version
hhvm --version
HipHop VM 4.155.0 (rel) (non-lowptr)
Compiler: 1648749156_506524366
Repo schema: 04d94ff27ad41e22663e624a2fee9a624072160a
hh_client --version
hackc-a9ca8db2dc64da66270a4e83a3f019dc92246c09-4.155.0
Additional context
For posterity (in case the source website disappears ever) here are the tutorial steps I followed exactly:
- Initialize A Project
Create a directory with a .hhconfig file in it. This will be the root of your project.
$ mkdir my_project
$ cd my_project
$ touch .hhconfig
- Write Your First Hack Program
Create a file called my_project/hello.hack with the following code:
use namespace HH\Lib\IO;
<<__EntryPoint>>
async function main(): Awaitable<void> {
await IO\request_output()->writeAllAsync("Hello World!\n");
}
- Run The Typechecker
Normally you'll get type errors and hover information from within your IDE. You can also run the typechecker directly to confirm that you have no type errors in any files in your project.
$ cd my_project
$ hh_client
No errors!
- Run Your Program
HHVM provides the Hack runtime. You can run your program as follows:
$ cd my_project
$ hhvm hello.hack
Hello World!
- Run A Website
Normally you'll start HHVM as a webserver, and it will automatically pick up any changes to files you make.
$ cd my_project
$ hhvm -m server -p 8080
You can now visit http://localhost:8080/hello.hack to see "Hello World!" in your browser.


Activity
lexidor commentedon Apr 7, 2022
Hi 👋, these notices are not specific to your setup and you have followed the guide correctly. These notices have been around for a really long time. They occur in Docker and on Linux. They can be ignored without ill effect (for as far as I understand). I have been ignoring them for ages.
I am not a member of the hhvm team, nor do I work for Facebook.
codewizard13 commentedon Apr 8, 2022
Thanks! This is encouraging
alexeyt commentedon Apr 8, 2022
I can confirm this warning is harmless: it is just saying that a performance optimization was unavailable. We can disable this perf optimization by default in open source builds, which will suppress the warning (in order to make use of the optimization you need to configure the kernel to make huge pages available at boot time, and most users won't want this). We can leave this issue open to track suppressing the warning.