Last modified: 2014-09-25 16:40:36 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 T73174, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71174 - Script error "attempt to concatenate a nil value" when running in HHVM
Script error "attempt to concatenate a nil value" when running in HHVM
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Tim Starling
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-23 13:24 UTC by Liangent
Modified: 2014-09-25 16:40 UTC (History)
6 users (show)

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


Attachments
Test case (560 bytes, text/plain)
2014-09-23 14:50 UTC, Brad Jorsch
Details

Description Liangent 2014-09-23 13:24:12 UTC
Lua错误 模块:Wikidata的第16行:attempt to concatenate a nil value

回溯:

    [C]: 在函数“getExpandedArgument”中
    mw.lua:141: ?
    模块:Infobox:338: 在函数“preprocessArgs”中
    模块:Infobox:414: 在函数“chunk”中
    mw.lua:497: ?

(Translated version below:)

Lua error  Line 16 of Module:Wikidata: attempt to concatenate a nil value

Backtrace:

    [C]: In function “getExpandedArgument”
    mw.lua:141: ?
    Module:Infobox:338: In function “preprocessArgs”
    Module:Infobox:414: In function “chunk”
    mw.lua:497: ?

Pages / revisions:

https://zh.wikipedia.org/w/index.php?title=%E6%9F%8F%E6%9E%97%E8%92%BC%E7%A9%B9%E4%B8%8B&oldid=30390918

https://zh.wikipedia.org/w/index.php?title=%E6%A8%A1%E5%9D%97:Wikidata&oldid=32739940

https://zh.wikipedia.org/w/index.php?title=%E6%A8%A1%E5%9D%97:Infobox&oldid=28580418
Comment 1 Liangent 2014-09-23 13:27:14 UTC
Bumping severity because it causes (recoverable) data loss in *links table when someone triggering a linksupdate is using HHVM.
Comment 2 Jackmcbarn 2014-09-23 14:45:48 UTC
It looks like nested Lua calls are propagating errors up further than they should. I'm investigating why.
Comment 3 Brad Jorsch 2014-09-23 14:50:07 UTC
Created attachment 16553 [details]
Test case

I've reduced this to a more minimal test case.

What's happening is that EG(exception) isn't getting cleared despite the try-catch in the PHP function, so luasandbox_call_php rethrows it.
Comment 4 Jackmcbarn 2014-09-23 21:14:19 UTC
This problem appears quite widespread. Setting High importance.
Comment 5 Tim Starling 2014-09-24 04:36:48 UTC
I think the correct thing to do is to clear EG(exception) at the end of zend_wrap_func(). In Zend, EG(exception) is an "active" exception, i.e. prior to being handled by the VM. EG(exception) is cleared by the ZEND_CATCH opcode. So it makes sense to clear it before returning to HHVM's VM.

In a recursive call into zend_wrap_func() via zend_call_function(), the Zend exception will be converted to a C++ exception and back again, so there will only be one sort of exception active at any one time. Whereas in the current situation, after the return from zend_wrap_func(), we have both a Zend exception and a C++ exception being active.
Comment 6 Tim Starling 2014-09-24 05:11:56 UTC
https://github.com/facebook/hhvm/pull/3834
Comment 7 Ori Livneh 2014-09-25 16:40:36 UTC
(In reply to Tim Starling from comment #6)
> https://github.com/facebook/hhvm/pull/3834

Thanks Tim.

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


Navigation
Links