[C++] Potential stack overflow in async scanner
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
Observed in [AppVeyor CI](https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/41288964/job/6s4bx6cd2kc6eld6) on the main branch:
```
[ RUN ] TestScan/TestCsvFileFormatScan.ScanBatchSize/0AsyncThreaded16b1024r
unknown file: error: SEH exception with code 0xc00000fd thrown in the test body.
[ FAILED ] TestScan/TestCsvFileFormatScan.ScanBatchSize/0AsyncThreaded16b1024r, where GetParam() = AsyncThreaded16b1024r (250 ms)
```
From some searching, this code corresponds to a stack overflow. We've previously seen errors similar to this, so it might be good to identify and track this down too. (It seems less likely on Linux due to the larger default stack size.)
**Reporter**: [David Li](https://issues.apache.org/jira/browse/ARROW-14478) / @lidavidm
**Note**: *This issue was originally created as [ARROW-14478](https://issues.apache.org/jira/browse/ARROW-14478). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start with the failing AppVeyor test, TestScan/TestCsvFileFormatScan.ScanBatchSize/0AsyncThreaded16b1024r, and inspect the async scanner call path on Windows. Reproduce the SEH stack-overflow failure and trace the recursive or stack-heavy operation. Done means identifying the cause and documenting or addressing a reliable prevention, with the test passing on the affected configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100