Page MenuHomePhabricator

"Trying to get property 'nextSibling' of non-object" in AnnotationDOMRangeBuilder.php
Closed, ResolvedPublicPRODUCTION ERROR

Description

Logstash query: https://logstash.wikimedia.org/goto/b7d24710f29181cd9e9f9c70bec5e5b3

image.png (516×2 px, 52 KB)

First occurrence on 2022-12-16, only seen on mediawikiwiki.

I only noticed the issue because I was reviewing the logs for a different problem with the same error message (T321317).

Event Timeline

Yikes .. we'll take a look this coming week.

I happened to notice this issue today because it generated ~18M log messages over the course of 20 minutes.

Looks like pretty much all requests to /w/rest.php/www.mediawiki.org/v3/page/pagebundle/Help%3AMagic_words/5943756 ... But, the question is: why are there those many requests to that url? In any case, this is likely an edge case error that we could plug soon.

First estimation: it's not "those many requests to that URL, it's "oops, we have an infinite loop situation going on here". So first, fixing that, and then understanding why it happens in the first place.

This comes from

<translate>The parameter <tvar name=\"1\"><code>nowiki</code</tvar>> usually removes the link around the filepath (which can't be seen in this example).</translate>

(note the interleaving of code and tvar tags.)

Still need to harden against that sort of things, but it's indeed quite edge-casey.

Change 924503 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/services/parsoid@master] Remove infinite loop in AnnotationDOMRangeBuilder

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

@ihurbain I merged the patch to be pragmatic about suppressing the crasher but please consider the open questions left there

Change 924503 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Remove infinite loop in AnnotationDOMRangeBuilder

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

Change 927241 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/vendor@master] Bump parsoid to 0.18.0-a13

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

Change 927241 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.18.0-a13

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

First version of the patch is verified; still need to address some open questions in the patch, so moving back to In Progress column.

Change 954972 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/services/parsoid@master] Remove infinite loop in AnnotationDOMRangeBuilder, take 2

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

Change 954972 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Remove infinite loop in AnnotationDOMRangeBuilder, take 2

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

Change 958428 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump parsoid to 0.18.0-a24

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

Change 958428 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.18.0-a24

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