Page MenuHomePhabricator

NS_ERROR_NOT_AVAILABLE
Closed, ResolvedPublic

Description

1027 NS_ERROR_NOT_AVAILABLE: 
  11 NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]
   1 NS_ERROR_NOT_AVAILABLE: Component is not available

Details

Related Gerrit Patches:
mediawiki/extensions/UploadWizard : wmf/1.28.0-wmf.18uw.EventFlowLogger: Fix 'NS_ERROR_NOT_AVAILABLE' debug logging
mediawiki/extensions/UploadWizard : masteruw.EventFlowLogger: Fix 'NS_ERROR_NOT_AVAILABLE' debug logging
mediawiki/extensions/UploadWizard : masterFurther improve handling of silly canvas #drawImage exceptions
mediawiki/extensions/UploadWizard : wmf/1.28.0-wmf.16More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions
mediawiki/extensions/UploadWizard : wmf/1.28.0-wmf.15More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions
mediawiki/extensions/UploadWizard : masterMore debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions
mediawiki/extensions/UploadWizard : mastermw.UploadWizardUpload: Improve error handling in #makePreview

Event Timeline

matmarex created this task.Jun 2 2016, 2:32 PM

Per a quick search, errors like this are usually caused by trying to draw an image to canvas before said image is loaded. But I'm pretty sure we correctly wait for that.

I was able to reproduce this. So it seems that Firefox doesn't like when we draw many <video>s to <canvas> in quick succession (or perhaps simultaneously), and we do that for video thumbnailing.

I couldn't reproduce this on the "Upload" step (probably because we only thumbnail one image at a time there), but if one of the videos there fail to thumbnail (or rather, seems to hang forever without actually failing) or the upload is quicker than the thumbnailing and the user proceeds to "Release rights", we try to load all of the missing thumbnails at once and that can apparently trigger this.

I'll try filing this upstream, but I'm not holding my breath, they have quite a list of similar issues… https://bugzilla.mozilla.org/buglist.cgi?quicksearch=%22drawimage%22

For example, this file will fail to thumbnail on Firefox: https://commons.wikimedia.org/wiki/File:Escherichia-coli-SeqA-Structures-Relocalize-Abruptly-upon-Termination-of-Origin-Sequestration-pone.0110575.s009.ogv. It seems to work on Chrome, and plays only a few frames in mplayer. ffmpeg -i says it's broken:

[theora @ 0000000002edd8a0] 7 bits left in packet 82
[ogg @ 0000000002ebb0a0] Broken file, keyframe not correctly marked.
Input #0, ogg, from 'bad.ogv':
  Duration: N/A, start: 1.400000, bitrate: N/A
    Stream #0:0: Video: theora, yuv420p, 1280x720, 25 tbr, 25 tbn, 25 tbc
    Metadata:
      ALBUM           : Escherichia coli SeqA Structures Relocalize Abruptly upon Termination of Origin Sequestration during Multifork DNA Replication
      ARTIST          : Fossum-Raunehaug S, Helgesen E, Stokke C, Skarstad K
      COPYRIGHTS      : Fossum-Raunehaug et al
      LICENSE         : http://creativecommons.org/licenses/by/4.0/
      comment         : Movie of cells containing SeqA-YFP. Movie of SeqA-YFP tagged cells (SF128) from live-cell imaging. Images were acquired every one minute. The YFP fluorescent signals are reported in green.
      DATE            : 2014

Change 299902 had a related patch set uploaded (by Bartosz Dziewoński):
mw.UploadWizardUpload: Improve error handling in #makePreview

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

I attempted to make a reduced test case, but it doesn't seem to be resulting in errors like the real UploadWizard :/ I'm not going to pursue this further, and I won't bother upstream without a simple repro. Here's what I had, if anyone wants to look:

. And for your convenience, here's a set of 110 .ogv files for testing, downloaded from Category:Videos of molecular biology: (500 MB download).

Without the patch, I can reproduce the issue most of the time in UploadWizard by setting mw.UploadWizard.config.maxUploads = 500; in the console to increase the limit of uploads, choosing these 110 video files, waiting for them all to upload (one of them fails to thumbnail) and proceeding to the "Release rights" step.

Impact:

mysql:research@dbstore1002.eqiad.wmnet [log]> select left(timestamp, 8), count(*) from UploadWizardExceptionFlowEvent_11772722
  where event_message like '%NS_ERROR_NOT_AVAILABLE%' group by left(timestamp, 8);
+--------------------+----------+
| left(timestamp, 8) | count(*) |
+--------------------+----------+
| 20150421           |        5 |
| 20150422           |       15 |
| 20150423           |        7 |
| 20150424           |       51 |
| 20150425           |       32 |
| 20150426           |       94 |
| 20150427           |        9 |
| 20150428           |       17 |
| 20150429           |        9 |
| 20150430           |        7 |
| 20150501           |       54 |
| 20150502           |       12 |
| 20150503           |       56 |
| 20150504           |       43 |
| 20150505           |       18 |
| 20150506           |       42 |
| 20150507           |      124 |
| 20150508           |      136 |
| 20150509           |       27 |
| 20150510           |       31 |
| 20150511           |       49 |
| 20150512           |       31 |
| 20150513           |       56 |
| 20150514           |       55 |
| 20150515           |      216 |
| 20150516           |       16 |
| 20150517           |       65 |
| 20150518           |       37 |
| 20150519           |       26 |
| 20150520           |       13 |
| 20150521           |       34 |
| 20150522           |       37 |
| 20150523           |       26 |
| 20150524           |       59 |
| 20150525           |       82 |
| 20150526           |       92 |
| 20150527           |       60 |
| 20150528           |       64 |
| 20150529           |       54 |
| 20150530           |       68 |
| 20150531           |       44 |
| 20150601           |       17 |
| 20150602           |        9 |
| 20150603           |       25 |
| 20150604           |       29 |
| 20150605           |       76 |
| 20150606           |       24 |
| 20150607           |       12 |
| 20150608           |       16 |
| 20150609           |       80 |
| 20150610           |       38 |
| 20150611           |       79 |
| 20150612           |        3 |
| 20150613           |        3 |
| 20150614           |       33 |
| 20150615           |      114 |
| 20150616           |       86 |
| 20150617           |       17 |
| 20150618           |      105 |
| 20150619           |       21 |
| 20150620           |       11 |
| 20150621           |        8 |
| 20150622           |       30 |
| 20150623           |       45 |
| 20150624           |       32 |
| 20150625           |       46 |
| 20150626           |       39 |
| 20150627           |       84 |
| 20150628           |       41 |
| 20150629           |       38 |
| 20150630           |       10 |
| 20150701           |      149 |
| 20150702           |       12 |
| 20150703           |       15 |
| 20150704           |       27 |
| 20150706           |        9 |
| 20150707           |        6 |
| 20150708           |       25 |
| 20150709           |       34 |
| 20150710           |       11 |
| 20150711           |       26 |
| 20150712           |       13 |
| 20150713           |        3 |
| 20150714           |        9 |
| 20150715           |       18 |
| 20150716           |        8 |
| 20150717           |       42 |
| 20150718           |        8 |
| 20150719           |       23 |
| 20150720           |       11 |
| 20150721           |        7 |
| 20150722           |       16 |
| 20150723           |        4 |
| 20150724           |       10 |
| 20150725           |       21 |
| 20150726           |       12 |
| 20150727           |       18 |
| 20150728           |        3 |
| 20150729           |        5 |
| 20150730           |       12 |
| 20150731           |       10 |
| 20150801           |       62 |
| 20150802           |       46 |
| 20150803           |       27 |
| 20150805           |       15 |
| 20150806           |       22 |
| 20150807           |        9 |
| 20150808           |        4 |
| 20150809           |       11 |
| 20150810           |       12 |
| 20150811           |        7 |
| 20150812           |       14 |
| 20150813           |       12 |
| 20150814           |        7 |
| 20150815           |       16 |
| 20150816           |        4 |
| 20150817           |        7 |
| 20150818           |       11 |
| 20150819           |        3 |
| 20150821           |       10 |
| 20150823           |        7 |
| 20150824           |       10 |
| 20150825           |        4 |
| 20150826           |        8 |
| 20150827           |      369 |
| 20150828           |       87 |
| 20150829           |        6 |
| 20150830           |        1 |
| 20150831           |       43 |
| 20150901           |       19 |
| 20150902           |       32 |
| 20150903           |       17 |
| 20150906           |       25 |
| 20150907           |       11 |
| 20150908           |        1 |
| 20150909           |        8 |
| 20150910           |        5 |
| 20150912           |        5 |
| 20150913           |        2 |
| 20150914           |        4 |
| 20150915           |        8 |
| 20150916           |        9 |
| 20150917           |       19 |
| 20150918           |       40 |
| 20150920           |       66 |
| 20150921           |        8 |
| 20150922           |        6 |
| 20150923           |        3 |
| 20150925           |        2 |
| 20150926           |        6 |
| 20150927           |        8 |
| 20150928           |        6 |
| 20150929           |        3 |
| 20150930           |       11 |
| 20151001           |       12 |
| 20151003           |       13 |
| 20151005           |       13 |
| 20151006           |        5 |
| 20151007           |        6 |
(gap here while we weren't logging exceptions)
| 20160519           |        1 |
| 20160520           |        6 |
| 20160522           |        1 |
| 20160523           |        2 |
| 20160524           |       54 |
| 20160525           |        3 |
| 20160527           |       12 |
| 20160528           |        3 |
| 20160529           |        2 |
| 20160530           |        2 |
| 20160531           |        7 |
| 20160601           |     1010 |
| 20160602           |        1 |
| 20160604           |       21 |
| 20160605           |        6 |
| 20160606           |        3 |
| 20160607           |        4 |
| 20160609           |        2 |
| 20160610           |       10 |
| 20160611           |        6 |
| 20160612           |       15 |
| 20160613           |       11 |
| 20160614           |        5 |
| 20160615           |        9 |
| 20160616           |        5 |
| 20160618           |        1 |
| 20160619           |        3 |
| 20160620           |       18 |
| 20160621           |        3 |
| 20160622           |        3 |
| 20160623           |        5 |
| 20160624           |        1 |
| 20160625           |        1 |
| 20160626           |        1 |
| 20160627           |        5 |
| 20160628           |        6 |
| 20160629           |        4 |
| 20160630           |        9 |
| 20160701           |        3 |
| 20160702           |        2 |
| 20160703           |      182 |
| 20160704           |      275 |
| 20160705           |        7 |
| 20160706           |       13 |
| 20160707           |        1 |
| 20160708           |        2 |
| 20160709           |        2 |
| 20160710           |        3 |
| 20160711           |        4 |
| 20160713           |        4 |
| 20160714           |        3 |
| 20160715           |        4 |
| 20160717           |        4 |
| 20160718           |       15 |
| 20160719           |        4 |
+--------------------+----------+
214 rows in set (6.17 sec)

I'm expecting these exceptions to stop now, since I wrapped the only place (I think) where we were generating those in a try…catch.

matmarex triaged this task as Medium priority.Jul 20 2016, 12:38 AM

Change 299902 merged by jenkins-bot:
mw.UploadWizardUpload: Improve error handling in #makePreview

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

matmarex closed this task as Resolved.Jul 26 2016, 10:17 AM
matmarex removed a project: Patch-For-Review.
matmarex reopened this task as Open.Aug 23 2016, 12:27 PM

This doesn't appear to be really resolved :/

mysql:research@dbstore1002.eqiad.wmnet [log]> select left(timestamp, 8), count(*) from UploadWizardExceptionFlowEvent_11772722
  where event_message like '%NS_ERROR_NOT_AVAILABLE%' group by left(timestamp, 8);
+--------------------+----------+
| left(timestamp, 8) | count(*) |
+--------------------+----------+
...
| 20160719           |        4 |
| 20160720           |        2 |
| 20160722           |        1 |
| 20160723           |        2 |
| 20160724           |       11 |
| 20160725           |        7 |
| 20160726           |        4 |
| 20160807           |        2 |
| 20160812           |       25 |
| 20160816           |       62 |
| 20160817           |       55 |
| 20160818           |        6 |
| 20160820           |        1 |
| 20160822           |        9 |
| 20160823           |       15 |
+--------------------+----------+
228 rows in set (10.79 sec)

Change 306562 had a related patch set uploaded (by Bartosz Dziewoński):
More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions

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

Change 306562 merged by jenkins-bot:
More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions

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

Change 306577 had a related patch set uploaded (by Bartosz Dziewoński):
More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions

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

Change 306578 had a related patch set uploaded (by Bartosz Dziewoński):
More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions

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

Change 306577 merged by jenkins-bot:
More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions

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

Change 306578 merged by jenkins-bot:
More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions

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

Mentioned in SAL [2016-08-24T23:35:13Z] <dereckson@tin> Synchronized php-1.28.0-wmf.16/extensions/UploadWizard/resources/: More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions (T136831) (duration: 00m 47s)

Mentioned in SAL [2016-08-24T23:36:29Z] <dereckson@tin> Synchronized php-1.28.0-wmf.15/extensions/UploadWizard/resources: More debug logging for Firefox's 'NS_ERROR_NOT_AVAILABLE' exceptions (T136831) (duration: 00m 49s)

(As if to spite me, it seems that not a single user ran into this exception since the detailed logging was deployed. I'm waiting for this to happen, and to make sure they are correctly caught and logged, to close this task.)

Change 309364 had a related patch set uploaded (by Bartosz Dziewoński):
uw.EventFlowLogger: Fix 'NS_ERROR_NOT_AVAILABLE' debug logging

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

Change 309909 had a related patch set uploaded (by Bartosz Dziewoński):
Further improve handling of silly canvas #drawImage exceptions

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

Change 309364 merged by jenkins-bot:
uw.EventFlowLogger: Fix 'NS_ERROR_NOT_AVAILABLE' debug logging

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

Change 309909 merged by jenkins-bot:
Further improve handling of silly canvas #drawImage exceptions

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

Change 310180 had a related patch set uploaded (by Bartosz Dziewoński):
uw.EventFlowLogger: Fix 'NS_ERROR_NOT_AVAILABLE' debug logging

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

Change 310180 merged by jenkins-bot:
uw.EventFlowLogger: Fix 'NS_ERROR_NOT_AVAILABLE' debug logging

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

matmarex closed this task as Resolved.Sep 13 2016, 7:42 PM
matmarex removed a project: Patch-For-Review.