Bug 836097 - restore snapshot to jenkins server on Windows(ruby-1.9) will get "failed to allocate memory" error
Summary: restore snapshot to jenkins server on Windows(ruby-1.9) will get "failed to a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-28 06:26 UTC by Meng Bo
Modified: 2015-05-15 01:59 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-13 23:43:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
memory usage during restore (96.41 KB, image/png)
2012-06-28 06:26 UTC, Meng Bo
no flags Details

Description Meng Bo 2012-06-28 06:26:40 UTC
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.

Comment 1 Clayton Coleman 2012-07-05 22:24:53 UTC
Reading things into memory?  Memory leak?

Comment 2 Fabiano Franz 2012-07-11 21:07:20 UTC
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.

Comment 3 Meng Bo 2012-07-12 10:36:25 UTC
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...


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