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

Run hhvm as user #5486

Closed
bytestostring opened this issue Jun 14, 2015 · 6 comments
Closed

Run hhvm as user #5486

bytestostring opened this issue Jun 14, 2015 · 6 comments

Comments

@bytestostring
Copy link

Hi.

I tried to run hhvm fastcgi server as user.
Command line (run as root):
hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000 --user admin
Output:

mapping self...
mapping self took 0'00" (115530 us) wall time
loading static content...
loading static content took 0'00" (1 us) wall time
Core dumped: Segmentation fault
Stack trace in /tmp/stacktrace.2665.log
Segmentation fault

I checked /tmp/stacktrace.2665.log, but it's empty.

How I can run hhvm as user (from root bash-session) ?

I can't find documentation by "-vServer.Type, -vServer.Port" options besides this link: (https://github.com/facebook/hhvm/wiki/FastCGI). In man hhvm they are not mentioned.

[root@s1 etc]# hhvm --version
HipHop VM 3.8.0-dev (rel)
Compiler: heads/master-0-g60b7aa4dc7f452e630eec9071237060442ea8625
Repo schema: af30432416a745491098cd2a9825533fb420ab33

@jwatzman
Copy link
Contributor

I checked /tmp/stacktrace.2665.log, but it's empty.

This is a consequence of a packaging problem which we are in the process of resolving (but it looks like it could be a few months). Can you run this command under gdb and get a backtrace from it that way?

@bytestostring
Copy link
Author

Okay, gdb, first time:

(gdb) file /opt/hhvm/bin/hhvm
Reading symbols from /opt/hhvm/bin/hhvm...done.
(gdb) run --mode server -vServer.Type=fastcgi -vServer.Port=9000 --user admin
Starting program: /opt/hhvm/bin/hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000 --user admin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
mapping self...
mapping self took 0'00" (114244 us) wall time
loading static content...
loading static content took 0'00" (0 us) wall time

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff19fb6cc in je_arena_mapp_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:511
511 include/jemalloc/internal/arena.h: No such file or directory.`

I have installed jemalloc 3.5.1 by instruction.
I checked directory /usr/local/include/jemalloc, there is one file "jemalloc.h".
I downloaded jemalloc 3.5.1 again, unpacked it, and moved all files (except jemalloc.h) from /tmp/jemalloc-current/include/jemalloc to /usr/local/include/jemalloc. And run gdb again.

Output gdb:

(gdb) r --mode server -vServer.Type=fastcgi -vServer.Port=9000 --user admin
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /opt/hhvm/bin/hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000 --user admin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
mapping self...
mapping self took 0'00" (112323 us) wall time
loading static content...
loading static content took 0'00" (1 us) wall time

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff19fb6cc in je_arena_mapp_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:511
511 return (&chunk->map[pageind-map_bias]);

Thank you.

@paulbiss
Copy link
Contributor

After hhvm crashes in gdb can you run bt at the prompt to generate a backtrace?

@bytestostring
Copy link
Author

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff19fb6cc in je_arena_mapp_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:511
511 return (&chunk->map[pageind-map_bias]);
(gdb) bt
#0 0x00007ffff19fb6cc in je_arena_mapp_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:511
#1 je_arena_mapbitsp_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:518
#2 je_arena_mapbits_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:532
#3 je_arena_mapbits_binind_get (pageind=, chunk=) at include/jemalloc/internal/arena.h:573
#4 je_arena_salloc (demote=, ptr=) at include/jemalloc/internal/arena.h:991
#5 je_isalloc (demote=, ptr=) at include/jemalloc/internal/jemalloc_internal.h:849
#6 ifree (ptr=) at src/jemalloc.c:1228
#7 free (ptr=0x600) at src/jemalloc.c:1308
#8 0x00007ffff016e84d in pthread_attr_destroy () from /lib64/libpthread.so.0
#9 0x0000000000ccc458 in HPHP::hphp_process_init() ()
#10 0x0000000000db8dd1 in HPHP::HttpServer::HttpServer() ()
#11 0x0000000000ce2ada in HPHP::execute_program_impl(int, char**) ()
#12 0x0000000000ce459f in HPHP::execute_program(int, char**) ()
#13 0x00000000009f407c in main ()

@Orvid
Copy link
Contributor

Orvid commented Mar 21, 2016

Is this still an issue?

@Orvid
Copy link
Contributor

Orvid commented Sep 30, 2016

This issue has been waiting for more info for more than 2 weeks. I'm closing it for now, but feel free to re-open it if you can provide more info. https://github.com/facebook/hhvm/wiki/Human-Timeouts

@Orvid Orvid closed this as completed Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants