Last modified: 2012-04-20 20:03:02 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 T36934, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34934 - Unable to move a corrupt file on commons: [[:commons:File:Нева.jpg]]
Unable to move a corrupt file on commons: [[:commons:File:Нева.jpg]]
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Aaron Schulz
:
Depends on: 36132
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-03 15:27 UTC by Rainer Rillke @commons.wikimedia
Modified: 2012-04-20 20:03 UTC (History)
4 users (show)

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


Attachments

Description Rainer Rillke @commons.wikimedia 2012-03-03 15:27:17 UTC
The first revision is missing and I can't delete this revision. Moving the whole file also fails. If it would not be in use, I would try to temporarily delete the whole file and restore only the non-corrupt version. But Commons Delinker is very fast :P

http://commons.wikimedia.org/wiki/File:Нева.jpg

The person requesting the move wanted one of the following new names:
* File:Neva River and Palace Embankment, 2009-07-24.jpg
* File:Вид на Неву и Дворцовую наб. с Троицкого моста, 2009-07-24.jpg
Comment 1 Paul Kaganer 2012-03-03 23:11:51 UTC
Another example:
http://commons.wikimedia.org/wiki/File:Viestura_ordenis.jpg (uploads 2009-02-14)
Comment 2 Paul Kaganer 2012-03-03 23:45:34 UTC
See also full list of files with empty oi_archive_name
http://toolserver.org/~kalan/commons-broken.txt (tab-separated, 1864 row)

(select was "select * from oldimage where oi_archive_name=''")
Comment 3 Rainer Rillke @commons.wikimedia 2012-03-24 14:37:51 UTC
next file that exists but is not shown http://commons.wikimedia.org/wiki/File:Khajuraho_India_-_Lakshman_Temple_-_Sculpture_15.JPG

http://upload.wikimedia.org/wikipedia/commons/archive/f/f4/20120324100019!Khajuraho_India_-_Lakshman_Temple_-_Sculpture_15.JPG


And here it turns out a real problem of the timestamp based storage:
https://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo|info&iiprop=size|timestamp|url&iiurlwidth=365&titles=File:%D0%9D%D0%B5%D0%B2%D0%B0.jpg&iilimit=10&format=jsonfm

{
   "timestamp": "2011-09-23T21:32:56Z",
   "size": 3352071,
   "width": 3072,
   "height": 2304,
   "thumburl": "https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/archive\/a\/a5\/20110923213256%21%D0%9D%D0%B5%D0%B2%D0%B0.jpg\/365px-%D0%9D%D0%B5%D0%B2%D0%B0.jpg",
   "thumbwidth": 365,
   "thumbheight": 274,
   "url": "https:\/\/upload.wikimedia.org\/wikipedia\/commons\/archive\/a\/a5\/20110923213256%21%D0%9D%D0%B5%D0%B2%D0%B0.jpg",
   "descriptionurl": "https:\/\/commons.wikimedia.org\/wiki\/File:%D0%9D%D0%B5%D0%B2%D0%B0.jpg"
},
{
   "timestamp": "2011-09-23T21:32:56Z",
   "size": 3310009,
   "width": 3072,
   "height": 2304,
   "thumburl": "https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/archive\/a\/a5\/\/365px-%D0%9D%D0%B5%D0%B2%D0%B0.jpg",
   "thumbwidth": 365,
   "thumbheight": 274,
   "url": "https:\/\/upload.wikimedia.org\/wikipedia\/commons\/archive\/a\/a5\/",
   "descriptionurl": "https:\/\/commons.wikimedia.org\/wiki\/File:%D0%9D%D0%B5%D0%B2%D0%B0.jpg"
}

Yes, the same timestamp -> result:
comment #1
Comment 4 Rainer Rillke @commons.wikimedia 2012-03-24 14:39:12 UTC
*comment #0 *
Comment 5 Aaron Schulz 2012-04-19 20:37:37 UTC
I ran a cleanup script on all orphaned commons files and didn't fix this particular file row. I'll need to see how many empty oi_archive_name rows are left and consider just deleting those rows.
Comment 6 Platonides 2012-04-19 21:43:07 UTC
Directly deleting the rows? At least you should keep a backup before...
Comment 7 Paul Kaganer 2012-04-20 09:55:55 UTC
(In reply to comment #5)
> and consider just deleting those rows.

This will lead to inconsistency with OploadLog, is not?
Comment 8 Paul Kaganer 2012-04-20 09:56:19 UTC
*UploadLog
Comment 9 Paul Kaganer 2012-04-20 10:02:38 UTC
Note what are two difference cases:

Example #1 - http://commons.wikimedia.org/wiki/File:Нева.jpg - empty 'oi_archive_name' value

Example #2 (comment #1) - http://commons.wikimedia.org/wiki/File:Viestura_ordenis.jpg - valid 'oi_archive_name' value, but "File not found" (corrupt file storage)
Comment 10 Rob Lanphier 2012-04-20 18:17:22 UTC
Moving this down in priority only because Aaron is working on what he believes is the root cause (bug 36132), and I want to move this down below that on his list of stuff to do.  With any luck, this will automatically get fixed as a result of that.
Comment 11 Aaron Schulz 2012-04-20 19:27:25 UTC
(In reply to comment #6)
> Directly deleting the rows? At least you should keep a backup before...

Of course. Though I don't plan on doing that anymore after looking at some of the examples more. It nice to at least see some of the history more clearly (without consulting action=history), so I'd prefer to leave the stub rows.

What can be more easily fixed is just changing the doDBUpdates() function of LocalFileMoveBatch. The line "$status->failCount += $total - $affected;" results in negative values in this case, causing the 'imageinvalidfilename' error.
Comment 12 Aaron Schulz 2012-04-20 20:03:02 UTC
Fixed in https://gerrit.wikimedia.org/r/#change,5488.

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


Navigation
Links