Skip to content

containerOptions directive bug with AWS Batch and "--shm-size=some_number" #5190

Open
@mriffle

Description

@mriffle

Bug report

When specifying when using AWS Batch:

containerOptions '--shm-size=1000000000'

An unhelpful error message will be produced when running the workflow:

ERROR ~ Error executing process > 'MY_PROCESS_NAME'

Caused by:
  For input string: "true"



 -- Check '.nextflow.log' file for details

Note that this only happens when using AWS Batch, other executors work correctly and set the shm-size as expected.

This can be fixed by removing the =, such as:
containerOptions '--shm-size 1000000000'

However, there is no indication whatsoever in the error message that this is the problem. It took me some hours to figure this out.

I assume this is related to special syntax required for AWS Batch and the parsing of this specific container option when Nextflow is run.

Expected behavior and actual behavior

The expected behavior is that the shm-size variable will be set appropriately, independent of which executor is being used.

Steps to reproduce the problem

Put this in a process and run using AWS Batch:

containerOptions '--shm-size=1000000000'

Program output

ERROR ~ Error executing process > 'MY_PROCESS_NAME'

Caused by:
  For input string: "true"



 -- Check '.nextflow.log' file for details

Environment

  • Nextflow version: [24.04.3]
  • Java version: [openjdk version "11.0.24" 2024-07-16]
  • Operating system: [Linux]
  • Bash version: (GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu))

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions