Last modified: 2014-09-11 19:22:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70413, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68413 - LuaSandbox's profiler is not thread-safe
LuaSandbox's profiler is not thread-safe
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Tim Starling
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-22 23:40 UTC by Ori Livneh
Modified: 2014-09-11 19:22 UTC (History)
14 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ori Livneh 2014-07-22 23:40:18 UTC
HHVM package version: 3.1+20140630-1+wm1

Host: deployment-mediawiki01
ProcessID: 966
ThreadID: 7f8d457ff700
ThreadPID: 21324
Name: unknown program
Type: Segmentation fault
Runtime: hhvm
Version: heads/wikimedia-0-g4370ff7993b6e308aed94c5b9408fe20db93eea6
DebuggerCount: 0


# 0  virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >::rethrow() const at /usr/bin/hhvm:0
# 1  lua_sethook at /usr/lib/x86_64-linux-gnu/liblua5.1.so.0:0
# 2  HPHP::Extension::moduleInfo(HPHP::Array&) at /usr/lib/hphp/extensions/20131007/luasandbox.so:0
# 3  timer_sigev_thread at /build/buildd/eglibc-2.19/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:66
# 4  start_thread at /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
# 5  clone at /build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Comment 1 Bryan Davis 2014-07-23 17:49:40 UTC
Still seeing these in beta with new builds:

hhvm                 3.1+20140723-1+wmf1
hhvm-dev             3.1+20140723-1+wmf1
hhvm-fss             1.1-2
hhvm-luasandbox      2.0-2
hhvm-wikidiff2       1.3-2
Comment 2 Bryan Davis 2014-07-23 17:52:14 UTC
Host: deployment-mediawiki02
ProcessID: 3498
ThreadID: 7f0de33ff700
ThreadPID: 4312
Name: unknown program
Type: Segmentation fault
Runtime: hhvm
Version: heads/wikimedia-0-g8b842db4e2db664a9b4d543047ae154a6dd59de6
DebuggerCount: 0


# 0  virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >::rethrow() const at /usr/bin/hhvm:0
# 1  lua_sethook at /usr/lib/x86_64-linux-gnu/liblua5.1.so.0:0
# 2  HPHP::Extension::moduleInfo(HPHP::Array&) at /usr/lib/hphp/extensions/20140702/luasandbox.so:0
# 3  timer_sigev_thread at /build/buildd/eglibc-2.19/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:66
# 4  start_thread at /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
# 5  clone at /build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Comment 3 Gerrit Notification Bot 2014-07-23 19:59:22 UTC
Change 148754 had a related patch set uploaded by Ori.livneh:
beta cluster: use luastandalone

https://gerrit.wikimedia.org/r/148754
Comment 4 Gerrit Notification Bot 2014-07-23 20:29:33 UTC
Change 148754 merged by jenkins-bot:
beta cluster: use luastandalone

https://gerrit.wikimedia.org/r/148754
Comment 5 Bryan Davis 2014-07-23 20:56:02 UTC
Patch was just a hack to switch to luastandalone mode until this crash can be examined/patched in hhvm/luasandbox.
Comment 6 Gerrit Notification Bot 2014-07-24 15:35:18 UTC
Change 149029 had a related patch set uploaded by BryanDavis:
beta: Re-enable luasandbox

https://gerrit.wikimedia.org/r/149029
Comment 7 Gerrit Notification Bot 2014-07-24 15:39:41 UTC
Change 149029 merged by jenkins-bot:
beta: Re-enable luasandbox

https://gerrit.wikimedia.org/r/149029
Comment 8 Bryan Davis 2014-07-24 15:52:27 UTC
Updated beta servers to hhvm-luasandbox 2.0-3 build, changed config back to luasandbox and restarted hhvm fcgi container. Still seeing crashes:

Host: deployment-mediawiki01
ProcessID: 27248
ThreadID: 7fad89bff700
ThreadPID: 27750
Name: unknown program
Type: Segmentation fault
Runtime: hhvm
Version: heads/wikimedia-0-g8b842db4e2db664a9b4d543047ae154a6dd59de6
DebuggerCount: 0


# 0  virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >::rethrow() const at /usr/bin/hhvm:0
# 1  lua_sethook at /usr/lib/x86_64-linux-gnu/liblua5.1-c++.so.0:0
# 2  HPHP::Extension::moduleInfo(HPHP::Array&) at /usr/lib/hphp/extensions/20140702/luasandbox.so:0
# 3  timer_sigev_thread at /build/buildd/eglibc-2.19/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:66
# 4  start_thread at /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
# 5  clone at /build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113

$ hhvm --version
HipHop VM 3.3.0-dev (rel)
Compiler: heads/wikimedia-0-g8b842db4e2db664a9b4d543047ae154a6dd59de6
Repo schema: ce469da81c1d8ec23f3a4aa889afadad8df5a759

$ dpkg -l|grep ^ii|awk '{printf "%-20s %s\n", $2, $3}'|grep hhvm
hhvm                 3.1+20140723-1+wmf1
hhvm-dev             3.1+20140723-1+wmf1
hhvm-fss             1.1-2
hhvm-luasandbox      2.0-3
hhvm-wikidiff2       1.3-2
Comment 9 Gerrit Notification Bot 2014-07-25 01:17:57 UTC
Change 149211 had a related patch set uploaded by Ori.livneh:
Disable LuaSandbox's profiling feature, to isolate bug 68413

https://gerrit.wikimedia.org/r/149211
Comment 10 Gerrit Notification Bot 2014-07-25 01:18:41 UTC
Change 149211 merged by jenkins-bot:
Disable LuaSandbox's profiling feature, to isolate bug 68413

https://gerrit.wikimedia.org/r/149211
Comment 11 Ori Livneh 2014-08-30 06:46:26 UTC
Let's make bug 70177 about the normal & emergency timers, and make this one about thread-safety issues in the profiling feature.

While I'm here:

* timer_getoverrun can fail if the supplied timer ID is invalid. In that case it returns -1. We should check for that rather than indiscriminately add the return value to overrun_count and profiler_signal_count.
Comment 12 Ori Livneh 2014-09-11 19:22:58 UTC
Fixed in https://gerrit.wikimedia.org/r/#/c/159011/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links