1

Tezos on FreeBSD

Running atop a freshly ported Ocaml 4.09.1 that passes tests.

Tezos tests fail for tezos-p2p (cannot bind to listening socket) due to too many file descriptors open.

By watching sysctl kern.openfiles during the tezos-p2p test, it shows pre-test use of 230 fds, and in-test use of over 891000.

I'm new to Ocaml. Any assistance to debug this issue is most welcome.

3
  • What is tezos-p2p? That's not a binary that comes with the code AFAIK.
    – utdrmac
    Apr 10 '20 at 1:52
  • It is the "public_name" value from src/lib_p2p/dune, and corresponds to the directory _build/install/default/lib/tezos-p2p Apr 10 '20 at 10:07
  • Make sure you are on most recent code checkout hash: 06398944
    – utdrmac
    Apr 10 '20 at 12:35
1

Make sure you are on most recent code checkout hash: $ git log -1 should give you the hash: 0639894412 (Feb 11 2020)

I just did a complete rebuild of the source and I do not have tezos-p2p in the path you specified. This, $ find ./ -iname tezos-p2p, returns no results in the entire code tree.

Additionally, looking at the build file (dune file) it says this is a library, not a binary to be executed. The core binaries are built in the root source directory, not within _build.

These are the only binaries to be ran: tezos-accuser-005-PsBabyM1 tezos-accuser-006-PsCARTHA tezos-admin-client tezos-baker-005-PsBabyM1 tezos-baker-006-PsCARTHA tezos-client tezos-codec tezos-endorser-005-PsBabyM1 tezos-endorser-006-PsCARTHA tezos-node tezos-protocol-compiler tezos-signer tezos-validator

4
  • On advice from Tezos, I'm working from the master branch. I pulled from commit 5d50f7a5ab400ae857c0478fa29fa135954fb6ba from March 31. Apr 10 '20 at 17:55
  • On advice from Tezos, I'm working from the master branch. I pulled from commit 5d50f7a5ab400ae857c0478fa29fa135954fb6ba from March 31. The tezos-p2p is not an executable, but a test target name from their Makefile (full target is tezos-p2p.test). My run of your find commands gives me ./_build/install/default/lib/tezos-p2p Thanks for the help! Apr 10 '20 at 18:03
  • Ok. So my answer above of making sure you are on the correct git checkout is valid then? That test target must only exist on the master branch and not on the mainnet branch then. If above is good, please mark as answered. Thanks.
    – utdrmac
    Apr 11 '20 at 1:07
  • The issue was an unstated dependency on IPv6, which was not enabled on the host. Apr 11 '20 at 13:16
1

The code uses IPv6, which must be enabled on the host, and was not in my case.

2
  • Very odd. IPV6 is not enabled on any of my nodes (Ubuntu/CentOS) and they've been tezos operational for over 1.5yrs. Must be a FreeBSD thing.
    – utdrmac
    Apr 11 '20 at 13:53
  • The test code assumes that ipv6 to ipv4 mapping is enabled. It is not by default on FreeBSD, even when ipv6 is enabled. Once mapping is enabled the tests pass. Apr 12 '20 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.