Page MenuHomePhabricator

Maximum call stack side exceeded in linter
Closed, ResolvedPublic

Description

From http://localhost:8000/es.wikipedia.org/v3/page/html/Taxonom%C3%ADa/104913080

Seem to happen in the ref linthandler,
https://github.com/wikimedia/parsoid/blob/master/lib/ext/Cite/index.js#L189

when two refs reference each other creating a cycle.

RangeError: Maximum call stack size exceeded
    at lastItem (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/utils/jsutils.js:17:2)
    at Object.getAboutSiblings (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/utils/DOMUtils.js:1586:37)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:889:31)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:903:25)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:903:25)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:903:25)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:903:25)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:903:25)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)
    at findLints (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/wt2html/pp/processors/linter.js:903:25)
    at Object.Ref.lintHandler (/srv/deployment/parsoid/deploy-cache/revs/a95fede9efea415a2d06df41df1e3db0472d4482/src/lib/ext/Cite/index.js:189:3)

Event Timeline

Arlolra raised the priority of this task from Low to High.Jan 20 2018, 3:41 PM
Arlolra updated the task description. (Show Details)

Change 405821 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Fix infinite recursion from linting named ref cycles

https://gerrit.wikimedia.org/r/405821

Change 405821 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Fix infinite recursion from linting named ref cycles

https://gerrit.wikimedia.org/r/405821