ClickHouse / ClickHouse/clickhouse-odbc

Implement Multithreading Support

Open
#472 0 comments 2 reactions 1 assignee Claimed by @slabko View on GitHub
bug
Dominant language
C
Stars
285
Forks
105
Avg merge
3h 56m
Merged PRs (30d)
3

Description

When I create a single environment handle in the main thread and then spawn several threads, each with its own connection, and execute queries, the driver often crashes. Note that each thread uses its connection exclusively, i.e., connections are not shared between threads. I do not use any ODBC wrappers, only a C++ application using the native ODBC API.
Here are errors I frequently receive on Linux using unixODBC:

- `Error: HY010: [unixODBC][Driver Manager]Function sequence error`
- `Segmentation fault`
- `double free or corruption (!prev)`
- The application gets stuck

Errors I receive on Windows:

- The application often gets stuck
- The application crashes, but in the Event Log I can see an entry with error `Application Error 0xc0000005 (Access Violation)`
- `Error: 08003: [Microsoft][ODBC Driver Manager] Connection not open`

Exactly the same example works perfectly well with both PostgreSQL and MySQL drivers on the same data.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.