facebookresearch / facebookresearch/fairseq2
using pipeline_builder shared pointer multiple times lead to segfaults
Open
bug
data pipeline
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 144
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
**Describe the bug:**
Segfault during the pipeline creation
**Describe how to reproduce:**
```python
from fairseq2.data import read_sequence
from fairseq2.data.data_pipeline import DataPipeline, DataPipelineBuilder
pipeline_build = read_sequence(list(range(100))) # this's shared for two shuffling operations
concat_pipe = DataPipeline.concat([pipeline_build.shuffle(10).and_return(),
pipeline_build.shuffle(10).and_return()]).and_return()
# this should have raised
next(iter(concat_pipe))
```
**Describe the expected behavior:**
This should raise an explicit RuntimeError
Contributor guide
Assessment
This issue has not been assessed yet.