Describe the bug, including details regarding any error messages, version, and platform.
When reading a CSV file encounters an early error, and the AsyncThreadedTableReader is only kept alive through the chain of futures and their callbacks, the ~AsyncThreadedTableReader destructor will be executed at the end of a TaskGroup task and try to wait for the TaskGroup itself for finish. This will obviously deadlock.
This issue was discovered by OSS-Fuzz in https://issues.oss-fuzz.com/issues/467451924
Component(s)
C++