You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug, including details regarding any error messages, version, and platform.
Hi community, it seems the compute kernels registry is not cleared when the dll library (that is dynamically linked to arrow_compute.dll) is unloaded. Is this expected behavior? If not, then this might be a big impact.
Please let me know if you have any questions. Here is my attempt at explaining the issue that our team is facing:
arrow::compute::Initialize() is called once from arrow_flight_sql_odbc.dll every time the driver dll is loaded in the test executable. And each test case loads the driver dll at the beginning and unloads at the end.
this means arrow::compute::Initialize() gets called every test case
this causes an issue because when the second test case starts, we receive Already have a function registered with name error and it blocks rest of tests from running.
What the error message looks like:
[Test 1 passes]
[Test 2 starts]
arrow\cpp\src\arrow\compute\kernels\scalar_arithmetic.cc:1448: Check failed: _s.ok() Operation failed: registry->AddFunction(std::move(absolute_value))
Bad status: Key error: Already have a function registered with name: abs
this error message makes sense because abs is the first function that gets registered, and Arrow errors out on this first call to AddFunction.
I think that every dll library that calls arrow::compute::Initialize() could potentially run into this issue. This is because the application that uses the dll isn't guaranteed to know Arrow compute, so the application isn't expected to call arrow::compute::Initialize().
I can confirm this error goes away when I remove the arrow::compute::Initialize() call from the driver dll and into the test environment set up, but the initialization needs to happen inside the driver, as the driver needs to initialize the compute functions in order to work properly.
Thanks in advance to people that are looking into this.
Describe the bug, including details regarding any error messages, version, and platform.
Hi community, it seems the compute kernels registry is not cleared when the dll library (that is dynamically linked to
arrow_compute.dll) is unloaded. Is this expected behavior? If not, then this might be a big impact.Please let me know if you have any questions. Here is my attempt at explaining the issue that our team is facing:
arrow_flight_sql_odbc.dll) library at GH-46734: [C++] Arrow Flight SQL ODBC layer #46099, that usesarrow_compute.dllarrow::compute::Initialize()is called once fromarrow_flight_sql_odbc.dllevery time the driver dll is loaded in the test executable. And each test case loads the driver dll at the beginning and unloads at the end.arrow::compute::Initialize()gets called every test caseAlready have a function registered with nameerror and it blocks rest of tests from running.What the error message looks like:
absis the first function that gets registered, and Arrow errors out on this first call toAddFunction.I think that every dll library that calls
arrow::compute::Initialize()could potentially run into this issue. This is because the application that uses thedllisn't guaranteed to know Arrow compute, so the application isn't expected to callarrow::compute::Initialize().arrow::compute::Initialize()call from the driver dll and into the test environment set up, but the initialization needs to happen inside the driver, as the driver needs to initialize the compute functions in order to work properly.Thanks in advance to people that are looking into this.
Component(s)
C++