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

Cannot run test using record-rate #686

Closed
3 tasks
aldredb opened this issue Dec 11, 2019 · 4 comments · Fixed by #747
Closed
3 tasks

Cannot run test using record-rate #686

aldredb opened this issue Dec 11, 2019 · 4 comments · Fixed by #747
Assignees
Labels
bug Something isn't working

Comments

@aldredb
Copy link

aldredb commented Dec 11, 2019

Context

I used this YAML file to run a benchmark

---
test:
  clients:
    type: local
    number: 1
  rounds:
  - label: init
    txDuration:
    - 30
    rateControl:
    - type: record-rate
      opts:
        rateController:
          type: fixed-rate
          opts: 
            tps: 50
        pathTemplate: "/hyperledger/caliper/workspace/tx_records_client<C>_round<R>.txt"
        outputFormat: "TEXT"
        logEnd: true
    callback: init.js
monitor:
  type:
  - none
  interval: 1
observer:
  type: local
  interval: 1

Expected Behavior

Benchmark runs successfully

Actual Behavior

I received the error message below:

2019.12.11-00:21:14.093 info  [caliper] [local-client.js] 	Client[2850] encountered an error: TypeError: Cannot read property 'toString' of undefined
    at RecordRateController.init (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/rate-control/recordRate.js:150:78)
    at RateControl.init (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/rate-control/rateControl.js:74:31)
    at CaliperLocalClient.doTest (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/client/caliper-local-client.js:335:34)
2019.12.11-00:21:14.094 error [caliper] [defaultTest] 	------ Failed 'init' testing with the following error ------
    Error: Client encountered error:TypeError: Cannot read property 'toString' of undefined
    at ChildProcess.<anonymous> (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/client/client-orchestrator.js:267:45)
    at ChildProcess.emit (events.js:198:13)
    at emit (internal/child_process.js:832:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
2019.12.11-00:21:14.094 info  [caliper] [caliper-flow] 	---------- Finished Test ----------

2019.12.11-00:21:14.094 info  [caliper] [report-builder] 	### All test results ###
2019.12.11-00:21:14.095 error [caliper] [caliper-flow] 	Error: Error: Table must define at least one row.
    at exports.default.rows (/hyperledger/caliper/node_modules/table/dist/validateTableData.js:25:11)
    at Object.exports.default [as table] (/hyperledger/caliper/node_modules/table/dist/table.js:116:35)
    at Report.printTable (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/report/report.js:133:23)
    at Report.printResultsByRound (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/report/report.js:255:14)
    at Object.module.exports.run (/hyperledger/caliper/node_modules/@hyperledger/caliper-core/lib/caliper-flow.js:119:20)
    at process._tickCallback (internal/process/next_tick.js:68:7)
2019.12.11-00:21:15.096 info  [caliper] [local-observer] 	[init Round 0 Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
Benchmark failure
Error: Benchmark failure
    at Function.handler (/hyperledger/caliper/node_modules/@hyperledger/caliper-cli/lib/benchmark/lib/runBenchmark.js:70:23)
Command failed

Possible Fix

Steps to Reproduce

  1. Use the YAML file to run Caliper

Existing issues

Context

Your Environment

  • Version used: 0.2.0
  • Environment name and version (e.g. Chrome 39, node.js 5.4): docker image hyperledger/caliper:0.2.0
  • Operating System and version (desktop or mobile):
  • Link to your project:
@aklenik
Copy link
Contributor

aklenik commented Jan 8, 2020

@aldredb Will investigate soon

@aklenik aklenik self-assigned this Jan 8, 2020
@stale
Copy link

stale bot commented Feb 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 7, 2020
@stale stale bot closed this as completed Feb 14, 2020
@aklenik
Copy link
Contributor

aklenik commented Feb 28, 2020

@aldredb Yep, there's a bug in the controller. Nice catch!

@aklenik aklenik reopened this Feb 28, 2020
@stale stale bot removed the wontfix This will not be worked on label Feb 28, 2020
@aklenik aklenik added the bug Something isn't working label Feb 28, 2020
@nimaafraz
Copy link

I seem to have a similar issue with caliper v0.4.1 with a different error:

The Error I am getting:

info  [ [worker-orchestrator] ]: 	5 workers prepared, progressing to test phase. %meta%
 info  [ [round-orchestrator] ]: 	Monitors successfully started %meta%
 info  [ [worker-message-handler] ]: 	Worker#0 is starting Round#0 %meta%
 info  [ [worker-message-handler] ]: 	Worker#1 is starting Round#0 %meta%
 info  [ [worker-message-handler] ]: 	Worker#3 is starting Round#0 %meta%
 info  [ [worker-message-handler] ]: 	Worker#4 is starting Round#0 %meta%
 info  [ [worker-message-handler] ]: 	Worker#2 is starting Round#0 %meta%
 error [ [caliper-worker] ]: 	Unexpected error in worker #1: RangeError: Maximum call stack size exceeded
    at Function.resolvePath (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/common/utils/caliper-utils.js:250:18)
    at new RecordRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:79:34)
    at createRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:174:12)
    at new RateControl (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/rateControl.js:57:27)
    at new RecordRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:81:31)
    at createRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:174:12)
    at new RateControl (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/rateControl.js:57:27)
    at new RecordRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:81:31)
    at createRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:174:12)
    at new RateControl (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/rateControl.js:57:27) %meta%
 error [ [worker-message-handler] ]: 	Error while handling "test" message for Worker#1 (15408): RangeError: Maximum call stack size exceeded
    at Function.resolvePath (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/common/utils/caliper-utils.js:250:18)
    at new RecordRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:79:34)
    at createRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:174:12)
    at new RateControl (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/rateControl.js:57:27)
    at new RecordRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:81:31)
    at createRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:174:12)
    at new RateControl (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/rateControl.js:57:27)
    at new RecordRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:81:31)
    at createRateController (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/recordRate.js:174:12)
    at new RateControl (/home/nima/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/rate-control/rateControl.js:57:27) %meta%

My Config file:

simpleArgs: &simple-args
  initialMoney: 10000
  moneyToTransfer: 100
  numberOfAccounts: &number-of-accounts 1000

test:
  name: simple
  description: >-
    This is an example benchmark for Caliper, to test the backend DLT's
    performance with simple account opening & querying transactions.
  workers:
    type: local
    number: 5
  rounds:
    - label: open
      description: >-
        Test description for the opening of an account through the deployed
        contract.
      txNumber: 100000
      rateControl:
        type: record-rate
        opts:
          rateController:
            type: fixed-rate
            opts:
              tps: 450
          pathTemplate: ../tx_records_client<C>_round<R>.txt
          outputFormat: TEXT
          logEnd: true
      workload:
        module: benchmarks/scenario/simple/open.js
        arguments: *simple-args
    - label: open
      description: >-
        Test description for the opening of an account through the deployed
        contract.
      txNumber: 100000
      rateControl:
        type: replay-rate
        opts:
          pathTemplate: ../tx_records_client<C>.txt
          inputFormat: TEXT
          logWarnings: true
          defaultSleepTime: 50
      workload:
        module: benchmarks/scenario/simple/open.js
        arguments: *simple-args

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants