Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and test on ARM64 CPU architecture (#1) #4120

Merged
merged 3 commits into from
Jan 11, 2021
Merged

Conversation

martin-g
Copy link
Contributor

@martin-g martin-g commented Jan 8, 2021

More and more software development is being done on ARM64 CPU architecture.
It would be good if libzmq is being regularly tested on ARM64!

Adds an extra TravisCI job that runs ci_build.sh on arm64/aarch64 CPU architecture.

There is one test failure on ARM64:

FAIL: tests/test_monitor
========================
WARNING: Forced closure of 4 sockets, this is an implementation error unless the test case failed
WARNING: Forced closure of 6 sockets, this is an implementation error unless the test case failed
../../tests/test_monitor.cpp:444:test_monitor_invalid_protocol_fails:PASS
../../tests/test_monitor.cpp:445:test_monitor_basic:PASS
../../tests/test_monitor.cpp:450:test_monitor_versioned_invalid_socket_type:PASS
../../tests/test_monitor.cpp:451:test_monitor_versioned_basic_tcp_ipv4:PASS
../../tests/test_monitor.cpp:452:test_monitor_versioned_basic_tcp_ipv6:PASS
../../tests/test_monitor.cpp:453:test_monitor_versioned_basic_ipc:PASS
../../tests/test_monitor.cpp:295:test_monitor_versioned_basic_tipc:IGNORE: tipc is not available
../../tests/test_monitor.cpp:456:test_monitor_versioned_stats_tcp_ipv4:PASS
../../tests/test_monitor.cpp:457:test_monitor_versioned_stats_tcp_ipv6:PASS
../../tests/test_monitor.cpp:406:test_monitor_versioned_stats_ipc:FAIL: Expected 500 Was 250
-----------------------
10 Tests 1 Failures 1 Ignored 
FAIL
FAIL tests/test_monitor (exit status: 1)

* Build and test on ARM64 CPU architecture

Add an extra TravisCI job that runs `ci_build.sh` on arm64/aarch64 CPU architecture
@bluca
Copy link
Member

bluca commented Jan 8, 2021

Please add a commit with a relicense statement as indicated in https://github.com/zeromq/libzmq/tree/master/RELICENSE

@bluca
Copy link
Member

bluca commented Jan 8, 2021

Do you have an ARM64 dev environment where you can reproduce the test failure? If it fails consistently and it's always red, nobody is going to look at it...

@martin-g
Copy link
Contributor Author

Please add a commit with a relicense statement as indicated in https://github.com/zeromq/libzmq/tree/master/RELICENSE

Done!

@bluca
Copy link
Member

bluca commented Jan 11, 2021

The test is still failing. Could you please at least mark it as allowed to fail?

@martin-g
Copy link
Contributor Author

I was trying to reproduce the failure locally with Docker (with QEMU) and on real aarch64 VM but so far I am not able to reproduce it.
I will mark it allowed to fail if I don't find a way to reproduce it!

test_monitor fails on TravisCI
I wasn't able to reproduce the problem on my aarch64 VM and with Docker+QEMU
@martin-g
Copy link
Contributor Author

I've added the allow_failure entry for arch: arm64

@bluca
Copy link
Member

bluca commented Jan 11, 2021

Thanks. Please bear in mind that unless the issue is fixed, it's very likely nobody will pay attention to the arm64 job.

@bluca bluca merged commit f3eb691 into zeromq:master Jan 11, 2021
@sigiesec
Copy link
Member

I also noticed that test failure when working on #4092. I am not sure, this might actually always fail with IPv6. We just had no job in CI running the IP6 tests before at all, since none of the Intel platform environments has been providing IPv6 support for quite some time now! (So it's really good we now have this job, both for testing ARM and testing IPv6!)

@bluca
Copy link
Member

bluca commented Jan 15, 2021

Didn't we have an old Ubuntu Precise that did that too? Maybe it was removed

@sigiesec
Copy link
Member

Yes, at some point we had a job that did this, but Travis removed the support for IPv6 on all Intel/AMD platforms quite some time ago. Not sure exactly when. The current support is listed here: https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system

@bluca
Copy link
Member

bluca commented Jan 15, 2021

Ah I see, that's too bad

@martin-g
Copy link
Contributor Author

Do you know how I can verify that IPv6 is the problem for test_monitor IPC ?
I have a ARM64 machine with Ubuntu 20.04.1 and I just tried:

$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.all.disable_policy=1

$ sudo sysctl -a | grep ipv6 | grep disable
(standard input):21:(standard input):715:net.ipv6.conf.all.disable_ipv6 = 1
(standard input):22:(standard input):716:net.ipv6.conf.all.disable_policy = 1
(standard input):70:(standard input):764:net.ipv6.conf.default.disable_ipv6 = 1
(standard input):71:(standard input):765:net.ipv6.conf.default.disable_policy = 1
(standard input):119:(standard input):813:net.ipv6.conf.docker0.disable_ipv6 = 1
(standard input):120:(standard input):814:net.ipv6.conf.docker0.disable_policy = 0
(standard input):168:(standard input):862:net.ipv6.conf.eth0.disable_ipv6 = 1
(standard input):169:(standard input):863:net.ipv6.conf.eth0.disable_policy = 0
(standard input):217:(standard input):911:net.ipv6.conf.lo.disable_ipv6 = 1
(standard input):218:(standard input):912:net.ipv6.conf.lo.disable_policy = 0

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether fa:16:3e:51:46:15 brd ff:ff:ff:ff:ff:ff
    altname enp4s0
    inet 192.168.0.232/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0
       valid_lft 70201sec preferred_lft 70201sec
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:01:bc:2e:58 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

No inet6 entries in ip a's output!

Then I ran env BUILD_TYPE=default IPv6=ON ./ci_build.sh but the test passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants