Last modified: 2013-05-01 01:22:33 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 T41221, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39221 - Inconsistent state within the internal storage backends
Inconsistent state within the internal storage backends
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Media storage (Other open bugs)
unspecified
All All
: Highest blocker with 5 votes (vote)
: ---
Assigned To: Aaron Schulz
:
: 37213 39260 39952 (view as bug list)
Depends on:
Blocks: 38648 39483
  Show dependency treegraph
 
Reported: 2012-08-10 11:17 UTC by Yann Forget
Modified: 2013-05-01 01:22 UTC (History)
28 users (show)

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


Attachments

Comment 1 Rob Lanphier 2012-08-10 18:32:13 UTC
Aaron is working on this one.
Comment 2 Aaron Schulz 2012-08-10 19:41:43 UTC
Some of these files don't have previous versions. What where you reverting to for those?
Comment 3 Aaron Schulz 2012-08-10 20:03:52 UTC
Begbroke_Church_-_geograph.org.uk_-_1386361.jpg and St_Tudno%27s_Church_from_the_Lych_Gate_-_geograph.org.uk_-_1419145.jpg had NFS files with bad permissions. They were fixed.
Comment 4 Yann Forget 2012-08-11 05:40:32 UTC
I was reverting those which have a previous version.
Comment 5 matanya 2012-08-11 20:16:44 UTC
*** Bug 39260 has been marked as a duplicate of this bug. ***
Comment 6 Aaron Schulz 2012-08-12 23:32:56 UTC
(In reply to comment #3)
> Begbroke_Church_-_geograph.org.uk_-_1386361.jpg and
> St_Tudno%27s_Church_from_the_Lych_Gate_-_geograph.org.uk_-_1419145.jpg had NFS
> files with bad permissions. They were fixed.

Error messages is gone.
Comment 7 Fastily 2012-08-12 23:39:23 UTC
This is still broken:

http://commons.wikimedia.org/wiki/File:The_Binks,_South_Queensferry_-_geograph.org.uk_-_253081.jpg

cannot be deleted
Comment 9 Aaron Schulz 2012-08-13 00:07:19 UTC
All of these *_geograph.org.uk_* files have wrong UNIX permissions and are owned by "catrope" instead of "apache".
Comment 10 Fastily 2012-08-13 05:28:09 UTC
So, sudo chown apache *_geograph.org.uk_* ??
Comment 11 Roan Kattouw 2012-08-13 22:28:13 UTC
(In reply to comment #10)
> So, sudo chown apache *_geograph.org.uk_* ??
I'm currently running a find to list all files in the public upload directories (i.e. excluding private wikis and excluding thumbnails, but including archived versions) that aren't owned by the right user. This'll take a few more hours to run, so I'll do a chown based on that list tomorrow.
Comment 12 Roan Kattouw 2012-08-14 19:54:49 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > So, sudo chown apache *_geograph.org.uk_* ??
> I'm currently running a find to list all files in the public upload directories
> (i.e. excluding private wikis and excluding thumbnails, but including archived
> versions) that aren't owned by the right user. This'll take a few more hours to
> run, so I'll do a chown based on that list tomorrow.
This chown has now been running for an hour:
 18:52 RoanKattouw: Running /root/fixownership < /root/badownershipfiles in a screen on ms7

It'll take a while to finish: it's done 152,000 files in the first hour and there are 1.8 million files to fix, so it'll probably take another 11-12 hours.
Comment 13 Fastily 2012-08-15 21:13:12 UTC
Thanks for doing that Roan!  I may have found a similar bug affecting undeletions.  When I tried undeleting http://commons.wikimedia.org/w/index.php?title=File:Afrikaner_Commandos2.JPG , I received the following error: http://commons.wikimedia.org/wiki/File:FileInconsistentStateCommonsError20120815.png

Will this also be fixed by the mass chown?
Comment 14 Roan Kattouw 2012-08-15 21:30:54 UTC
(In reply to comment #12)
> This chown has now been running for an hour:
>  18:52 RoanKattouw: Running /root/fixownership < /root/badownershipfiles in a
> screen on ms7
> 
> It'll take a while to finish: it's done 152,000 files in the first hour and
> there are 1.8 million files to fix, so it'll probably take another 11-12 hours.
This is now done, but there are still some bad files left. Running another find to fix those:

21:19 RoanKattouw: find /export/upload/wik*/*/{0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,archive,math,temp,timeline} ! -user apache -exec chown apache \{\} \;
Comment 15 Roan Kattouw 2012-08-15 21:31:19 UTC
(In reply to comment #13)
> Thanks for doing that Roan!  I may have found a similar bug affecting
> undeletions.  When I tried undeleting
> http://commons.wikimedia.org/w/index.php?title=File:Afrikaner_Commandos2.JPG ,
> I received the following error:
> http://commons.wikimedia.org/wiki/File:FileInconsistentStateCommonsError20120815.png
> 
> Will this also be fixed by the mass chown?
I *think* so, but I'm not sure. Aaron, could you look into that specific file and see what's wrong with it?
Comment 16 Aaron Schulz 2012-08-15 23:55:00 UTC
> $name = "local-public/archive/6/69/20110119133921!Afrikaner_Commandos2.JPG";
...
> var_dump( $nfs->getFileStat( array( 'src' => "mwstore://local-NFS/$name" ) ) );
bool(false)

> var_dump( $swift->getFileStat( array( 'src' => "mwstore://local-swift/$name" ) ) );
array(4) {
  ["mtime"]=>
  string(14) "20120721184844"
  ["size"]=>
  int(123148)
  ["sha1"]=>
  string(31) "lox3gcuif55humxbiq3exjhcu6dg1wt"
  ["latest"]=>
  bool(true)
}

So the file is in Swift but not NFS.
Comment 17 Aaron Schulz 2012-08-16 00:40:38 UTC
I've manually resynced Afrikaner_Commandos2.JPG.
Comment 18 Roan Kattouw 2012-08-16 16:54:02 UTC
(In reply to comment #14)
> This is now done, but there are still some bad files left. Running another find
> to fix those:
> 
> 21:19 RoanKattouw: find
> /export/upload/wik*/*/{0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,archive,math,temp,timeline}
> ! -user apache -exec chown apache \{\} \;
This is now done
Comment 19 Aaron Schulz 2012-08-16 21:21:27 UTC
Any other issues coming up?
Comment 20 material.scientist 2012-08-17 03:49:04 UTC
Please have a look at http://commons.wikimedia.org/wiki/File:D%C4%9B%C4%8D%C3%ADn,_Dlouh%C3%A1_j%C3%ADzda,_pivovarsk%C3%BD_kom%C3%ADn.jpg - this file can't be moved because of: API request failed (unknownerror): Unknown error: "backend-fail-synced". There were more files with the same error a few days ago, but I suppose they became unlocked.
Comment 21 jeremyb 2012-08-19 16:30:48 UTC
Another example in bug 39483.
Comment 23 Yann Forget 2012-08-22 16:52:04 UTC
Again here: http://commons.wikimedia.org/wiki/File:Chordeiles_Gundlachii-.jpg
File can't be deleted.
Comment 24 Yann Forget 2012-08-22 16:59:26 UTC
Again: http://commons.wikimedia.org/wiki/File:Viviane_Batid%C3%A3o.jpg
This starts to be a real problem.
Comment 25 Nemo 2012-08-23 08:43:56 UTC
(In reply to comment #23)
> Again here: http://commons.wikimedia.org/wiki/File:Chordeiles_Gundlachii-.jpg
> File can't be deleted.

This is different, it gives a 404 error (completely missing): different bug?
Another example (by esby): http://commons.wikimedia.org/wiki/File:FMLF_2012-4.JPG
Comment 26 Marco 2012-08-23 10:41:05 UTC
(In reply to comment #25)
> This is different

I also think this is different. Is there already a bug report open?
Comment 27 Nemo 2012-08-23 10:43:17 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > This is different
> 
> I also think this is different. Is there already a bug report open?

I search various components (and moved a bunch of bugs under file management/media storage) but I couldn't find any. I'm not really able to distinguish issues though...
Comment 28 Yann Forget 2012-08-23 11:00:22 UTC
(In reply to comment #23)
> Again here: http://commons.wikimedia.org/wiki/File:Chordeiles_Gundlachii-.jpg
> File can't be deleted.

OK now. File deleted.
Comment 29 Marco 2012-08-24 11:03:31 UTC
I managed to screw up this file by reverting...

https://commons.wikimedia.org/wiki/File:Manastirea_Neamtului_-_July_2008_%2813%29.jpg
Comment 30 Marco 2012-08-24 11:46:37 UTC
(In reply to comment #27)
> (In reply to comment #26)
> > (In reply to comment #25)
> > > This is different
> > 
> > I also think this is different. Is there already a bug report open?
> 
> I search various components (and moved a bunch of bugs under file
> management/media storage) but I couldn't find any. I'm not really able to
> distinguish issues though...

opened bug #39615
Comment 31 Derk-Jan Hartman 2012-08-28 21:20:07 UTC
Error deleting file: The file  "mwstore://local-multiwrite/local-public/6/60/Miley_Cyrus_interpreta_Miley_Stewart.jpg" is in an inconsistent state within the internal storage backends
Comment 32 Yann Forget 2012-08-30 04:08:26 UTC
http://commons.wikimedia.org/w/index.php?title=Special:Undelete&action=submit

This bug is now a real big problem :(
Comment 33 Aaron Schulz 2012-08-30 04:09:09 UTC
(In reply to comment #32)
> http://commons.wikimedia.org/w/index.php?title=Special:Undelete&action=submit
> 
> This bug is now a real big problem :(

That link doesn't go to any specific file.
Comment 35 Túrelio 2012-08-30 15:22:59 UTC
http://commons.wikimedia.org/wiki/File:Miley_Cyrus_interpreta_Miley_Stewart.jpg

Guys, this is really a highly critical bug that needs urgent fixing. The workload of the deleting admins on Commons is already unbearable, it doesn't need to be artifically increased by software bugs.
Comment 36 Yann Forget 2012-08-31 12:19:32 UTC
http://commons.wikimedia.org/wiki/File:Wr%C4%99czenie_Medalu_Targ%C3%B3w_Moje_Dziecko_2012.jpg
Same error, but the image is not visible now.
Comment 38 Rob Lanphier 2012-08-31 18:43:18 UTC
Bumping down priority.  Aaron has another issue which is higher priority than this one.
Comment 39 Sven Manguard 2012-09-01 02:13:58 UTC
Roan told me to report this here.

I tried undeleting File:Rajeev kumar varshney.jpg over on Commons (per OTRS ticket) and got the message 

Error undeleting page

Undelete failed; someone else may have undeleted the page first.

Undeletion will not be performed if it will result in the top page or file revision being partially deleted. In such cases, you must uncheck or unhide the newest deleted revision.

Error undeleting file: The file "mwstore://local-multiwrite/local-public/1/10/Rajeev_kumar_varshney.jpg" is in an inconsistent state within the internal storage backends


First line is larger than the rest, fourth line is in red text. 

Sven
Comment 41 Yann Forget 2012-09-02 12:39:26 UTC
https://commons.wikimedia.org/wiki/Commons:Bistro#Message_d.27erreur_-_upload
With the WLM going, this needs to be fixed now. Thanks.
Comment 43 Marco 2012-09-02 21:13:05 UTC
(In reply to comment #42)
The file is also in an "inconsistent state" if you try to reupload the file. So this is related?
Comment 44 Yann Forget 2012-09-03 05:06:54 UTC
(In reply to comment #42)
> (In reply to comment #40)
> > https://commons.wikimedia.org/wiki/File:Akong_Rinpoche_and_a_monk.jpg
> > Error while creating thumbnails:
> > https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Akong_Rinpoche_and_a_monk.jpg/1280px-Akong_Rinpoche_and_a_monk.jpg
> 
> That's very unlikely to be related.

It is exactly the same error message, and it also concerns a media file.
The evidence shows that it is probably related to this bug.
Comment 45 Yaroslav Blanter 2012-09-03 18:38:58 UTC
Just to point out that today I had a problem renaming a file which had a previous version. The problem is described [http://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard#File:.D0.A6.D0.B5.D1.80.D0.BA.D0.BE.D0.B2.D1.8C_5.JPG here], the file is Церковь5.JPG . I run into a similar problem earlier today, but now I do not remember the file name (it started with Tha and I wanted to rename in into The).
Comment 46 Aaron Schulz 2012-09-03 20:09:16 UTC
(In reply to comment #44)
> (In reply to comment #42)
> > (In reply to comment #40)
> > > https://commons.wikimedia.org/wiki/File:Akong_Rinpoche_and_a_monk.jpg
> > > Error while creating thumbnails:
> > > https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Akong_Rinpoche_and_a_monk.jpg/1280px-Akong_Rinpoche_and_a_monk.jpg
> > 
> > That's very unlikely to be related.
> 
> It is exactly the same error message, and it also concerns a media file.
> The evidence shows that it is probably related to this bug.

Probably, since https://upload.wikimedia.org/wikipedia/commons/4/42/Akong_Rinpoche_and_a_monk.jpg loads but http://upload.wikimedia.org/wikipedia/commons/4/42/Akong_Rinpoche_and_a_monk.jpg is a 404.

When I last looked at them I specifically tried purging first to clear the squids, and then viewed the (https) url that was given here. The file loaded fine, which strongly suggested that it existed and the thumbnail errors were unrelated. However, since the regular http url is a 404 (and adding ?x=1 to the https one doesn't either) that means that file really doesn't exist and that the https squid cache purging is also broken (I still can't get that https link to purge).
Comment 47 Aaron Schulz 2012-09-04 01:43:19 UTC
*** Bug 39952 has been marked as a duplicate of this bug. ***
Comment 48 Aaron Schulz 2012-09-04 17:11:42 UTC
I completed another commons run of syncFileBackend.php, which should have eliminated all such inconsistencies (except for new ones of course).
Comment 49 Rainer Rillke @commons.wikimedia 2012-09-05 16:35:50 UTC
My bot recently uploaded http://commons.wikimedia.org/w/index.php?title=File:Snowcreekwater3web_small_-_West_Virginia_-_ForestWander.jpg

I was unable to delete this file: https://commons.wikimedia.org/w/index.php?title=File:Snowcreekwater3web_small_-_West_Virginia_-_ForestWander.jpg&action=delete
-->

Fehler bei Datei-Löschung: Die Datei  „mwstore://local-multiwrite/local-public/3/36/Snowcreekwater3web_small_-_West_Virginia_-_ForestWander.jpg“  befindet sich, innerhalb des internen Speicher-Backends, in einem  inkonsistenten Zustand.
Comment 50 Marco 2012-09-05 18:55:52 UTC
(In reply to comment #48)
> I completed another commons run of syncFileBackend.php, which should have
> eliminated all such inconsistencies (except for new ones of course).

It seems https://commons.wikimedia.org/wiki/File:EnwikipediagrowthGom.PNG was also not cleared by this run. (It is an old file)
Comment 51 Liangent 2012-09-06 04:08:13 UTC
(12:02:00 PM) liangent: 恢复被删文件时发生错误:文件"mwstore://local-multiwrite/local-public/9/9c/Tencent_QQ.png"在内部存储后端之中处于不一致状态
(12:02:00 PM) liangent: 恢复被删文件时发生错误:文件"mwstore://local-multiwrite/local-deleted/p/h/o/phoiac9h4m842xq45sp7s6u21eteeq1.jpg"在内部存储后端之中处于不一致状态

Two more. The second is on [[zh:File:Monferno.jpg]].
Comment 53 Bartosz Dziewoński 2012-09-09 21:58:49 UTC
Another file from today: https://commons.wikimedia.org/wiki/File:Bierzgłowo_Windmill.jpg

Margoz said he has gotten this error. He was able to upload a new (working) version of the file. Fun fact: Rotatebot claims to have rotated the image, but he's not in the file history. Fun fact 2: the missing image was (according to the uploader) the same, but rotated by 90 degrees; when visiting the page earlier, I got the thumbnail from that one first, then one refresh later the current one (landscape orientation).
Comment 54 Marco 2012-09-10 08:15:06 UTC
(In reply to comment #48)
> I completed another commons run of syncFileBackend.php, which should have
> eliminated all such inconsistencies (except for new ones of course).

Still another old instance: https://commons.wikimedia.org/wiki/File:Geslau_St._Kilian_018.jpg
Comment 56 Marco 2012-09-10 08:38:56 UTC
+1:
https://commons.wikimedia.org/wiki/File:%D0%A1%D0%BE%D0%B4%D0%B5%D1%80%D0%B6%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BA%D0%BD%D0%B8%D0%B3%D0%B8_%D0%BF%D1%80%D0%BE_%D0%BC%D0%B0%D1%82%D1%87_%D1%81%D0%BC%D0%B5%D1%80%D1%82%D0%B8_1959.JPG
As the last three files were also affected by the 404 bug, the two bugs seem most likely to be related to each other.
Comment 57 Rainer Rillke @commons.wikimedia 2012-09-10 10:30:28 UTC
I don't know whether this is related:
https://commons.wikimedia.org/wiki/File:OAB_Neuenbuerg_Ansicht1.png when requesting the full size ( https://upload.wikimedia.org/wikipedia/commons/5/5a/OAB_Neuenbuerg_Ansicht1.png ), I get "404 Not Found" ( File not found: /v1/AUTH_xxxx1b15-ed7a-40b6-b745-47666abf8dxx/wikipedia-commons-local-public.5a/5/5a/OAB_Neuenbuerg_Ansicht1.png )
Comment 58 Marco 2012-09-10 11:26:14 UTC
(In reply to comment #57)
I have added the appropriate cat. (see: bug #39615 )
Comment 59 Trijnstel 2012-09-10 12:18:00 UTC
One more which is probably related to this bug:

https://commons.wikimedia.org/wiki/File:Amnapreet_Sokhi_in_India.jpg
Comment 60 Erik Moeller 2012-09-11 05:02:15 UTC
I'm also encountering this when trying to rename:

https://commons.wikimedia.org/wiki/File:Metrics_9.4.12.theora.ogv

(This was uploaded from the cluster, probably hume, by Roan.)
Comment 61 Fastily 2012-09-11 19:35:41 UTC
Yet another one.  Can't restore:

http://commons.wikimedia.org/w/index.php?title=File:Avendi_Griebnitzsee_8.jpg
Comment 63 Marco 2012-09-12 15:00:28 UTC
again: 404-bug and inconsistent-bug
https://commons.wikimedia.org/wiki/File:Mahabharata02ramauoft_0022_19.jpg

Maybe it would be helpful to create a category where to put the files. Otherwise the comment section will grow unnaturally big.
Comment 64 MZMcBride 2012-09-12 21:28:54 UTC
(In reply to comment #63)
> Maybe it would be helpful to create a category where to put the files.
> Otherwise the comment section will grow unnaturally big.

I guess you could create a category called "Category:Bug 39221" or something, but this is kind of absurd. Uploads need to be completely disabled if this is causing data corruption until the problem can be properly addressed.
Comment 65 Aaron Schulz 2012-09-12 22:27:38 UTC
https://gerrit.wikimedia.org/r/#/c/22494 has been deployed and merged.
Comment 66 Erik Moeller 2012-09-12 22:53:51 UTC
I'm getting a new error now when trying to rename this file:
https://commons.wikimedia.org/wiki/File:Metrics_9.4.12.theora.ogv

You do not have permission to move this page, for the following reason:
Could not write file "mwstore://local-multiwrite/local-public/e/ec/Metrics_9.4.12.theora.ogv" due to insufficient permissions or missing directories/containers.
Comment 67 Roan Kattouw 2012-09-12 23:08:10 UTC
(In reply to comment #66)
> I'm getting a new error now when trying to rename this file:
> https://commons.wikimedia.org/wiki/File:Metrics_9.4.12.theora.ogv
> 
> You do not have permission to move this page, for the following reason:
> Could not write file
> "mwstore://local-multiwrite/local-public/e/ec/Metrics_9.4.12.theora.ogv" due to
> insufficient permissions or missing directories/containers.
That's because I screwed up when importing that file. Fixed the ownership just now.
Comment 68 Erik Moeller 2012-09-12 23:33:28 UTC
That did the trick, thanks.
Comment 69 Aaron Schulz 2012-09-13 03:04:58 UTC
These should basically be gone now, aside from permission errors that require root users to fix, which scripts were run to fix.

That ogv file was recently manually added by an admin with the wrong permissions (which is rare). dcec58e could also be activated even for that case.
Comment 70 Nemo 2012-09-13 10:16:04 UTC
This bug cannot be at the same time resolved and blocker of bug 39615: reopening for now, please close if it's not the cause.
Comment 71 Aaron Schulz 2012-09-14 02:07:51 UTC
(In reply to comment #70)
> This bug cannot be at the same time resolved and blocker of bug 39615:
> reopening for now, please close if it's not the cause.

I don't see how that makes sense. This bug is about people not being able to do
things due to sync errors. Any other problems, like 404s can be separate (which
39615 is already there for).
Comment 72 Nemo 2012-09-14 02:17:35 UTC
Thank you for fixing dependencies.
Comment 73 billinghurst 2012-10-01 11:53:03 UTC
Still some weird happenings

File:St Clement Eastcheap - sword rest - front, close-up - 1394055.duplicate.jpg

View or restore 11 deleted edits?


https://commons.wikimedia.org/wiki/Special:Undelete/File:St_Clement_Eastcheap_-_sword_rest_-_front,_close-up_-_1394055.duplicate.jpg

File says that it is deleted, yet it still shows as an active link, and shows an image. <shrug>
Comment 74 Aaron Schulz 2012-10-01 19:12:04 UTC
Please open a separate bug for that (but also try using the "delete all" link first).
Comment 75 Andre Klapper 2012-12-17 16:07:48 UTC
*** Bug 37213 has been marked as a duplicate of this bug. ***
Comment 76 Tisza Gergő 2013-04-30 21:48:07 UTC
Same error when trying to delete [[hu:Fájl:A Qulto felépítése - 003.jpg]] (originally uploaded 3 days ago):

Error deleting file: The file "mwstore://local-multiwrite/local-public/c/c8/A_Qulto_felépítése_-_003.jpg" is in an inconsistent state within the internal storage backends
Comment 77 MZMcBride 2013-05-01 01:22:33 UTC
(In reply to comment #76)
> Same error when trying to delete [[hu:Fájl:A Qulto felépítése - 003.jpg]]
> (originally uploaded 3 days ago):
> 
> Error deleting file: The file
> "mwstore://local-multiwrite/local-public/c/c8/A_Qulto_felépítése_-_003.jpg"
> is in an inconsistent state within the internal storage backends

Given that it's been a few months, I've split this recent reported issue out into a separate bug: bug 47905. This bug should remain resolved/fixed, as it was fixed in September 2012 (cf. comment 69).

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


Navigation
Links