Bug 1562177

Summary: test dynamic_lib::tests::test_loading_cosine fails in rust-toolset-7-rust-1.24.0-1.el7
Product: DevTools Reporter: Edjunior Barbosa Machado <emachado>
Component: rustAssignee: Josh Stone <jistone>
Status: CLOSED ERRATA QA Contact: Edjunior Barbosa Machado <emachado>
Severity: unspecified Docs Contact: Vladimír Slávik <vslavik>
Priority: low    
Version: rust-toolset-7CC: jcajka, kanderso, law, tstellar, vslavik
Target Milestone: rc   
Target Release: 2018.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-13 15:24:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Edjunior Barbosa Machado 2018-03-29 17:34:08 UTC
Description of problem:
test dynamic_lib::tests::test_loading_cosine from rust internal testsuite fails in aarch64 and ppc64le for rhel-7.5 and rhel-alt-7.5.
The testcase runs successfully in other archs.

Version-Release number of selected component (if applicable):
rust-toolset-7-rust-1.24.0-1.el7

How reproducible:
100%

Steps to Reproduce:
1. rpmbuild --rebuild rust-toolset-7-rust-1.24.0-1.el7.src.rpm

Actual results:
...
test dynamic_lib::tests::test_loading_cosine ... FAILED                         
                                                                                
failures:                                                                       
                                                                                
---- dynamic_lib::tests::test_loading_cosine stdout ----                        
>       thread 'dynamic_lib::tests::test_loading_cosine' panicked at 'Could not load function cos: /root/rpmbuild/BUILD/rustc-1.24.0-src/build/powerpc64le-unknown-linux-gnu/stage1-rustc/powerpc64le-unknown-linux-gnu/release/deps/rustc_metadata-d7107d2994b77de0: undefined symbol: cos', librustc_metadata/dynamic_lib.rs:97:31
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:                                                                
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace                 
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                   
   1: std::sys_common::backtrace::print                                         
             at libstd/sys_common/backtrace.rs:68                               
             at libstd/sys_common/backtrace.rs:57                               
   2: std::panicking::default_hook::{{closure}}                                 
             at libstd/panicking.rs:381                                         
   3: std::panicking::default_hook                                              
             at libstd/panicking.rs:391                                         
   4: std::panicking::rust_panic_with_hook                                      
             at libstd/panicking.rs:577                                         
   5: std::panicking::begin_panic                                               
             at libstd/panicking.rs:538                                         
   6: std::panicking::begin_panic_fmt                                           
             at libstd/panicking.rs:522                                         
   7: rustc_metadata::dynamic_lib::tests::test_loading_cosine                   
             at librustc_metadata/dynamic_lib.rs:97                             
                                                                                
                                                                                
failures:                                                                       
    dynamic_lib::tests::test_loading_cosine                                     
                                                                                
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out  
...

Comment 2 Josh Stone 2018-04-09 23:27:43 UTC
The test is expecting that libm is already linked in the process, but for whatever reason it is not on those platforms.  The code being tested has nothing to do with cosine per se - it just wants to do some dlsym lookup.

Comment 4 Josh Stone 2018-07-27 16:09:20 UTC
I have upstream PR 52760 to use a more reliable test symbol.

Comment 8 errata-xmlrpc 2018-11-13 15:24:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:3584