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

Getting Writer Error when trying to execute gauge command in different processes #2301

Open
kamal-kaur04 opened this issue Nov 7, 2022 · 1 comment

Comments

@kamal-kaur04
Copy link

kamal-kaur04 commented Nov 7, 2022

Describe the bug
I'm trying to run multiple environments in parallel by spawning child processes (number of environments present) but I'm getting Logger Failure (might be because different processes trying to write in a file). Please look into the error below -

panic: send on closed channel

goroutine 10 [running]:
github.com/getgauge/gauge/logger.CustomWriter.Write({{0x182a580, 0xc0000528c0}, 0xc0000446c0}, {0xc000408000, 0x7b, 0x8000})
	/private/tmp/gauge-20220122-98976-o3fqiu/gauge-1.4.3/logger/customWriter.go:29 +0x105
io.copyBuffer({0x182a560, 0xc00000e468}, {0x1829da0, 0xc000010298}, {0x0, 0x0, 0x0})
	/usr/local/Cellar/go/1.17.6/libexec/src/io/io.go:425 +0x204
io.Copy(...)
	/usr/local/Cellar/go/1.17.6/libexec/src/io/io.go:382
os/exec.(*Cmd).writerDescriptor.func1()
	/usr/local/Cellar/go/1.17.6/libexec/src/os/exec/exec.go:311 +0x3a
os/exec.(*Cmd).Start.func1(0xc000100600)
	/usr/local/Cellar/go/1.17.6/libexec/src/os/exec/exec.go:441 +0x25
created by os/exec.(*Cmd).Start
	/usr/local/Cellar/go/1.17.6/libexec/src/os/exec/exec.go:440 +0x80d

Can you please help me mitigate this issue or try to incorporate feature to run environments in parallel.

To Reproduce
Steps (or project) to reproduce the behavior:

  1. Initialise a gauge project
  2. Run the gauge command
  3. See error
$ gauge init java # or js, python etc
$ gauge run specs

Logs

Paste any log or error messages here

Expected behavior
A clear and concise description of what you expect to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions:

gauge -v
  • OS [e.g. MacOS 10.15.6 (19G2021) please be specific ]
  • Runner info (Please specify the correct version of Java/Node/Python/Dotnet/Ruby)
  • IDE info (If using VS Code or Intellij IDEA)

Additional context
Add any other context about the problem here.

@sriv
Copy link
Member

sriv commented Nov 15, 2022

Try setting different log directories for each environment (https://docs.gauge.org/configuration.html?os=linux&language=csharp&ide=vscode#default-properties-16).

You'll probably need that irrespective of this error, else the log file would get jumbled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants