proc line: 2959: warning: points must have either 4 or 2 values per line
Closed, ResolvedPublic

Description

That comes from Ploticus. Seen in production.

MaxSem created this task.Jun 16 2016, 10:30 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 16 2016, 10:30 PM
hashar added a subscriber: hashar.Sep 1 2016, 1:55 PM

Apparently EasyTimeline saves the error output to mwstore://local-multiwrite/timeline-render/$hash . So maybe we can dig in Swift and see whether we can find something helpful?

I also thought about adding a wfDebug() call whenever there is some error output. Something like:

diff --git a/Timeline.body.php b/Timeline.body.php
index 87e7ec6..d342bb3 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -172,6 +172,8 @@ class Timeline {
                        ] );
                        $err = Sanitizer::decodeCharReferences( $err );

+                       wfDebug("Timeline: error: $err");
+
                        // Now convert back to HTML again
                        $encErr = nl2br( htmlspecialchars( $err ) );
                        $txt = "<div class=\"error\" dir=\"ltr\"><tt>$encErr</tt></div>";

This error seems to occur when there is an issue with input data passed to Ploticus.

We probably need to add more context on this error message, for example to know the calling page.

hashar triaged this task as Low priority.Sep 26 2016, 3:31 PM
elukey added a subscriber: elukey.Oct 13 2016, 8:32 AM

We probably need to add more context on this error message, for example to know the calling page.

Is there anybody that we can ping to implement this idea? :)

One has to introduce the MediaWiki recent logging interface and add a bunch of logging all over the place. It is not that difficult but that takes a while.

I eventually got involved in fixing EasyTimeline bug T22825, so maybe I will next take care of adding logging.

mmodell raised the priority of this task from Low to High.Jan 27 2017, 5:07 PM

Change 335035 had a related patch set uploaded (by Hashar):
[wmf/1.29.0-wmf.9] debug log EasyTimeline error

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

Change 335038 had a related patch set uploaded (by TTO):
Include article name in Ploticus error messages

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

Change 335035 merged by jenkins-bot:
[wmf/1.29.0-wmf.9] debug log EasyTimeline error

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

Mentioned in SAL (#wikimedia-operations) [2017-01-30T15:42:08Z] <hashar@tin> Synchronized php-1.29.0-wmf.9/extensions/timeline/Timeline.body.php: debug log EasyTimeline error - T138036 (duration: 00m 46s)

With the above debug log patch, we get errors from ocwiki such as:

ocwiki 1.29.0-wmf.9 AdHocDebug INFO: Timeline: error: EasyTimeline 1.90<br />
<br />
Timeline generation failed: 7 errors found<br />
Line 62:   bar:1841 from:0 till: 754<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '754' not within range as specified by command Period.<br />
<br />
<br />
Line 69:   bar:1876 from:0 till: 705<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '705' not within range as specified by command Period.<br />
<br />
<br />
Line 76:   bar:1911 from:0 till: 761<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '761' not within range as specified by command Period.<br />
<br />
<br />
Line 77:   bar:1921 from:0 till: 615<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '615' not within range as specified by command Period.<br />
<br />
<br />
Line 78:   bar:1926 from:0 till: 583<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '583' not within range as specified by command Period.<br />
<br />
<br />
Line 79:   bar:1931 from:0 till: 562<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '562' not within range as specified by command Period.<br />
<br />
<br />
Line 80:   bar:1936 from:0 till: 560<br />
<br />
- Plotdata attribute 'till' invalid.<br />
  Date '560' not within range as specified by command Period.<br />
<br />

I found a couple pages showing EasyTimeline errors:

https://oc.wikipedia.org/wiki/Sant_Martin_d%27Entraunas
https://oc.wikipedia.org/wiki/Marmagne_(C%C3%B2sta_d%27Aur)

They are both using the template https://oc.wikipedia.org/wiki/Template:DemogFR

hashar added a comment.EditedJan 30 2017, 3:56 PM

The template looks like:

PlotData=
  color:barra width:14 align:left
  bar:1793 from:0 till: {{#ifeq:{{{1793|}}}||1|{{{1793|}}}}}
  bar:1800 from:0 till: {{#ifeq:{{{1800|}}}||1|{{{1800|}}}}}
                       ^

I believed the extra space leads to bar:1872 from:0 till: 510 and thus the Plotdata attribute 'till' invalid.. It is not it.

Actual error shows up like:

Line 68: bar:1872 from:0 till: 584

- Plotdata attribute 'till' invalid.

 Date '584' not within range as specified by command Period.

The model eventually invokes:

{{Timeline/Talha|{{{2009}}}|{{{max|{{{1821|{{{1836|0}}}}}}}}}}}

https://oc.wikipedia.org/w/index.php?title=Mod%C3%A8l:Timeline/Talha&action=edit

Eventually in https://oc.wikipedia.org/wiki/Sant_Martin_d%27Entraunas I have passed a parameter max to the Demografia template and that fixed the rendering :]

Another use case: https://fr.wikipedia.org/wiki/Arrondissement_de_Gourdon which use a similar template and ends up being bugged due to max.

Change 335374 had a related patch set uploaded (by Hashar):
Extract hash mecanism to a standalone method

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

I am slightly enhancing timeline so we can eventually have nice structured logging. Might help later on. Notably the error output is sent to Swift which is rather inconvenient. Might as well just push it to logstash.

Change 335374 merged by jenkins-bot:
Extract hash mecanism to a standalone method

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

Change 335238 abandoned by Hashar:
Add structured logging

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

hashar added a comment.Jun 6 2017, 2:24 PM

I have abandoned this task sorry.

Tgr closed this task as Resolved.Oct 26 2017, 7:03 PM
Tgr claimed this task.
Tgr added a subscriber: Tgr.

Per T157646#3695779, should be fixed now.