Bugs / Issues: Browse | Submit New | Admin

[#22456] Segfault while uploading large files

Date:
2008-10-16 19:11
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Segfault while uploading large files

Detailed description
Hello, I use ruby enterprise 1.8.6-20080810 with passenger 2.0.3. Yesterday I installed redmine 0.7.3 (www.redmine.org)
and I've got a problem uploading big files (8 MB). Log /var/log/apache2/error.log says:

/home/projectsrailsycz/home/projectsrailsycz/app/releases/1_redmine_0.7.3/app/models/attachment.rb:88: [BUG] Segmentation
fault
ruby 1.8.6 (2008-08-08) [x86_64-linux]

[Thu Oct 16 21:07:14 2008] [error] [client 89.185.247.100] Premature end of script headers: kralmap, referer:
https://projects.igloonet.cz/projects/add_file/kralmap

Double /home in path is ok... If you need any other information, please ask for them.

Does anyone know what can I do with it? I really don't want to switch back to original ruby interpret.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-04-23 15:40
Sender: Ruslan Kyrychuk

Have similar situation.
Passenger 2.1.2, ruby 1.8.6 (2008-08-08) SUSE 32bit

My steps are following:
1. Upload file to server.
2. Copy to temp folder with changing extension.
3. Creating http post with references to file
 
Net::HTTP.start(url.host, url.port) { |http|
 http.post(path, attributes_for_multipart_post(attributes), 
 http_headers_for_multipart)
}

4. def self.attributes_for_multipart_post(params)
    fp = []
    params.each {|k,v|
      if v.respond_to?(:read)
        fp.push(FileParam.new(k, File.basename(v.path), v.read))
      else
        fp.push(Param.new(k,v))
      end
    }
    query = fp.collect {|p| "--" + BOUNDARY +
"\r\n" + p.to_multipart }.join("") +
"--" + BOUNDARY + "--"
    return query
  end

5. query = fp.collect {|p| "--" + BOUNDARY
+ "\r\n" + p.to_multipart }.join("")
+ "--" + BOUNDARY + "--"

Last point - is line reported to cause segfault
After this line in apache log there is following line

[ pid=1345 file=ext/apache2/Hooks.cpp:546 time=2009-04-23 15:29:43.986
]:
  Backend process 1366 did not return a valid HTTP response.
It returned no data
Date: 2009-03-05 00:28
Sender: Jason LaPier

I can confirm this bug - I posted about it on the passenger mailing
list:
http://groups.google.com/group/phusion-passenger/browse_thread/th
read/451ce61a17006458/20bdab8037e54647?hl=en&lnk=gst&q=up
loads#20bdab8037e54647
Date: 2008-11-26 17:30
Sender: Alexander Senko

This seems to happen in many other cases also - in *VERY* strange
routines:

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/benchmark.rb:306:
[BUG] Segmentation fault
/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/date/format.rb:203:
[BUG] Segmentation fault
/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/yaml.rb:380:
[BUG] Segmentation fault
/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/yaml/rubytypes.r
b:108: [BUG] Segmentation fault

...and so on
Date: 2008-11-26 16:05
Sender: Alexander Senko

Just the same happens while trying to download some files (maybe
large ones?) with RoR running under mod_passenger 2.0.3 + REE
1.8.6-20080810.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item