Page MenuHomePhabricator

Infinite loops/excessive execution time in diff engine
Open, LowPublicBUG REPORT

Description

Author: heidi

Description:
Encountered an issue where MediaWiki exhaust allowed execution time in certain functions in DairikiDiff.php on a certain fairly large article (~130KB) with a large table. Triggers at various points in the code, but primarily in _DiffEngine::_diag

[Thu Jun 06 00:43:42 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 1286
[Thu Jun 06 00:43:56 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 1285
[Thu Jun 06 05:14:31 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 402
[Thu Jun 06 05:16:02 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php(399) : assert code on line 1
[Thu Jun 06 05:16:18 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php(399) : assert code on line 1
[Thu Jun 06 05:17:29 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 399
[Thu Jun 06 05:17:44 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 397
[Thu Jun 06 05:19:16 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 399
[Thu Jun 06 05:26:13 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php(399) : assert code on line 1
[Thu Jun 06 05:26:57 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 399
[Thu Jun 06 05:27:16 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 398
[Thu Jun 06 05:27:21 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 397
[Thu Jun 06 05:35:09 2013] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in [...]/includes/diff/DairikiDiff.php on line 402

Dumped the local and class variable space in _DiffEngine::_diag on line 375, right before entering the for-loop. It's found in the attached file.

Presumably this is not intended behavior on encountering a large diff? The edits themselves are fairly minor, and it doesn't have any issues on different, much larger (400KB) table.


Version: 1.21.x
Severity: major
OS: Linux

Details

Reference
bz49244

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:55 AM
bzimport set Reference to bz49244.
bzimport added a subscriber: Unknown Object (MLST).

heidi wrote:

Local+class variable space

Attached:

MW 1_23
I've been seeing:

PHP Fatal error: Maximum execution time of 30 seconds exceeded in ...DairikiDiff.php on line 0

in the logs lately.

Aklapper renamed this task from Infinite loops/excessive execution time in DairikiDiff.php to Infinite loops/excessive execution time in diff engine.Aug 11 2019, 9:23 PM
Aklapper lowered the priority of this task from Medium to Low.
Aklapper removed a subscriber: wikibugs-l-list.
Aklapper subscribed.

(Removed "DairikiDiff" from task summary as that class got split in https://phabricator.wikimedia.org/rMW40552888fc1430516a4ea5925d9c99776982aa7c )

Aklapper changed the subtype of this task from "Task" to "Bug Report".Feb 15 2022, 9:39 PM