Skip to content

Thread Blocked When Added Transaction #3373

Closed
@sudo1991

Description

I sent 190 transactions per second to the Besu network.

If a transaction used 337,472 gas in the log, multiple transactions were stored in one block,

Block Gas Limit = 9,007,199,254,740,991(genesis.json "gasLimit" : "0x1fffffffffffff")
Transaction Gas Limit = 1,000,000,000

but a problem occurred when a transaction used 1,222,986 gas in the log.

Block Gas Limit = 9,007,199,254,740,991(genesis.json "gasLimit" : "0x1fffffffffffff")
Transaction Gas Limit = 9,007,199,254,740,991

Transactions are written to the block only if this is the case.
A block is created approximately every 3 minutes and 30 seconds, and only one transaction is recorded in the block.

If the Transaction Gas Limit is less than that value, the following exception occurs.

2022-01-25 14:25:53.191+09:00 | vertx-blocked-thread-checker | WARN  | BlockedThreadChecker | Thread Thread[vert.x-worker-thread-18,5,main]=Thread[vert.x-worker-thread-18,5,main] has been blocked for 666461 ms, time limit is 60000 ms
io.vertx.core.VertxException: Thread blocked
        at app//org.hyperledger.besu.ethereum.eth.transactions.sorter.GasPricePendingTransactionsSorter.addTransaction(GasPricePendingTransactionsSorter.java:92)
        at app//org.hyperledger.besu.ethereum.eth.transactions.sorter.AbstractPendingTransactionsSorter.addLocalTransaction(AbstractPendingTransactionsSorter.java:179)
        at app//org.hyperledger.besu.ethereum.eth.transactions.TransactionPool.addLocalTransaction(TransactionPool.java:142)
        at app//org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.EthSendRawTransaction.response(EthSendRawTransaction.java:79)
        at app//org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcHttpService.process(JsonRpcHttpService.java:725)
        at app//org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcHttpService.lambda$handleJsonSingleRequest$13(JsonRpcHttpService.java:579)
        at app//org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcHttpService$$Lambda$1201/0x0000000840621440.handle(Unknown Source)
        at app//io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
        at app//io.vertx.core.impl.ContextImpl$$Lambda$729/0x0000000840515c40.run(Unknown Source)
        at java.base@11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base@11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base@11.0.13/java.lang.Thread.run(Thread.java:829)

My ibftConfigFile is

{
  "genesis": {
    "alloc": {
      "6f8e4674c80c76833daa6fc1f19343c7a4909de8" : {
        "balance" : "1000000000000000000000000000"
      },
      ...
    },
    "coinbase": "0x0000000000000000000000000000000000000000",
    "config": {
      "chainId": 20211221,
      "muirglacierblock": 0,
      "ibft2": {
        "blockperiodseconds": 1,
        "epochlength": 30000,
        "requesttimeoutseconds": 2
      },
      "contractSizeLimit" : 2147483647
    },
    "messageQueueLimit": 5000000,
    "difficulty": "0x1",
    "gasLimit" : "0x1fffffffffffff",
    "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
    "nonce": "0x0",
    "timestamp": "0x00"
  },
  "blockchain": {
    "nodes": {
      "generate": true,
      "count": 4
    }
  }
}

My bootnode options are

nohup $APP_HOME/bin/besu \
  --genesis-file=$GENESIS_PATH \
  --logging=INFO \
  --data-path=$DATA_DIR \
  --network-id=$NETWORK_ID \
  --rpc-http-host=0.0.0.0 \
  --rpc-http-enabled \
  --rpc-http-port=$RPC_PORT \
  --rpc-http-cors-origins="all" \
  --rpc-http-api=ADMIN,ETH,DEBUG,MINER,NET,TXPOOL,WEB3,IBFT \
  --host-allowlist="*" \
  --p2p-port=$P2P_PORT \
  --tx-pool-max-size=5000000 \
  --min-gas-price=0 \
>> $LOG_FILE 2>&1 &

My other nodes options are

nohup $APP_HOME/bin/besu \
  --genesis-file=$GENESIS_PATH \
  --logging=INFO \
  --data-path=$DATA_DIR \
  --network-id=$NETWORK_ID \
  --rpc-http-host=0.0.0.0 \
  --rpc-http-enabled \
  --rpc-http-port=$RPC_PORT \
  --rpc-http-cors-origins="all" \
  --rpc-http-api=ADMIN,ETH,DEBUG,MINER,NET,TXPOOL,WEB3,IBFT \
  --host-allowlist="*" \
  --p2p-port=$P2P_PORT \
  --min-gas-price=0 \
  --tx-pool-max-size=5000000 \
  --bootnodes=enode://INSERT_ENODE@$BOOTNODE_HOSTNAME:$P2P_PORT \
  --tx-pool-retention-hours=24 \
>> $LOG_FILE 2>&1 &

Versions (Add all that apply)

  • software version: [ besu --version ]
    • besu/v21.10.5/linux-x86_64/openjdk-java-11
  • java version: [ java -version ]
    • openjdk version "11.0.13" 2021-10-19 LTS
  • OS Name & Version: [cat /etc/*release]
    • CentOS Linux release 8.5.2111
  • Kernel Version: [uname -a]
    • Linux ppelblk01 4.18.0-305.25.1.el8_4.x86_64 '#'1 SMP Wed Nov 3 10:29:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Additional Information

Metadata

Assignees

Labels

P4Low (ex: Node doesn't start up when the configuration file has unexpected "end-of-line" character)bugSomething isn't workingcan't reproduce

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions