Project

General

Profile

Actions

Bug #9984

closed

OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak timeouts on ARM

Added by vo.x (Vit Ondruch) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [armv7hl-linux]
[ruby-core:63367]

Description

Ruby's test suite fails on ARM [1] (originally reported at [2]) with error:

  4) Error:
OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak:
Timeout::Error: execution of assert_no_memory_leak expired
    /builddir/build/BUILD/ruby-2.1.2/test/openssl/test_pkey_rsa.rb:80:in `test_sign_verify_memory_leak'

This seems to be due to low performance of that particular builder. We were able to build ruby by applying this easy fix:

$ sed -i -e 's|20_000|10_000|g' test/openssl/test_pkey_rsa.rb

Nevertheless, I am not sure if this is optimal fix.

[1] https://kojipkgs.fedoraproject.org//work/tasks/4012/7074012/build.log
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1107044#c7


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #9743: memory leak in openssl ossl_pkey_verify leaks memoryClosedzzak (zzak _)Actions

Updated by vo.x (Vit Ondruch) over 10 years ago

  • Related to Bug #9743: memory leak in openssl ossl_pkey_verify leaks memory added

Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago

Hello, Vit

I'd like to extend timeout for the testcase in ruby_2_1 branch, but is it only occurs on 2.1?
Should we care about it on each branch?

Anyway, could you try with the following patch to determine how long does the test take?

diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
index ce9bd60..e0856c5 100644
--- a/test/openssl/test_pkey_rsa.rb
+++ b/test/openssl/test_pkey_rsa.rb
@@ -77,7 +77,7 @@ class OpenSSL::TestPKeyRSA < Test::Unit::TestCase

def test_sign_verify_memory_leak
bug9743 = '[ruby-core:62038] [Bug #9743]'

  • assert_no_memory_leak(%w[-ropenssl], <<-PREP, <<-CODE, bug9743, rss: true)
  • assert_no_memory_leak(%w[-ropenssl], <<-PREP, <<-CODE, bug9743, rss: true, timeout: 30)
    data = 'Sign me!'
    digest = OpenSSL::Digest::SHA512.new
    pkey = OpenSSL::PKey::RSA.new(2048)

Updated by vo.x (Vit Ondruch) over 10 years ago

Thanks for the patch. The test is passing with it.

I have not tested Ruby 2.0, but since the original issue was backported to Ruby 2.0, I'd expect that the fix should be applied there as well.

Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago

  • Status changed from Open to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED

Updated by hsbt (Hiroshi SHIBATA) over 10 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset r47362.


  • test/openssl/test_pkey_rsa.rb (OpenSSL#test_sign_verify_memory_leak):
    added timeout into testcase for low performance environment.
    [Bug #9984][ruby-core:63367]

Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

Backported into ruby_2_1 branch at r47375.

Updated by usa (Usaku NAKAMURA) over 10 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

backported into ruby_2_0_0 at r47494.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0