Defect #4821

Corrupted uploaded files

Added by Erwane Breton almost 11 years ago. Updated almost 11 years ago.

Status:ClosedStart date:2010-02-12
Priority:HighDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Invalid Affected version:

Description

Hi,

when i upload files, like pictures, not always but very often, file is corrupted.
This append on file > 100k

original MD5: 90681e7ef6febf8d6bfaced8254bdda5
uploaded MD5: 5d8ddf89e6c96cbf76d568b3360832dc

file: 268K 12 fév 16:45 100212164555_les_gens_2.jpg

I used the "file module", not document.

# RAILS_ENV=production ruby script/about
About your application's environment
Ruby version              1.8.7 (amd64-freebsd8)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.4
Active Record version     2.3.4
Active Resource version   2.3.4
Action Mailer version     2.3.4
Active Support version    2.3.4
Application root          /exports/www/htdocs/coda-cola.net/phea
Environment               production
Database adapter          mysql
Database schema version   20091114105931

About your Redmine plugins
Google Analytics plugin   0.2.0

Thanks

History

#1 Updated by Erwane Breton almost 11 years ago

I've uploaded 3 times the same file

100212121425_Stocks_et_Suivi_10-02-10.xls     12/02/2010 17:00     250 ko     0     73a0d28a79f0c45a9ce490636d6db3b9
100212121425_Stocks_et_Suivi_10-02-10.xls     12/02/2010 17:00     250 ko     0     005e08d00c0ddb773a273e45eeaa4c89 
100212121425_Stocks_et_Suivi_10-02-10.xls     12/02/2010 16:53     250 ko     1     38d43b8a00d897b527765ef73216e507 

Only the last try is correct (first line)

production log for uploads


Processing ProjectsController#add_file (for ----- at 2010-02-12 16:53:30) [POST]
  Parameters: {"commit"=>"Ajouter", "action"=>"add_file", "authenticity_token"=>"removed", "version_id"=>"", "id"=>"coda-cola", "controller"=>"projects", "attachments"=>{"1"=>{"file"=>#<File:/tmp/RackMultipart20100212-2535-1301211-0>, "description"=>""}}}
Redirected to http://phea.coda-cola.net/projects/coda-cola/files
Completed in 15ms (DB: 2) | 302 Found [http://phea.coda-cola.net/projects/coda-cola/files/new]

Processing ProjectsController#add_file (for ---- at 2010-02-12 17:00:14) [POST]
  Parameters: {"commit"=>"Ajouter", "action"=>"add_file", "authenticity_token"=>"removed", "version_id"=>"", "id"=>"coda-cola", "controller"=>"projects", "attachments"=>{"1"=>{"file"=>#<File:/tmp/RackMultipart20100212-2535-79yvb0-0>, "description"=>""}}}
Redirected to http://phea.coda-cola.net/projects/coda-cola/files
Completed in 14ms (DB: 2) | 302 Found [http://phea.coda-cola.net/projects/coda-cola/files/new]

Processing ProjectsController#add_file (for ---- at 2010-02-12 17:00:32) [POST]
  Parameters: {"commit"=>"Ajouter", "action"=>"add_file", "authenticity_token"=>"removed", "version_id"=>"", "id"=>"coda-cola", "controller"=>"projects", "attachments"=>{"1"=>{"file"=>#<File:/tmp/RackMultipart20100212-2535-1g16ccg-0>, "description"=>""}}}
Redirected to http://phea.coda-cola.net/projects/coda-cola/files
Completed in 14ms (DB: 2) | 302 Found [http://phea.coda-cola.net/projects/coda-cola/files/new]

#2 Updated by Erwane Breton almost 11 years ago

oops, sorry, i forgot some infos

Redmine 0.8.7.devel (MySQL)
(humm ... maybe i should update ...)

#3 Updated by Jean-Philippe Lang almost 11 years ago

Can not reproduce with latest trunk.
Uploading a file > 100KB 3 times gives me the same exact md5 hash.

#4 Updated by Erwane Breton almost 11 years ago

i'm upgrading all my redmines to branches/0.9-stable (r3393) and i'll give some news

#5 Updated by Erwane Breton almost 11 years ago

after upgrading to 0.9-stable, no changes BUT the same installation/database/version work on my devel server and don't on my prod server

Prod Server (FreeBSD 8.0-STABLE 64 bits)

Ruby version              1.8.7 (amd64-freebsd8)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.4
Active Record version     2.3.4
Active Resource version   2.3.4
Action Mailer version     2.3.4
Active Support version    2.3.4
Application root          /exports/www/htdocs/coda-cola.net/phea
Environment               production
Database adapter          mysql
Database schema version   20091227112908

ruby-1.8.7.248,1    An object-oriented interpreted scripting language
ruby18-bdb-0.6.5_1  Ruby interface to Sleepycat's Berkeley DB revision 2 or lat
ruby18-fcgi-0.8.7   FastCGI library for Ruby
ruby18-gems-1.3.5   Package management framework for the Ruby language
ruby18-iconv-1.8.7.248,1 An iconv wrapper class for Ruby
ruby18-mysql-2.8.1  Ruby module for accessing MySQL databases with a C API like
ruby18-rmagick-2.13.0 A Ruby binding for ImageMagick

Devel server (FreeBSD 6.4-STABLE 32 bits)

Ruby version              1.8.7 (i386-freebsd6)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.4
Active Record version     2.3.4
Active Resource version   2.3.4
Action Mailer version     2.3.4
Active Support version    2.3.4
Application root          /usr/www/htdocs/coda-cola/phea
Environment               production
Database adapter          mysql
Database schema version   20091227112908

ruby+nopthreads-1.8.7.160_5,1 An object-oriented interpreted scripting language
ruby18-bdb-0.6.5_1  Ruby interface to Sleepycat's Berkeley DB revision 2 or lat
ruby18-fcgi-0.8.7   FastCGI library for Ruby
ruby18-gems-1.3.5   Package management framework for the Ruby language
ruby18-iconv-1.8.7.160,1 An iconv wrapper class for Ruby
ruby18-mysql-2.8.1  Ruby module for accessing MySQL databases with a C API like
ruby18-rmagick-2.12.2 A Ruby binding for ImageMagick

only the i386 and OS.version change.

It's clear it's not Redmine, so you can close this ticket :(

#6 Updated by Jean-Philippe Lang almost 11 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

OK, thanks for the feedback.

#7 Updated by Erwane Breton almost 11 years ago

i've found the problem, i think, this came from mod_fcgid 2.3.4 (using apache-2.2.14)

after update to 2.3.5, all works fine.

#8 Updated by Jeffrey Jones almost 11 years ago

I gotta admit I haven't seen anyone running mod_fcgid with rails for a long long time. If you can try and look at Passenger (aka mod_rails) for running rails apps on Apache, it will probably avoid things like this in future.

Also available in: Atom PDF