Page MenuHomePhabricator

Unknown exception from Thomas Mann page on rowiki
Closed, DuplicatePublicPRODUCTION ERROR


Repro url:
Logged error:*/logstash-2017.03.24/mediawiki/?id=AVsCWMuLlL3ktRIGFTtD

No stack trace found, but digging around in mwrepl i can find it gets the exception at: Scribunto_LuaSandboxInterpreter::callFunction() on line 329 of /srv/mediawiki/php-1.29.0-wmf.17/extensions/Scribunto/engines/LuaSandbox/Engine.php

I couldn't figure out the exact exception, but setting a gdb breakpoint on __cxa_throw we get the following stack trace:

#0  __cxxabiv1::__cxa_throw (obj=0x7fffd0a93900, tinfo=0x7fffe39e3d00 <typeinfo for lua_longjmp*>, 
    dest=0x0) at ../../../../src/libstdc++-v3/libsupc++/
#1  0x00007fffe37c3c1f in ?? () from /usr/lib/x86_64-linux-gnu/
#2  0x00007fffe37c7c5f in ?? () from /usr/lib/x86_64-linux-gnu/
#3  0x00007fffe37c5006 in ?? () from /usr/lib/x86_64-linux-gnu/
#4  0x00007fffe37bfff1 in lua_pushcclosure () from /usr/lib/x86_64-linux-gnu/
#5  0x00007fffe39f4c51 in ?? () from /usr/lib/x86_64-linux-gnu/hhvm/extensions/20150212/
#6  0x00007fffe39f5175 in zim_LuaSandboxFunction_call(int, HPHP::RefData*, HPHP::RefData**, HPHP::RefData*, int, void***) () from /usr/lib/x86_64-linux-gnu/hhvm/extensions/20150212/

Unfortunately a good part of the stack has been lost, or perhaps terbium just doesn't have enough debugging symbols.

Event Timeline

Currently able to reproduce this in mwrepl with:

break Scribunto_LuaSandboxInterpreter::callFunction()
$ctx = new RequestContext();$ctx->setTitle(Title::newFromText('Thomas_Mann')); $ctx->setRequest(new FauxRequest(['title'=>'Thomas_Mann','diff'=>'10758157','oldid'=>'9788822']));$article = new Article(Title::newFromText('Thomas Mann')); $article->setContext($ctx); Action::factory('view', $article, $ctx)->show();
c 35

That will, currently, stop in the function that then calls into luasandbox and errors out. Probably a very fragile way but couldn't find anything better.

It doesn't have debug symbols for /usr/lib/x86_64-linux-gnu/ Those are provided by the liblua5.1-0-dbg package.

FWIW, I managed to work around the issue by optimizing some modules so that they load less Wikidata items. However, the error should be better reported.

Anomie changed the task status from Open to Stalled.Mar 27 2017, 2:31 PM
Anomie added a subscriber: Anomie.

FWIW, I managed to work around the issue by optimizing some modules so that they load less Wikidata items. However, the error should be better reported.

Unfortunately, now I can't reproduce the error to start trying to debug it. If someone can manage to reproduce it there in a sandbox, or on Beta Labs somehow, that'd be helpful.

This is the change that I made in order to avoid it. That module was loading up the Wikidata item of the city of birth in order to get the country where it was located. If you want to test it, just rollback my change and you can test live on ro.wp. We're a small community and we discussed the issue at the village pump, so just mention you're investigating it when you rollback my change and the patrollers should leave you alone. Thomas Mann is the only article where we encountered this so far, anyway.

What I have been able to determine/guess here:

  • The only place I see "unknown exception" as the only text of an error is from runtime/vm/unwind-inl.h in HHVM. It doesn't appear in MediaWiki core, Scribunto, other deployed extensions, luasandbox, or lua-5.1.
  • Based on what little bit of stack info we have here, my best guess is that #5 is this line.
  • I see some other instances of the same error in the logs (kibana link), but so far not one that's reproducible. No idea if they're the same cause or just the same error message.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM