Closed Lucky-Frost closed 8 years ago
Looks like the crash is occurring while generating a PHP backtrace, which requires loading line numbers from the bytecode repository. After the crash is the file /var/www/.hhvm.hhbc accessible by the user running the server?
Yes, it's accessible by user after crash. The problem was missing in version 3.3.
After a while there were other stacktraces hhvm/error.log
FastCGI protocol: received an invalid record
Core dumped: Segmentation fault
Stack trace in /tmp/stacktrace.7614.log
Finished singleJitRequest 1
Finished singleJitRequest 2
Finished singleJitRequest 3
Finished singleJitRequest 4
Finished singleJitRequest 5
stacktrace
Host: s1
ProcessID: 28445
ThreadID: 7f1477fff700
ThreadPID: 28448
Name: unknown program
Type: Segmentation fault
Runtime: hhvm
Version: tags/HHVM-3.4.0-0-g817b3a07fc4e509ce15635dbc87778e5b3496663
DebuggerCount: 0
ThreadType: Web Request
Server_SERVER_NAME: s1.apidog.ru
Server: apidog.ru
URL: /longpoll.php
# 0 folly::EventBase::runInEventBaseThread(std::function<void ()> const&) at /usr/bin/hhvm:0
# 1 HPHP::FastCGITransport::sendImpl(void const*, int, int, bool) at /usr/bin/hhvm:0
# 2 HPHP::Transport::sendRawInternal(void const*, int, int, bool, char const*) at /usr/bin/hhvm:0
# 3 HPHP::HttpRequestHandler::executePHPRequest(HPHP::Transport*, HPHP::RequestURI&, HPHP::SourceRootInfo&, bool) at /usr/bin/hhvm:0
# 4 HPHP::HttpRequestHandler::handleRequest(HPHP::Transport*) at /usr/bin/hhvm:0
# 5 HPHP::ServerWorker<std::shared_ptr<HPHP::FastCGIJob>, HPHP::FastCGITransportTraits>::doJob(std::shared_ptr<HPHP::FastCGIJob>) at /usr/bin/hhvm:0
# 6 HPHP::JobQueueWorker<std::shared_ptr<HPHP::FastCGIJob>, HPHP::Server*, true, false, HPHP::JobQueueDropVMStack>::start() at /usr/bin/hhvm:0
# 7 HPHP::AsyncFuncImpl::ThreadFunc(void*) at /usr/bin/hhvm:0
# 8 HPHP::start_routine_wrapper(void*) at /usr/bin/hhvm:0
# 9 start_thread at /lib/x86_64-linux-gnu/libpthread.so.0:0
# 10 clone at /lib/x86_64-linux-gnu/libc.so.6:0
PHP Stacktrace:
and other
hhvm/error.log
Core dumped: Aborted
Stack trace in /tmp/stacktrace.1283.log
Finished singleJitRequest 1
Finished singleJitRequest 2
Finished singleJitRequest 3
Finished singleJitRequest 4
Finished singleJitRequest 5
/tmp/stacktrace
Host: s3
ProcessID: 1310
ThreadID: 7f5092bff700
ThreadPID: 1329
Name: unknown program
Type: Aborted
Runtime: hhvm
Version: tags/HHVM-3.4.0-0-g817b3a07fc4e509ce15635dbc87778e5b3496663
DebuggerCount: 0
# 0 gsignal at /lib/x86_64-linux-gnu/libc.so.6:0
# 1 abort at /lib/x86_64-linux-gnu/libc.so.6:0
# 2 folly::EventBase::runFunctionPtr(std::function<void ()>*) at /usr/bin/hhvm:0
# 3 folly::EventBase::FunctionRunner::messageAvailable(std::pair<void (*)(void*), void*>&&) at /usr/bin/hhvm:0
# 4 folly::NotificationQueue<std::pair<void (*)(void*), void*> >::Consumer::handlerReady(unsigned short) at /usr/bin/hhvm:0
# 5 event_base_loop at /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5:0
# 6 folly::EventBase::loopBody(int) at /usr/bin/hhvm:0
# 7 folly::EventBase::loopForever() at /usr/bin/hhvm:0
# 8 proxygen::WorkerThread::runLoop() at /usr/bin/hhvm:0
# 9 std::thread::_Impl<std::_Bind_simple<proxygen::WorkerThread::start()::{lambda()#1} ()> >::_M_run() at WorkerThread.cpp:0
# 10 std::this_thread::__sleep_for(std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) at /usr/lib/x86_64-linux
# 11 start_thread at /lib/x86_64-linux-gnu/libpthread.so.0:0
# 12 clone at /lib/x86_64-linux-gnu/libc.so.6:0
We were hitting the same assert in HPHP::Repo::initCentral()
. We were able to avoid the problem by increasing the maximum number of open file descriptors. What's the output of sysctl fs.file-max
? Try increasing it. Also check ulimit -n
su www-data -s /bin/sh
ulimit -n
262144
sysctl -p
fs.file-max = 262144
Version 3.3.1 does not have this problem, so, on my production servers i returned to it.
This issue has been waiting for more info for more than 2 weeks. Closing for now, feel free to re-open it if you can provide more info.
root@s3:~# lsb_release -a
/etc/hhvm/server.ini
root@s3:~# hhvm --version
/var/log/hhvm/error.log
/tmp/stacktrace.20610.log
/var/log/apport.log
Also I have some other stacktraces