Last modified: 2014-11-03 03:29:15 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 T74345, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72345 - HTML tidy not executed under HHVM; messes up page layouts
HTML tidy not executed under HHVM; messes up page layouts
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: hhvm
: 72343 72357 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-22 08:10 UTC by Michael M.
Modified: 2014-11-03 03:29 UTC (History)
15 users (show)

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


Attachments

Description Michael M. 2014-10-22 08:10:36 UTC
Steps to reproduce:

1. Make sure you have HHVM enabled.
2. Visit any page with incorrectly nested HTML (e.g. [[de:Wikipedia:WikiCon 2015/Umfrage]], if that page gets fixed, just use the sandbox and open some unclosed <div>s)
3. Purge the page.

Expected result:
Tidy fixes the incorrect nesting/missing closing tags etc.

Actual result:
The page layout is messed up, caused by the missing closing tags.

Note that once the incorrect HTML is saved to cache, it also affects non-HHVM views.
Comment 1 Aude 2014-10-22 08:31:12 UTC
on enwiki technical village pump: http://snag.gy/YhWgA.jpg
Comment 2 Dakdada 2014-10-22 09:53:09 UTC
The same issue occurs in a template in fr.wiktionary with HHVM enabled: https://fr.wiktionary.org/w/index.php?title=Mod%C3%A8le:de-nom-f-n&diff=prev&oldid=18645452

Although I can't find an incorrect tag, because the template in question is a bit complicated.
Comment 4 Michael M. 2014-10-22 10:21:27 UTC
(In reply to darkdadaah from comment #2)
> The same issue occurs in a template in fr.wiktionary with HHVM enabled:
> https://fr.wiktionary.org/w/index.php?title=Mod%C3%A8le:de-nom-f-
> n&diff=prev&oldid=18645452
> 
> Although I can't find an incorrect tag, because the template in question is
> a bit complicated.

This is caused by Modèle:de-nom-f-n/Documentation: It contains multiple "selfclosing" <div /> tags, but these are invalid in HTML. If you want the documentation to display correctly even when HTML tidy doesn't work, you have to replace them by <div></div> (I won't be able to give an appropriate French summary for such an edit, so I can't fix it).
Comment 5 Kevin Israel (PleaseStand) 2014-10-22 11:11:56 UTC
This also appears to be the cause of bug 72343.

Also, as I noted there, not all servers seem to be affected, and I see a "Tidy was unable to run" HTML comment in the output.

Assuming that $wgTidyInternal is false (by default, this is the case if extension_loaded( 'tidy' ) returns false), it looks like this can only happen if proc_open() or proc_close() fails when called from MWTidy::execExternalTidy().
Comment 6 Dakdada 2014-10-22 12:58:38 UTC
Michael M.: thanks, the page has been corrected.

I keep here a link to the previous buggy version of the page for future tests (if needed): https://fr.wiktionary.org/w/index.php?title=Mod%C3%A8le:de-nom-f-n/Documentation&oldid=18183655

Also, the html source of the erroneous page contains the message: "Tidy was unable to run". Not that there is any doubt about it now...
Comment 7 Umherirrender 2014-10-22 17:20:13 UTC
*** Bug 72357 has been marked as a duplicate of this bug. ***
Comment 8 Brad Jorsch 2014-10-22 19:09:33 UTC
*** Bug 72343 has been marked as a duplicate of this bug. ***
Comment 9 Brad Jorsch 2014-10-22 19:09:55 UTC
Copying my analysis from bug 72357:

This appears to be bug 72205 (or more correctly, the memory leak in HHVM that bug 72205 exacerbates[1]) filling up memory on the HHVM servers, which is eventually causing the attempt to fork Tidy to fail, which is allowing unbalanced tags in certain pages to corrupt the layout.

[1]: https://phabricator.wikimedia.org/T757

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


Navigation
Links