thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Friedt (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-4594) Unit Tests failing
Date Thu, 28 Jun 2018 01:51:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christopher Friedt updated THRIFT-4594:
---------------------------------------
    Description: 
It seems that the lib/cpp/test suite is not passing when run inside of Alpine Linux 3.8 in
a Docker container.in the 0.11.0 tarball release because this fails in an Alpine Linux 3.8
Docker container.

In any case, I've narrowed the culprits down to the non-portable (NP) class of Mutex initializers.
The failure occurs in unpatched code (and obviously in my CI build recipe, attached).

Currently, I'm working on automating builds of thrift for Alpine Linux 3.8, and they will
likely require "make check" to pass successfully in future versions. Might as well ensure
it works now.

If you want to duplicate my build easily in Docker, you can use the attachment (e.g. tar xpvzf
thrift-ci-build-20180627.tar.xz; cd thrift-20180627; docker build -t foo .)

{noformat}
make check
...
/bin/bash ../../../libtool  --tag=CXX   --mode=link x86_64-alpine-linux-musl-g++ -Wall -Wextra
-pedantic -Os -fomit-frame-pointer -L/usr/lib -Wl,--no-undefined -o TPipedTransportTest TPipedTransportTest.o
TPipeInterruptTest.o libtestgencpp.la ../../../lib/cpp/libthrift.la /usr/lib/libboost_unit_test_framework.a
/usr/lib/libboost_system.a /usr/lib/libboost_thread-mt.a -lrt -lpthread 
concurrency/MutexTest.o: In function `MutexTest::happy_path::test_method()':
MutexTest.cpp:(.text+0x18): undefined reference to `apache::thrift::concurrency::Mutex::ERRORCHECK_INITIALIZER(void*)'
concurrency/MutexTest.o: In function `MutexTest::recursive_happy_path::test_method()':
MutexTest.cpp:(.text+0x580): undefined reference to `apache::thrift::concurrency::Mutex::RECURSIVE_INITIALIZER(void*)'
concurrency/MutexTest.o: In function `MutexTest::trylock::test_method()':
MutexTest.cpp:(.text+0x1573): undefined reference to `apache::thrift::concurrency::Mutex::ADAPTIVE_INITIALIZER(void*)'
concurrency/MutexTest.o: In function `LFAT::LFAT()':
MutexTest.cpp:(.text._ZN4LFATC2Ev[_ZN4LFATC5Ev]+0x17): undefined reference to `apache::thrift::concurrency::Mutex::ERRORCHECK_INITIALIZER(void*)'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:1190: UnitTests] Error 1
make[5]: *** Waiting for unfinished jobs....
libtool: link: x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer
-Wl,--no-undefined -o .libs/TFDTransportTest TFDTransportTest.o  -L/usr/lib ../../../lib/cpp/.libs/libthrift.so
-lssl -lcrypto /usr/lib/libboost_unit_test_framework.a -lrt -lpthread
libtool: link: x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer
-Wl,--no-undefined -o .libs/TPipedTransportTest TPipedTransportTest.o TPipeInterruptTest.o
 -L/usr/lib ./.libs/libtestgencpp.a /home/alpine/thrift/src/thrift-0.11.0/lib/cpp/.libs/libthrift.so
../../../lib/cpp/.libs/libthrift.so -lssl -lcrypto /usr/lib/libboost_unit_test_framework.a
/usr/lib/libboost_system.a /usr/lib/libboost_thread-mt.a -lrt -lpthread
make[5]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test'
make[4]: *** [Makefile:1507: check-am] Error 2
make[4]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test'
make[3]: *** [Makefile:1510: check] Error 2
make[3]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test'
make[2]: *** [Makefile:1661: check-recursive] Error 1
make[2]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp'
make[1]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib'
make[1]: *** [Makefile:576: check-recursive] Error 1
make: *** [Makefile:659: check-recursive] Error 1
>>> ERROR: thrift*: check failed
>>> ERROR: thrift: all failed
>>> thrift: Uninstalling dependencies..{noformat}

  was:
It seems that the lib/cpp/test suite is broken in the 0.11.0 tagged release because this fails
in Ubuntu Bionic and inside of an Alpine Linux 3.8 Docker container.

I would have thought all test suites would pass for tagged releases.

In any case, I've narrowed the culprits down to the non-portable (NP) class of Mutex initializers.
The failure occurs in unpatched code (and obviously in my CI build recipe, attached).

I'd rather not speculate at this point exactly why this problem is happening. Currently my
patching just disables those tests undonditionally, but there should probably be a better
solution used in the end. E.g. better .m4 testing for non-portable pthread features - if they
are actually functional or just stubs.

Currently, I'm working on automating builds of thrift for Alpine Linux 3.8, and they will
likely require "make check" to pass successfully in future versions. Might as well ensure
it works now.

If you want to duplicate my build easily in Docker, you can use the attachment (e.g. tar xpvzf
thrift-ci-build-20180627.tar.xz; cd thrift-20180627; docker build -t foo .)

{noformat}
make check
...
make[5]: Entering directory '/home/cfriedt/Desktop/thrift-20180627/lib/cpp/test'
 Running 54 test cases...
 An error message from getaddrinfo on the console is expected:
 Thrift: Wed Jun 27 20:16:03 2018 getaddrinfo -2: Name or service not known
 * 
 ** 
 *** No errors detected
 PASS: UnitTests
 Running 2 test cases...
 Thrift: Wed Jun 27 20:16:10 2018 ~TFDTransport TTransportException: 'TFDTransport::close():
Bad file descriptor'

 * 
 ** 
 *** No errors detected
 PASS: TFDTransportTest
 Running 1 test case...

 * 
 ** 
 *** No errors detected
 PASS: TPipedTransportTest
 Running 3 test cases...

 * 
 ** 
 *** No errors detected
 PASS: DebugProtoTest
 Running 11 test cases...

 * 
 ** 
 *** No errors detected
 PASS: JSONProtoTest
 Running 17 test cases...

 * 
 ** 
 *** No errors detected
 PASS: OptionalRequiredTest
 Running 4 test cases...

 * 
 ** 
 *** No errors detected
 PASS: RecursiveTest
 Running 1 test case...

 * 
 ** 
 *** No errors detected
 PASS: SpecializationTest
 Running 3 test cases...
 TBinaryProtocol => OK
 TLEBinaryProtocol => OK
 TCompactProtocol => OK

 * 
 ** 
 *** No errors detected
 PASS: AllProtocolsTest
 Running 285 test cases...
 Timeout alarm expired; attempting to unblock transport
 Timeout alarm expired; attempting to unblock transport
 Timeout alarm expired; attempting to unblock transport
 Timeout alarm expired; attempting to unblock transport
 Timeout alarm expired; attempting to unblock transport
 ^CMakefile:1436: recipe for target 'check-TESTS' failed
 make[5]: *** [check-TESTS] Interrupt
 Makefile:1559: recipe for target 'check-am' failed
 make[4]: *** [check-am] Interrupt
 Makefile:1562: recipe for target 'check' failed
 make[3]: *** [check] Interrupt
 Makefile:1658: recipe for target 'check-recursive' failed
 make[2]: *** [check-recursive] Interrupt
 Makefile:580: recipe for target 'check-recursive' failed
 make[1]: *** [check-recursive] Interrupt
 Makefile:663: recipe for target 'check-recursive' failed
 make: *** [check-recursive] Interrupt
{noformat}


> Unit Tests failing
> ------------------
>
>                 Key: THRIFT-4594
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4594
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>    Affects Versions: 0.11.0
>         Environment: Ubuntu Bionic (native)
> alpine:latest (docker)
>            Reporter: Christopher Friedt
>            Priority: Minor
>             Fix For: 0.12.0
>
>         Attachments: thrift-ci-build-20180627.tar.gz
>
>
> It seems that the lib/cpp/test suite is not passing when run inside of Alpine Linux 3.8
in a Docker container.in the 0.11.0 tarball release because this fails in an Alpine Linux
3.8 Docker container.
> In any case, I've narrowed the culprits down to the non-portable (NP) class of Mutex
initializers. The failure occurs in unpatched code (and obviously in my CI build recipe, attached).
> Currently, I'm working on automating builds of thrift for Alpine Linux 3.8, and they
will likely require "make check" to pass successfully in future versions. Might as well ensure
it works now.
> If you want to duplicate my build easily in Docker, you can use the attachment (e.g.
tar xpvzf thrift-ci-build-20180627.tar.xz; cd thrift-20180627; docker build -t foo .)
> {noformat}
> make check
> ...
> /bin/bash ../../../libtool  --tag=CXX   --mode=link x86_64-alpine-linux-musl-g++ -Wall
-Wextra -pedantic -Os -fomit-frame-pointer -L/usr/lib -Wl,--no-undefined -o TPipedTransportTest
TPipedTransportTest.o TPipeInterruptTest.o libtestgencpp.la ../../../lib/cpp/libthrift.la
/usr/lib/libboost_unit_test_framework.a /usr/lib/libboost_system.a /usr/lib/libboost_thread-mt.a
-lrt -lpthread 
> concurrency/MutexTest.o: In function `MutexTest::happy_path::test_method()':
> MutexTest.cpp:(.text+0x18): undefined reference to `apache::thrift::concurrency::Mutex::ERRORCHECK_INITIALIZER(void*)'
> concurrency/MutexTest.o: In function `MutexTest::recursive_happy_path::test_method()':
> MutexTest.cpp:(.text+0x580): undefined reference to `apache::thrift::concurrency::Mutex::RECURSIVE_INITIALIZER(void*)'
> concurrency/MutexTest.o: In function `MutexTest::trylock::test_method()':
> MutexTest.cpp:(.text+0x1573): undefined reference to `apache::thrift::concurrency::Mutex::ADAPTIVE_INITIALIZER(void*)'
> concurrency/MutexTest.o: In function `LFAT::LFAT()':
> MutexTest.cpp:(.text._ZN4LFATC2Ev[_ZN4LFATC5Ev]+0x17): undefined reference to `apache::thrift::concurrency::Mutex::ERRORCHECK_INITIALIZER(void*)'
> collect2: error: ld returned 1 exit status
> make[5]: *** [Makefile:1190: UnitTests] Error 1
> make[5]: *** Waiting for unfinished jobs....
> libtool: link: x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer
-Wl,--no-undefined -o .libs/TFDTransportTest TFDTransportTest.o  -L/usr/lib ../../../lib/cpp/.libs/libthrift.so
-lssl -lcrypto /usr/lib/libboost_unit_test_framework.a -lrt -lpthread
> libtool: link: x86_64-alpine-linux-musl-g++ -Wall -Wextra -pedantic -Os -fomit-frame-pointer
-Wl,--no-undefined -o .libs/TPipedTransportTest TPipedTransportTest.o TPipeInterruptTest.o
 -L/usr/lib ./.libs/libtestgencpp.a /home/alpine/thrift/src/thrift-0.11.0/lib/cpp/.libs/libthrift.so
../../../lib/cpp/.libs/libthrift.so -lssl -lcrypto /usr/lib/libboost_unit_test_framework.a
/usr/lib/libboost_system.a /usr/lib/libboost_thread-mt.a -lrt -lpthread
> make[5]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test'
> make[4]: *** [Makefile:1507: check-am] Error 2
> make[4]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test'
> make[3]: *** [Makefile:1510: check] Error 2
> make[3]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp/test'
> make[2]: *** [Makefile:1661: check-recursive] Error 1
> make[2]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib/cpp'
> make[1]: Leaving directory '/home/alpine/thrift/src/thrift-0.11.0/lib'
> make[1]: *** [Makefile:576: check-recursive] Error 1
> make: *** [Makefile:659: check-recursive] Error 1
> >>> ERROR: thrift*: check failed
> >>> ERROR: thrift: all failed
> >>> thrift: Uninstalling dependencies..{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message