Last modified: 2013-11-30 16:14:32 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 T54229, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52229 - make safe for phpunit dies with fatal error
make safe for phpunit dies with fatal error
Status: NEW
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
1.22.0
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 17:06 UTC by Niklas Laxström
Modified: 2013-11-30 16:14 UTC (History)
6 users (show)

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


Attachments

Description Niklas Laxström 2013-07-29 17:06:33 UTC
Here is the output. 67b935e is the commit which starts causing this. The issue seems to be that $db->select() returns false, and it returns false because "Table 'sandwiki.unittest_objectcache' doesn't exist (localhost)". I don't know why these errors are suppressed and do no throw exceptions instead of these warnings and fatal errors.

twn:/www/dev.translatewiki.net/w/tests/phpunit ((67b935e...)|BISECTING)$ make safe
php phpunit.php --configuration /www/dev.translatewiki.net/w/tests/phpunit/suite.xml  --exclude-group Broken,ParserFuzz,Destructive,Stub
PHPUnit 3.7.8 by Sebastian Bergmann.

Configuration read from /www/dev.translatewiki.net/w/tests/phpunit/suite.xml

F
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232
...............................................EEEEEEEEEEE    59 / 11016 (  0%)
EEE.SSSSSS.....FE
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232
E
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232
EEE
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232
EEEEEEEE..............................   118 / 11016 (  1%)
...........................................................   177 / 11016 (  1%)
...........................................................   236 / 11016 (  2%)
...........................................................   295 / 11016 (  2%)
...........................................................   354 / 11016 (  3%)
...........................................................   413 / 11016 (  3%)
...........................................................   472 / 11016 (  4%)
...........................................................   531 / 11016 (  4%)
...........................................................   590 / 11016 (  5%)
...........................................................   649 / 11016 (  5%)
...........................................................   708 / 11016 (  6%)
...........................................................   767 / 11016 (  6%)
...........................................................   826 / 11016 (  7%)
...........................................................   885 / 11016 (  8%)
...........................................................   944 / 11016 (  8%)
...........................................................  1003 / 11016 (  9%)
...........................................................  1062 / 11016 (  9%)
...........................................................  1121 / 11016 ( 10%)
...........................................................  1180 / 11016 ( 10%)
...........................................................  1239 / 11016 ( 11%)
...........................................................  1298 / 11016 ( 11%)
...........................................................  1357 / 11016 ( 12%)
...................................................E.......  1416 / 11016 ( 12%)
...........................................................  1475 / 11016 ( 13%)
.................................................F
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232
.......F
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232
.  1534 / 11016 ( 13%)
.F
Warning: Invalid argument supplied for foreach() in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 232

Fatal error: Call to a member function numRows() on a non-object in /www/dev.translatewiki.net/w/includes/objectcache/SqlBagOStuff.php on line 512
make: *** [safe] Error 255
Comment 1 Amir E. Aharoni 2013-08-07 03:10:43 UTC
I can reproduce something similar.

I run:

php phpunit.php --group Wikibase

And it fails like this:

====================================
...........................................................  1652 / 14349 ( 11%)
...........................................................  1711 / 14349 ( 11%)
...........................................................  1770 / 14349 ( 12%)
...........................................................  1829 / 14349 ( 12%)
....................PHP Fatal error:  Call to a member function numRows() on a non-object in /home/amire80/dev/livowiki/includes/objectcache/SqlBagOStuff.php on line 512
PHP Stack trace:
PHP   1. {main}() /home/amire80/dev/livowiki/tests/phpunit/phpunit.php:0
PHP   2. MediaWikiPHPUnitCommand::main() /home/amire80/dev/livowiki/tests/phpunit/phpunit.php:119
PHP   3. MediaWikiPHPUnitCommand->run() /home/amire80/dev/livowiki/tests/phpunit/MediaWikiPHPUnitCommand.php:64
PHP   4. PHPUnit_TextUI_Command->run() /home/amire80/dev/livowiki/tests/phpunit/MediaWikiPHPUnitCommand.php:80
PHP   5. PHPUnit_TextUI_TestRunner->doRun() /usr/share/pear/PHPUnit/TextUI/Command.php:176
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/pear/PHPUnit/TextUI/TestRunner.php:346
PHP   7. PHPUnit_Framework_TestSuite->run() /usr/share/pear/PHPUnit/Framework/TestSuite.php:705
PHP   8. PHPUnit_Framework_TestSuite->run() /usr/share/pear/PHPUnit/Framework/TestSuite.php:705
PHP   9. PHPUnit_Framework_TestSuite->run() /usr/share/pear/PHPUnit/Framework/TestSuite.php:705
PHP  10. PHPUnit_Framework_TestSuite->runTest() /usr/share/pear/PHPUnit/Framework/TestSuite.php:745
PHP  11. MediaWikiTestCase->run() /usr/share/pear/PHPUnit/Framework/TestSuite.php:775
PHP  12. PHPUnit_Framework_TestCase->run() /home/amire80/dev/livowiki/tests/phpunit/MediaWikiTestCase.php:116
PHP  13. PHPUnit_Framework_TestResult->run() /usr/share/pear/PHPUnit/Framework/TestCase.php:769
PHP  14. PHP_Invoker->invoke() /usr/share/pear/PHPUnit/Framework/TestResult.php:646
PHP  15. call_user_func_array() /usr/share/pear/PHP/Invoker.php:93
PHP  16. PHPUnit_Framework_TestCase->runBare() /usr/share/pear/PHP/Invoker.php:93
PHP  17. PHPUnit_Framework_TestCase->runTest() /usr/share/pear/PHPUnit/Framework/TestCase.php:824
PHP  18. ReflectionMethod->invokeArgs() /usr/share/pear/PHPUnit/Framework/TestCase.php:969
PHP  19. Wikibase\Test\ItemMoveTest->testMovePrevention() /usr/share/pear/PHPUnit/Framework/TestCase.php:969
PHP  20. Title->moveTo() /home/amire80/dev/livowiki/extensions/Wikibase/repo/tests/phpunit/includes/ItemMoveTest.php:89
PHP  21. Title->isValidMoveOperation() /home/amire80/dev/livowiki/includes/Title.php:3611
PHP  22. Title->getUserPermissionsErrors() /home/amire80/dev/livowiki/includes/Title.php:3516
PHP  23. Title->getUserPermissionsErrorsInternal() /home/amire80/dev/livowiki/includes/Title.php:1716
PHP  24. Title->checkPermissionHooks() /home/amire80/dev/livowiki/includes/Title.php:2234
PHP  25. wfRunHooks() /home/amire80/dev/livowiki/includes/Title.php:1842
PHP  26. Hooks::run() /home/amire80/dev/livowiki/includes/GlobalFunctions.php:3835
PHP  27. call_user_func_array() /home/amire80/dev/livowiki/includes/Hooks.php:199
PHP  28. PageTranslationHooks::lockedPagesCheck() /home/amire80/dev/livowiki/includes/Hooks.php:199
PHP  29. SqlBagOStuff->get() /home/amire80/dev/livowiki/extensions/Translate/tag/PageTranslationHooks.php:772
PHP  30. SqlBagOStuff->getMulti() /home/amire80/dev/livowiki/includes/objectcache/SqlBagOStuff.php:200
PHP  31. SqlBagOStuff->garbageCollect() /home/amire80/dev/livowiki/includes/objectcache/SqlBagOStuff.php:221
PHP  32. SqlBagOStuff->expireAll() /home/amire80/dev/livowiki/includes/objectcache/SqlBagOStuff.php:478
PHP  33. SqlBagOStuff->deleteObjectsExpiringBefore() /home/amire80/dev/livowiki/includes/objectcache/SqlBagOStuff.php:483
====================================

It does produce these errors if I do
php revert 67b935e
Comment 2 Antoine "hashar" Musso (WMF) 2013-08-07 07:02:23 UTC
67b935e is https://gerrit.wikimedia.org/r/#/c/66117/ 

That commit has merely enabled the ResourcesTest.php which were not being run at all previously.
Comment 3 Amir E. Aharoni 2013-08-07 07:08:59 UTC
> It does produce these errors if I do
> php revert 67b935e

I meant to write:

It does produce these errors if I do
php revert 67b935e
Comment 4 Amir E. Aharoni 2013-08-07 07:15:43 UTC
(In reply to comment #3)
> > It does produce these errors if I do
> > php revert 67b935e
> 
> I meant to write:
> 
> It does produce these errors if I do
> php revert 67b935e

I _REALLY_ meant to write:

It does NOT produce these errors if I do
php revert 67b935e

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


Navigation
Links