Created attachment 594943 [details] memory usage during restore Description of problem: When trying to restore jenkins server snapshot on Windows(ruby-1.9), a process named ruby.exe will use up the system physical memory after hit the 'rhc app snapshot restore -a jenkins' command and return "failed to allocate memory" error with restore failed. Version-Release number of selected component (if applicable): cartridge-jenkins-1.4-0.95.1-1.git.0.f303cda.el6.noarch cartridge-jenkins-client-1.4-0.29.1-1.git.0.edfe387.el6.noarch How reproducible: always Steps to Reproduce: 1.create jenkins server app 2.take snapshot for this app 3.try to restore the snapshot for this app Actual results: ruby.exe use up the system physical memory(see attachment) and restore failed. C:\Users\Administrator>rhc app snapshot restore -a jenkins -p123123 -d Submitting form: rhlogin: bmeng debug: true Contacting https://int.openshift.redhat.com C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby.rb:416:in `[ ]=': failed to allocate memory (NoMemoryError) from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby .rb:416:in `codes' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby .rb:364:in `dynamic_codes' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby .rb:260:in `inflate' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby .rb:580:in `initialize' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby .rb:605:in `new' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/vendor/zliby .rb:605:in `open' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc/targz.rb:26: in `contains' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/lib/rhc-common.rb:88 0:in `snapshot_restore' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/bin/rhc-app:398:in ` save_or_restore_snapshot' from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.95.5/bin/rhc-app:513:in ` <top (required)>' from C:/Ruby193/bin/rhc-app:23:in `load' from C:/Ruby193/bin/rhc-app:23:in `<main>' Expected results: Snapshot should be restored successfully without any error. Additional info: This issue does not occur on Fedora 17 with ruby 1.9. This issue does not occur for other types of apps.
Reading things into memory? Memory leak?
Fixed. We removed for now the .tar.gz snapshot file from client when on Windows, since it was causing file locks and/or memory leaks.
Verified on rhc-0.95.13, issue has been fixed. C:\Users\Administrator\Desktop>rhc app snapshot restore -a jenkins Password: Restoring from snapshot jenkins.tar.gz... Stopping application... Waiting for stop to finish Done Removing old data dir: ~/jenkins/app-root/data/* Restoring ~/app-root/data Starting application... Done Terminating...