Subsequent calls to YottaDB from threads spawned by a TP callback function work correctly
Final Release Note
Subsequent calls to YottaDB (e.g., ydb_set_st()
) from threads spawned by a TP callback function (invoked from ydb_tp_st()
) work correctly. Previously, this use case could cause the process to terminate abnormally with a SIG-11. [#463 (closed)]
Description
The simplethreadapi/randomWalk subtest is a recently developed test that tests all aspects of the SimpleThreadAPI interface. As part of this it invokes ydb_tp_st() which in turn creates multiple threads each of which do further SimpleThreadAPI calls. Occasionally, this test fails with a SIG-11. After some analysis turns out to be an issue with ydb_set_st() or ydb_incr_st() which if invoked from one thread while inside a ydb_tp_st() call can cause a later SimpleThreadAPI call inside the same ydb_tp_st() callback function but from a different thread to terminate the process with a SIG-11 because it tries to reference memory belonging to another thread which no longer exists.
Draft Release Note
ydb_tp_st()
works in the case the TP callback function creates multiple threads each of which makes further calls to SimpleThreadAPI functions like ydb_set_st() or ydb_incr_st(). Previously, this use case could cause the process to terminate abnormally with a SIG-11.