hyperledger / fabric

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
15.58k stars 8.79k forks source link

github.com/hyperledger/fabric/gossip/service unit-test often fails on fabric v2.4.0 #3120

Open justin-themedium opened 2 years ago

justin-themedium commented 2 years ago

Environments

Procedures:

  1. git clone https://github.com/hyperledger/fabric.git
  2. Enter the fabric directory.
  3. git checkout v2.4.0
  4. git revert 40f90c1feece5e9d696cedd960f2d132d37e18bb commit: 40f90c1fe Fix typo in comment (#3016) (It changes only a comment in gossip/privdata/pvtdataprovider.go)
  5. export TEST_PKGS=github.com/hyperledger/fabric/gossip/service (for testing github.com/hyperledger/fabric/gossip/service only)
  6. make dist-clean clean all
  7. make unit-test (20 times)

Expected: github.com/hyperledger/fabric/gossip/service always succeeds Actual: Pass: 10, Fail: 11

--- FAIL: TestWithStaticDeliverClientLeader (46.02s)
    gossip_service_test.go:628: Failed to establish full channel membership. Only 0 out of 2 peers have full membership
FAIL

--- FAIL: TestLeaderYield (30.03s)
    gossip_service_test.go:628: Failed to establish full channel membership. Only 0 out of 2 peers have full membership
FAIL

--- FAIL: TestWithStaticDeliverClientNotLeader (46.02s)
    gossip_service_test.go:628: Failed to establish full channel membership. Only 0 out of 2 peers have full membership
FAIL

--- FAIL: TestWithStaticDeliverClientBothStaticAndLeaderElection (46.02s)
    gossip_service_test.go:628: Failed to establish full channel membership. Only 0 out of 2 peers have full membership
FAIL

Full Log https://gist.github.com/justin-themedium/8562c733f49d7742b34e193544b34a5b

justin-themedium commented 2 years ago

I also observed this problem in v2.2.4 and main branch

sousoul commented 2 years ago

github.com/hyperledger/fabric/bccsp/factory often ran too long (21m0s) on fabric v2.2.4, have you meet the same problem?

justin-themedium commented 2 years ago

github.com/hyperledger/fabric/bccsp/factory often ran too long (21m0s) on fabric v2.2.4, have you meet the same problem?

I don't recommend using softhsm 2.6.1 on mac(https://github.com/hyperledger/fabric/issues/2960#issuecomment-937781061). You already raised your issue with other one.

Let us focus on this issue in this thread.

yacovm commented 2 years ago

All these tests will disappear once we deprecate gossip's block delivery mechanism anyway

justin-themedium commented 2 years ago

I see. How about LTS(v2.2, ...)? Is that mechanism also going to be deprecated in LTS?

yacovm commented 2 years ago

Of course not, by definition of LTS

justin-themedium commented 2 years ago

You mean that gossip's block delivery mechanism is still alive and kept in LTS. right? if so, It seems LTS still has this problem. Do I need to re-test this procedure on v2.2.4 or release-2.2 branch and attach the full log?

yacovm commented 2 years ago

It's a problem in the test, so it's low priority and I doubt anyone would fix it at this point.