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

Occasional crash when using the immediate-output flag #52

Open
4 tasks
jarrodharvey opened this issue Oct 26, 2023 · 3 comments
Open
4 tasks

Occasional crash when using the immediate-output flag #52

jarrodharvey opened this issue Oct 26, 2023 · 3 comments

Comments

@jarrodharvey
Copy link

Prerequisites

  • make sure you're are using the latest version by rush -V
    $ rush -V
    rush v0.5.3

Checking new version...
You are using the latest version of rush

  • read the usage (rush -h) and examples
    Done

Describe your issue

  • describe the problem
    When using the immediate output flag, rush will occasionally fail (but the processes it called will continue to run).

The error looks like the below.

panic: runtime error: slice bounds out of range [7998:7994]

goroutine 81 [running]:
github.com/shenwei356/rush/process.(*ImmediateLineWriter).WritePrefixedLines(0xc0003d0000, {0xc0003ba000, 0x1f3e}, 0xc0000ca008)
        /home/shenwei/go/src/github.com/shenwei356/rush/process/process.go:378 +0x625
github.com/shenwei356/rush/process.ImmediateWriter.Write(...)
        /home/shenwei/go/src/github.com/shenwei356/rush/process/process.go:422
io.copyBuffer({0x1408100, 0xc00038c070}, {0x14084e0, 0xc0003e6008}, {0x0, 0x0, 0x0})
        /usr/local/go/src/io/io.go:429 +0x204
io.Copy(...)
        /usr/local/go/src/io/io.go:386
os/exec.(*Cmd).writerDescriptor.func1()
        /usr/local/go/src/os/exec/exec.go:560 +0x3a
os/exec.(*Cmd).Start.func2(0x0?)
        /usr/local/go/src/os/exec/exec.go:717 +0x32
created by os/exec.(*Cmd).Start
        /usr/local/go/src/os/exec/exec.go:716 +0xab3
  • provide a reproducible example

Unfortunately, the python script that rush is calling is my company's IP so I cannot provide it to support repro. I can, however, provide the rush command that I'm using if that helps.

cat parallel.txt | rush 'python main.py find_results/{}.txt extraction_results/{} debug' -c -I --eta

Note that it seems to work well for a while after running this command before failing at a seemingly random point in time.

shenwei356 added a commit that referenced this issue Oct 26, 2023
@shenwei356
Copy link
Owner

shenwei356 commented Oct 26, 2023

@jarrodharvey
Copy link
Author

Amazing thank you Wei that was fast. Appreciate the effort.

Unfortunately I'm on Windows, and the python script only works on windows, so can't make use of these. Looking forward to the windows fix once it's ready.

@shenwei356
Copy link
Owner

shenwei356 commented Oct 27, 2023

@jarrodharvey Oh, I'm sorry for forgetting the Windows version. It's updated now.

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

No branches or pull requests

2 participants