deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core 2/2] Core: Fixed memory leaks on ruby 1.8.7
Date Fri, 20 Jul 2012 11:54:56 GMT
ACK - though tests fail, I understand the point of these patches is to
fix memory leak - trace for info (108 tests, 299 assertions, 5 failures,
1 errors, 0 skips):


[marios@name server]$ bundle exec rake test
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from deltacloud-core.gemspec:67
.
rm -rf
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/lib/deltacloud/drivers/mock/data
mkdir -p
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/lib/deltacloud/drivers/mock/data
cp -r
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/lib/deltacloud/drivers/mock/data
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/deltacloud-core.gemspec:67
.
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/drivers/base/../../../lib/deltacloud/drivers/.././core_ext/proc.rb:21:
warning: already initialized constant Callback
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/./deltacloud/./core_ext/proc.rb:21:
warning: already initialized constant Callback
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./drivers/.././core_ext/proc.rb:21:
warning: already initialized constant Callback
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/../../../lib/./deltacloud/./core_ext/proc.rb:21:
warning: already initialized constant Callback
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/../../../lib/./sinatra/rack_logger.rb:56:
warning: already initialized constant FORMAT
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/../../../lib/./sinatra/rack_logger.rb:58:
warning: already initialized constant VERBOSE_FORMAT
Run options: --seed 61618

# Running tests:

......../usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/utils.rb:105:
warning: already initialized constant HEX
/usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/utils.rb:107:
warning: already initialized constant TO_REMEMBER
/usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/utils.rb:108:
warning: already initialized constant ASCII
/usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/errors.rb:128:
warning: already initialized constant DEFAULT_CLOSE_ON_4XX_PROBABILITY
/usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/parsers.rb:47:
warning: already initialized constant DEFAULT_XML_LIBRARY
/usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/awsbase.rb:66:
warning: already initialized constant AMAZON_PROBLEMS
/usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/ses/../awsbase/awsbase.rb:86:
warning: already initialized constant DEFAULT_SIGNATURE_VERSION
...................................F.F.....RuntimeError:CreateImageNotSupported
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./helpers/../drivers/mock/mock_driver.rb:133:in
`create_image'
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./drivers/./exceptions.rb:173:in
`call'
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./drivers/./exceptions.rb:173:in
`safely'
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./helpers/../drivers/mock/mock_driver.rb:132:in
`create_image'
/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./collections/images.rb:44
/usr/lib/ruby/gems/1.8/gems/sinatra-rabbit-1.0.10/lib/sinatra/./rabbit/base.rb:385:in
`instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-rabbit-1.0.10/lib/sinatra/./rabbit/base.rb:385:in
`POST /api/images'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in
`compile!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in
`route!'
F.FF................................E....................

Finished tests in 2.284652s, 47.2720 tests/s, 130.8733 assertions/s.

  1) Failure:
test_0005_returns blob metadata(Deltacloud::Collections::Buckets)
[/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/buckets_collection_test.rb:40]:
Expected: "NEWVALUE"
  Actual: nil

  2) Failure:
test_0006_returns blob details on show operation in various
formats(Deltacloud::Collections::Buckets)
[/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/buckets_collection_test.rb:51]:
Expected: 200
  Actual: 404

  3) Failure:
test_0006_allow to create and destroy the new
image(Deltacloud::Collections::Images)
[/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/images_collection_test.rb:46]:
Expected: 201
  Actual: 502

  4) Failure:
test_0005_provides URL to specify new
image(Deltacloud::Collections::Images)
[/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/images_collection_test.rb:39]:
Expected: 200
  Actual: 404

  5) Failure:
test_0004_returns details about driver in various formats with show
operation(Deltacloud::Collections::Images)
[/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/collections/images_collection_test.rb:32]:
Expected: 200
  Actual: 404

  6) Error:
test_0002_advertise the current state using is_state?(Instance):
NoMethodError: is_running?

/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/deltacloud/../../lib/deltacloud/./models/instance.rb:68:in
`method_missing'

/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/server/tests/drivers/models/instance_test.rb:25:in
`test_0002_advertise the current state using is_state?'

108 tests, 299 assertions, 5 failures, 1 errors, 0 skips
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib"
-r./tests/test_helpe...]


On 20/07/12 14:36, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> Minitest library seems to load the 'common.rb' file in collection
> tests repeatly. This cause to require all DC libraries for every test,
> which until a while leads to memory corruption. Note this problem
> can be only observed under Ruby 1.8.7.
> 
> This patch also bumps sinatra-rabbit to 1.0.10 (minor typo fixed there
> to make 1.8.7 tests run smoothly)
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/deltacloud-core.gemspec    |    2 +-
>  server/tests/deltacloud/common.rb |   16 +++++++++-------
>  2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
> index 4b54470..9716427 100644
> --- a/server/deltacloud-core.gemspec
> +++ b/server/deltacloud-core.gemspec
> @@ -68,7 +68,7 @@ Gem::Specification.new do |s|
>    s.add_dependency('rake', '>= 0.8.7')
>    s.add_dependency('haml', '>= 2.2.17')
>    s.add_dependency('sinatra', '>= 0.9.4')
> -  s.add_dependency('sinatra-rabbit', '>= 1.0.7')
> +  s.add_dependency('sinatra-rabbit', '>= 1.0.10')
>    s.add_dependency('crack')
>    s.add_dependency('rack', '>= 1.0.0')
>    s.add_dependency('rack-accept')
> diff --git a/server/tests/deltacloud/common.rb b/server/tests/deltacloud/common.rb
> index 7ba3ec3..23826ad 100644
> --- a/server/tests/deltacloud/common.rb
> +++ b/server/tests/deltacloud/common.rb
> @@ -21,11 +21,13 @@ ENV['RACK_ENV']   = 'test'
>  
>  # Setup Deltacloud::API Sinatra instance
>  #
> -Deltacloud::configure do |server|
> -  server.root_url '/api'
> -  server.version '1.0.0'
> -  server.klass 'Deltacloud::API'
> -  server.logger Rack::DeltacloudLogger.setup(ENV['API_LOG'], ENV['API_VERBOSE'])
> -end
> +unless Deltacloud::config[:deltacloud]
> +  Deltacloud::configure do |server|
> +    server.root_url '/api'
> +    server.version '1.0.0'
> +    server.klass 'Deltacloud::API'
> +    server.logger Rack::DeltacloudLogger.setup(ENV['API_LOG'], ENV['API_VERBOSE'])
> +  end
>  
> -Deltacloud.require_frontend!
> +  Deltacloud.require_frontend!
> +end
> 



Mime
View raw message