nextflow
nextflow copied to clipboard
Passing an empty value channel to a process causes nextflow to hang
If a channel is created via channel.value()
and passed directly to a process, nextflow hangs forever.
Expected behavior and actual behavior
I assumed that passing channel.value()
would work for passing optional inputs that I always want to evaluate to false, as it seems to create a value channel with null as the value. But doing this will just hang the nextflow process with no error message.
I notice the docs specifically mention that channel.value(null)
isn't allowed, which seems to result in identical behaviour to channel.value()
. I also notice that passing null
directly to a process results in an error message. So maybe the expected behaviour here is to throw the same error message instead of hanging?
Script to reproduce
process P {
input:
val empty
exec:
println empty
}
workflow {
P(
channel.value()
)
}
Output (this doesn't error out, just hangs)
N E X T F L O W ~ version 24.03.0-edge
Launching `main.nf` [ecstatic_jepsen] DSL2 - revision: 0527d9bad8
[- ] process > P -
Environment
- Nextflow version: 24.03.0-edge
- Java version: Temurin 21.0.2
- Operating system: Ubuntu 24.04
- Bash version: GNU bash, version 5.2.21(1)-release