Koka / odbc-rs

Rust ODBC FFI binding
MIT License
97 stars 30 forks source link

Unstable tests #29

Closed Koka closed 7 years ago

Koka commented 7 years ago

I've got unstable behaviour in our tests - they fail time to time with the following thread-related exception message:

running 12 tests
test not_read_only ... ok
test implicit_disconnect ... ok
test list_system_data_sources ... ok
test invalid_connection_string ... ok
libs-896b1f373715685b: pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
error: process didn't exit successfully: `/home/travis/build/Koka/odbc-rs/target/debug/deps/libs-896b1f373715685b` (signal: 6, SIGABRT: process abort signal)

Caused by:
  process didn't exit successfully: `/home/travis/build/Koka/odbc-rs/target/debug/deps/libs-896b1f373715685b` (signal: 6, SIGABRT: process abort signal)

Quick googling suggests setting set Threading param to 0 or 1 in odbcinst.ini, but I'm not sure of consequences.

pacman82 commented 7 years ago

The default threading level on unix_odbc is 0 and it will not help. I've also seen this tests fail and I think it is caused by having multiple odbc environments in the same process (issue #12). Although back then it seemed more like a hypothetical problem.

Koka commented 7 years ago

As a temporary solution I've enabled single-threaded test mode for both appveyor and travis builds - will see if things go better now

Koka commented 7 years ago

Looks like everything's ok now