Skip to content

assertion failure using pipes #5904

Closed
green7ea opened this Issue Feb 22, 2014 · 6 comments

3 participants

@green7ea

The following work:
run(ignorestatus(`false`))
run(`true` |> ignorestatus(`false`))

The following don't work:
run(`true` |> ignorestatus(`false`) |> `true`)
run(`true` |> ignorestatus(`false` |> `true`))

@vtjnash
The Julia Language member
vtjnash commented Feb 22, 2014

To clarify, we are throwing an assertion error in test_success since not all processes have exited. I believe this may be a regression due to the scheduler/wait changes.

@vtjnash vtjnash added the bug label Feb 22, 2014
@vtjnash vtjnash added this to the 0.3 milestone Feb 22, 2014
@JeffBezanson
The Julia Language member

I just observed the following:

julia> run(`true` |> ignorestatus(`false`) |> `true`)

julia> run(ignorestatus(`false`))

julia> run(`true` |> ignorestatus(`false`))

julia> run(`true` |> ignorestatus(`false`) |> `true`)
ERROR: assertion failed
 in pipeline_error at process.jl:488
 in run at process.jl:457

It seems to have worked the first time, so there is something stateful here. Could be in the scheduler I guess.

@JeffBezanson
The Julia Language member

Reduced case:

julia> run(ignorestatus(`false`) |> `true`)

julia> run(ignorestatus(`false`) |> `true`)
ERROR: assertion failed
 in pipeline_error at process.jl:488
 in run at process.jl:457
@vtjnash
The Julia Language member
vtjnash commented Feb 22, 2014

I thought that was just a codegen delay

@JeffBezanson
The Julia Language member

I see this same bug in 0.2.1.

@JeffBezanson
The Julia Language member

Even simpler case:

julia> run(`false` |> `true`)
ERROR: failed process: Process(`false`, ProcessExited(1)) [1]
 in pipeline_error at process.jl:480
 in pipeline_error at process.jl:493
 in run at process.jl:457

julia> run(`false` |> `true`)
ERROR: assertion failed
 in pipeline_error at process.jl:488
 in run at process.jl:457

Also in 0.2.1.

@JeffBezanson JeffBezanson removed their assignment Feb 22, 2014
@JeffBezanson JeffBezanson added the I/O label Feb 22, 2014
@JeffBezanson JeffBezanson added a commit that closed this issue Mar 1, 2014
@JeffBezanson JeffBezanson fix #5904, assertion failure running pipelines
must be careful using functional constructs where side effects are needed
b706399
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.