cppcms icon indicating copy to clipboard operation
cppcms copied to clipboard

test_aio_socket fails (clang-3.9, BeagleBoneBlack)

Open fquindos opened this issue 8 years ago • 7 comments
trafficstars

Built libraries under BBB and only one test failed: test_aio_socket. However, I tested a program I have that uses aio sockets and seems to work fine. Please see LastLog output and compilation environment in bug_report.txt. You have the full make; make test; make install output in compilation.txt Best regards, fquindos

bug_report.txt compilation.txt

fquindos avatar Jul 28 '17 09:07 fquindos

Does this test fails consistently? The error is failure to connect to 127.0.0.1:8080.

Can you add before line 303 TEST(!e) something like that

if(!e)
  std::cerr << e.message() << std::endl;

And see what it prints. Also try to run it with strace

artyom-beilis avatar Jul 29 '17 12:07 artyom-beilis

Yes, it fails consistently.

I've tried adding this two lines, and surprisingly the test passes now this point and fails at line 590 (588 in the original). If I add the same lines before (new) 590, the test passes!

I've run the three versions with strace. Dot.orig is the original code, .303cerr is with your debug message and .303cerr.588cerr the passing one. Hope this helps.

test_aio_socket.strace.303cerr.588cerr.txt test_aio_socket.strace.303cerr.txt test_aio_socket.strace.orig.txt

fquindos avatar Jul 31 '17 07:07 fquindos

Thank You very much I think I know where is the issue. I may ask to do some more tests later.

Artyom

artyom-beilis avatar Jul 31 '17 09:07 artyom-beilis

Can you try same test with debug build? Pass -DCMAKE_BUILD_TYPE=Debug as parameter to cmake and check?

artyom-beilis avatar Jul 31 '17 09:07 artyom-beilis

I had found at least one issue but can't track down the second one in 588 line.

Can you please take the latest master and check it?

Related changeset: https://github.com/artyom-beilis/cppcms/commit/08914fabefcf08bfae923e9b1e3dcb9be41813b8

artyom-beilis avatar Jul 31 '17 15:07 artyom-beilis

The debug build doesn't fail, sorry (same command but without -O2). I'm building the latest master on release and I'll check it tomorrow.

Regards.

fquindos avatar Jul 31 '17 15:07 fquindos

Seems related to the -O2 compilation flag. The new version still fails with that flag, both debug and release: line 303 again, and if printing to cerr, then line 609. Here you have the compilation and test logs for Debug + O2.

If you need me to test something, please let me know.

Regards, fquindos

compile.txt test_aio_socket.303.609.strace.txt test_aio_socket.303.strace.txt test_aio_socket.orig.strace.txt

fquindos avatar Aug 01 '17 12:08 fquindos