Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-10356

Fabric peer on ARM (RPI3) - fail upon peer node start command

    XMLWordPrintable

Details

    • Story
    • Status: Closed
    • Medium
    • Resolution: Done
    • None
    • WON'T FIX
    • fabric-peer
    • None
    • Unset
    • Unset
    • Unset

    Description

      I have built all docker images, and fabric tools on RaspberryPi3 - ARM. When building the fabric, i got an int overflow error in file: https://github.com/hyperledger/fabric-amcl/blob/master/amcl/FP256BN/FP.go, line 103. When on your machine this file is at: path-to-fabric/vendor/github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN/FP.go.

      To solve the overflow i cut one half (32) bits from the MConst = MConst >> 32.

      The error from summary happened when testing basic-network of fabric-samples v.1.1.0 on ARMv7l (Raspberry Pi 3). Please, note, that this is not happening on x86_64 architectures, and is probably specifically tied to the 32bit architecture of Raspberry Pi. Maybe it is even connected to the fix i applied when building (described above).

      To recreate the error one must have a 32-bit architecture at hand, then build all the components with make, and download fabric-samples.

      When running start.sh, all containers start normally, except the peer container, which exits after a short period of time. The container exits with an error:

      peer0.org1.example.com | 2018-05-24 10:36:44.886 UTC [nodeCmd] serve -> INFO 026 Starting peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051]
      peer0.org1.example.com | 2018-05-24 10:36:44.899 UTC [nodeCmd] serve -> INFO 027 Started peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051]
      peer0.org1.example.com | panic: runtime error: invalid memory address or nil pointer dereference
      peer0.org1.example.com | [signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x8a38]
      peer0.org1.example.com |
      peer0.org1.example.com | goroutine 77 [running]:
      peer0.org1.example.com | sync/atomic.storeUint64(0x1316b2fc, 0xf5d19e02, 0x15318e4c)
      peer0.org1.example.com | /opt/go/src/sync/atomic/64bit_arm.go:20 +0x3c
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/identity.(*storedIdentity).fetchIdentity(0x1316b2f0, 0x11f12380, 0x1205d940, 0x20)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/identity/identity.go:237 +0xa8
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/identity.(*identityMapperImpl).Get(0x120ad400, 0x1205d940, 0x20, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/identity/identity.go:154 +0xac
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).getOrgOfPeer(0x11eaea50, 0x1205d940, 0x20, 0x20, 0x889f48, 0x0, 0x0)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:1213 +0x40
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).isInMyorg(0x11eaea50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1205d940, 0x20, 0x20, 0x0, ...)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:1206 +0x40
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).gossipBatch.func3(0x889f48, 0x13209de0, 0xd740d0)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:483 +0xd0
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).gossipBatch.func4(0x889f48, 0x13209de0, 0x0)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:486 +0x2c
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.partitionMessages(0x13212f10, 0x1323a948, 0x1, 0x2, 0xd740d0, 0x0, 0x0, 0x1323a948, 0x1, 0x2)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:1328 +0xb8
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).gossipBatch(0x11eaea50, 0x1323a948, 0x1, 0x2)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:522 +0x4bc
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).sendGossipBatch(0x11eaea50, 0x1323a928, 0x1, 0x1)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:445 +0xe0
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).(github.com/hyperledger/fabric/gossip/gossip.sendGossipBatch)-fm(0x1323a928, 0x1, 0x1)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:110 +0x34
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*batchingEmitterImpl).emit(0x1316b920)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/batcher.go:81 +0x10c
      peer0.org1.example.com | github.com/hyperledger/fabric/gossip/gossip.(*batchingEmitterImpl).periodicEmit(0x1316b920)
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/batcher.go:64 +0x48
      peer0.org1.example.com | created by github.com/hyperledger/fabric/gossip/gossip.newBatchingEmitter
      peer0.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/batcher.go:54 +0x130
      peer0.org1.example.com exited with code 2

      I was wondering, whether it is possible to change the files prior to building, and if it is, which files and which parts of the files. I am especially looking at the first one - github.com/hyperledger/fabric/gossip/identity/identity.go. There seem to be some functions of Golang exclusively tied to 64bit numbers, like time.Unix which always returns a 64-bit number.

      This seems to be a high priority bug since the peer cannot be run on any 32-bit architecture systems.

      Attachments

        Activity

          People

            Unassigned Unassigned
            SashaPESIC Sasha PESIC
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: