Bug #9984

OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak timeouts on ARM

Added by Vit Ondruch 8 months ago. Updated 6 months ago.

[ruby-core:63367]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga
ruby -v:ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [armv7hl-linux] Backport:2.0.0: DONE, 2.1: DONE

Description

Ruby's test suite fails on ARM 1 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

Related to Ruby trunk - Bug #9743: memory leak in openssl ossl_pkey_verify leaks memory Open 04/15/2014

Associated revisions

Revision 47362
Added by Hiroshi SHIBATA 6 months ago

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

Revision 47362
Added by Hiroshi SHIBATA 6 months ago

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

Revision 47375
Added by Tomoyuki Chikanaga 6 months ago

merge revision(s) r47362: [Backport #9984]

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

Revision 47494
Added by Usaku NAKAMURA 6 months ago

merge revision(s) 47362: [Backport #9984]

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

History

#1 Updated by Vit Ondruch 8 months ago

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

#2 Updated by Tomoyuki Chikanaga 8 months 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 = ' [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)

#3 Updated by Vit Ondruch 8 months 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.

#4 Updated by Tomoyuki Chikanaga 7 months ago

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

#5 Updated by Hiroshi SHIBATA 6 months ago

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

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]

#6 Updated by Tomoyuki Chikanaga 6 months 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.

#7 Updated by Usaku NAKAMURA 6 months 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.

Also available in: Atom PDF