-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
panic: runtime error: index out of range [1] with length 1 #1629
Comments
@haroon-sheikh can you please give some more pointers, does this happen intermittently or always ? is multithreading enabled when running in parallel ? PS: new version of gauge-java is release please upgrade and check if that solves the problem |
@NivedhaSenthil This is happening with both multithreading enabled and disabled. I will try it with the new gauge-java and get back to you ASAP. |
@NivedhaSenthil Same error with the latest version of gauge-java 0.7.7. |
are you trying to run data driven scenario with Will be really helpful if you can share some sample project where you see this error. |
Running a simple Unfortunately, I'm not able to share the project. Is there any logs I can provide to aid in investigations? |
@haroon-sheikh I am planning to add some debug logs. Will it be possible for you to build gauge from source and try it out. |
@haroon-sheikh I have pushed some debug logs to debug-1629 branch. |
@negiDharmendra I'm now just getting the following error with your debug branch and gauge-java 0.7.7 11-05-2020 13:42:11.376 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 63848
11-05-2020 13:42:11.479 [Gauge] [DEBUG] Successfully made the connection with runner with port: 63848
11-05-2020 13:42:11.479 [Gauge] [DEBUG] Validation started.
11-05-2020 13:42:11.879 [Gauge] [DEBUG] Validation completed.
11-05-2020 13:42:12.290 [Gauge] [DEBUG] Runner with PID:37993 has exited
11-05-2020 13:42:12.291 [Gauge] [DEBUG] Run started
11-05-2020 13:42:12.292 [Gauge] [DEBUG] Starting Html Report plugin
11-05-2020 13:42:12.308 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 63854
11-05-2020 13:42:12.309 [Gauge] [DEBUG] Successfully made the connection with plugin with port: 63854
11-05-2020 13:42:12.310 [Gauge] [DEBUG] Starting Xml Report plugin
11-05-2020 13:42:12.320 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 63859
11-05-2020 13:42:12.321 [Gauge] [DEBUG] Successfully made the connection with plugin with port: 63859
11-05-2020 13:42:12.321 [Gauge] [INFO] Executing in 8 parallel streams.
11-05-2020 13:42:42.336 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.336 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.337 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.337 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.347 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.347 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.356 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.357 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.357 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.357 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.357 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.357 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.367 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.367 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [DEBUG] Skipping 253 specifications
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.372 [Gauge] [ERROR] Failed to start runner. Timed out connecting to java
11-05-2020 13:42:42.374 [html-report] [DEBUG] Transformed SuiteResult to report structure
11-05-2020 13:42:42.383 [html-report] [CRITICAL] write /Users/has23/workspace/id/project/reports/html-report/index.html: file already closed
11-05-2020 13:42:42.384 [Gauge] [ERROR] Error occurred while waiting for plugin process to finish.
Error : exit status 1
11-05-2020 13:42:42.384 [Gauge] [ERROR] Unable to connect to plugin Html Report 4.0.10. rpc error: code = Unavailable desc = transport is closing
11-05-2020 13:42:42.384 [Gauge] [DEBUG] Killing Plugin Html Report 4.0.10
11-05-2020 13:42:42.384 [Gauge] [ERROR] Failed to kill plugin Html Report 4.0.10. os: process already finished
11-05-2020 13:42:42.386 [xml-report] [INFO] Successfully generated xml-report to => /Users/has23/workspace/id/project/reports/xml-report
11-05-2020 13:42:42.387 [Gauge] [DEBUG] Sending kill message to Xml Report plugin.
11-05-2020 13:42:42.388 [Gauge] [INFO] Specifications: 0 executed 0 passed 0 failed 0 skipped
11-05-2020 13:42:42.388 [Gauge] [INFO] Scenarios: 0 executed 0 passed 0 failed 0 skipped
11-05-2020 13:42:42.388 [Gauge] [INFO] |
@haroon-sheikh Are you able to run a sample project? Which version of java you are working with? |
The sample project is working fine for me. I have a feeling the issue is related to getgauge/gauge-java#433 fix in 0.7.7. |
@haroon-sheikh It will be a great help if you can give us a sample project where we can reproduce this isse. |
@negiDharmendra I've been seeing a lot of these errors for some reason: panic: runtime error: index out of range [2] with length 2
goroutine 490 [running]:
github.com/getgauge/gauge/execution.(*stepExecutor).executeStep(0xc000ea0bb0, 0xc00072a200, 0xc0005d6b40, 0x0)
/home/runner/work/gauge/gauge/execution/stepExecutor.go:43 +0xa11
github.com/getgauge/gauge/execution.(*scenarioExecutor).executeStep(0xc00127a2a0, 0xc00072a200, 0xc0011ba0e0, 0xc000463b20, 0xc0000d0000)
/home/runner/work/gauge/gauge/execution/scenarioExecutor.go:176 +0x174
github.com/getgauge/gauge/execution.(*scenarioExecutor).executeSteps(0xc00127a2a0, 0xc0007f1480, 0xf, 0x10, 0xc00017f9a0, 0xf, 0x14, 0xc000463b20)
/home/runner/work/gauge/gauge/execution/scenarioExecutor.go:154 +0xa6
github.com/getgauge/gauge/execution.(*scenarioExecutor).execute(0xc00127a2a0, 0xc66840, 0xc000098840, 0xc7d1c0, 0xc000463b20)
/home/runner/work/gauge/gauge/execution/scenarioExecutor.go:86 +0x913
github.com/getgauge/gauge/execution.(*specExecutor).executeScenario(0xc0007d4240, 0xc000098840, 0xc000259370, 0x91f5e3, 0x2)
/home/runner/work/gauge/gauge/execution/specExecutor.go:324 +0x26d
github.com/getgauge/gauge/execution.(*specExecutor).executeScenarios(0xc0007d4240, 0xc000259370, 0x2, 0x2, 0x2, 0x1, 0x0, 0x1, 0x0)
/home/runner/work/gauge/gauge/execution/specExecutor.go:281 +0x83
github.com/getgauge/gauge/execution.(*specExecutor).executeTableRelatedScenarios(0xc0007d4240, 0xc000259370, 0x2, 0x2, 0x0, 0x0)
/home/runner/work/gauge/gauge/execution/specExecutor.go:148 +0x82
github.com/getgauge/gauge/execution.(*specExecutor).executeSpec(0xc0007d4240, 0xc000b52160, 0xc000b7d260)
/home/runner/work/gauge/gauge/execution/specExecutor.go:168 +0x190
github.com/getgauge/gauge/execution.(*specExecutor).execute(0xc0007d4240, 0x10101, 0xc0000d2d70)
/home/runner/work/gauge/gauge/execution/specExecutor.go:129 +0x92c
github.com/getgauge/gauge/execution.(*simpleExecution).executeSpecs(0xc0012dc230, 0xc000db5e60, 0xc000a32700, 0x0, 0x0)
/home/runner/work/gauge/gauge/execution/simpleExecution.go:130 +0x193
github.com/getgauge/gauge/execution.(*simpleExecution).execute(0xc0012dc230)
/home/runner/work/gauge/gauge/execution/simpleExecution.go:92 +0x1a4
github.com/getgauge/gauge/execution.(*parallelExecution).startSpecsExecutionWithRunner(0xc0002ca880, 0xc000db5e60, 0xc0008274a0, 0xc7d340, 0xc0000d2d70, 0x2)
/home/runner/work/gauge/gauge/execution/parallelExecution.go:273 +0xa1
github.com/getgauge/gauge/execution.(*parallelExecution).startStream(0xc0002ca880, 0xc000db5e60, 0xc0008274a0, 0x2)
/home/runner/work/gauge/gauge/execution/parallelExecution.go:251 +0x189
created by github.com/getgauge/gauge/execution.(*parallelExecution).executeLazily
/home/runner/work/gauge/gauge/execution/parallelExecution.go:162 +0x81 Gauge version: 1.0.8
Commit Hash: 28617ea
Plugins
-------
html-report (4.0.11)
java (0.7.7)
reportportal (1.7.0)
reportserver (0.2.0)
screenshot (0.0.1)
spectacle (0.1.4)
xml-report (0.2.3) |
@negiDharmendra I've managed to create a project to reproduce this issue. https://github.com/haroon-sheikh/gauge-issues/tree/gauge-1629 if you run it with panic: runtime error: index out of range [2] with length 2
goroutine 104 [running]:
github.com/getgauge/gauge/execution.(*stepExecutor).executeStep(0xc000178c70, 0xc000336c00, 0xc000216960, 0x0)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/stepExecutor.go:32 +0x9ff
github.com/getgauge/gauge/execution.(*scenarioExecutor).executeStep(0xc000132070, 0xc000336c00, 0xc00028d650, 0xc000252240, 0xc000160000)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/scenarioExecutor.go:165 +0x174
github.com/getgauge/gauge/execution.(*scenarioExecutor).executeSteps(0xc000132070, 0xc000328300, 0xe, 0x10, 0xc00060a140, 0xf, 0x14, 0xc000252240)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/scenarioExecutor.go:143 +0xa6
github.com/getgauge/gauge/execution.(*scenarioExecutor).execute(0xc000132070, 0x1844da0, 0xc0004526e0, 0x185b900, 0xc000252240)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/scenarioExecutor.go:75 +0x94e
github.com/getgauge/gauge/execution.(*specExecutor).executeScenario(0xc00010a120, 0xc0004526e0, 0x0, 0x0, 0x1)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/specExecutor.go:312 +0x265
github.com/getgauge/gauge/execution.(*specExecutor).executeScenarios(0xc00010a120, 0xc00052aec0, 0x2, 0x2, 0x2, 0x1, 0x1, 0x0, 0x0)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/specExecutor.go:270 +0x83
github.com/getgauge/gauge/execution.(*specExecutor).executeTableRelatedScenarios(0xc00010a120, 0xc00052aec0, 0x2, 0x2, 0x0, 0x0)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/specExecutor.go:137 +0x82
github.com/getgauge/gauge/execution.(*specExecutor).executeSpec(0xc00010a120, 0xc0006c8160, 0xc00048cd20)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/specExecutor.go:157 +0x190
github.com/getgauge/gauge/execution.(*specExecutor).execute(0xc00010a120, 0x1010101, 0xc000164050)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/specExecutor.go:118 +0x929
github.com/getgauge/gauge/execution.(*simpleExecution).executeSpecs(0xc000132000, 0xc0003a8660, 0x0, 0x0, 0x0)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/simpleExecution.go:123 +0x193
github.com/getgauge/gauge/execution.(*simpleExecution).execute(0xc000132000)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/simpleExecution.go:84 +0x10c
github.com/getgauge/gauge/execution.(*parallelExecution).executeGrpcMultithreaded.func1(0xc0001c6000, 0xc000164050, 0x1)
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/parallelGrpcExecution.go:35 +0xc6
created by github.com/getgauge/gauge/execution.(*parallelExecution).executeGrpcMultithreaded
/private/tmp/gauge-20200704-29582-ed3o73/gauge-1.1.1/execution/parallelGrpcExecution.go:31 +0x21e |
@haroon-sheikh I tried to run the given project but It executed successfully for me Output
Envgauge - 1.1.1 I ran it multiple times, but no luck seeing the mentioned error. |
@BugDiver can you try it with 8 nodes please. My env is: Gauge version: 1.1.1
Plugins
-------
flash (0.0.2)
html-report (4.0.11)
java (0.7.9)
json-report (0.3.3)
reportportal (1.7.0)
reportserver (0.2.0)
screenshot (0.0.1)
spectacle (0.1.4)
xml-report (0.2.3) |
Even with 8 nodes the execution works perfectly fine Output
|
This is really strange, i can reproduce it all the time. Can you try running it via docker please? |
@haroon-sheikh Could you download the gauge artifact (WIP) from https://github.com/getgauge/gauge/actions/runs/216779785 according to your OS, install it, and see if it fixes the issue? |
I'm not able reproduce with this version. 👍 |
Signed-off-by: BugDiver <vinaysh@thoughtworks.com>
Signed-off-by: BugDiver <vinaysh@thoughtworks.com>
* Seperate context execution from steps #1629 Signed-off-by: BugDiver <vinaysh@thoughtworks.com> * Add comments, remove not required assignment. Signed-off-by: BugDiver <vinaysh@thoughtworks.com> Co-authored-by: Srikanth <srikanth.ddit@gmail.com>
Gauge 1.1.2 has been released and that should fix the issue. |
Describe the bug
When running a suite of tests in parallel, following exception is being thrown with latest version of gauge.
What command(s) did you run when you found the bug?
For e.g.
Output, stack trace or logs related to the bug
Versions
Gauge (Output of
gauge -v
)Node.js/Java/Python/.Net/Ruby version
Operating System information
Mac OS
IDE information
The text was updated successfully, but these errors were encountered: