[freetds] Cancellation problem in ctlib
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Fri May 20 05:00:15 EDT 2005
I discovered a race problem in ctlib cancellation.
Problems raise after updating valgrind from 2.2 to 2.4. Program execute
slowly causing interrupt to occur inside ct_results but after
cancel_state setting. In this case tds_process_tokens returns TDS_FAIL
so ct_results return CS_FAIL but cancel_state remain in CANCEL_PENDING.
This cause next ct_send command to fail. The problem is that
tds_process_tokens handle cancellation by its own so is not necessary to
have a cancel_state in ctlib. Perhaps it would be better to add a
TDS_CANCELLED result to catch cancellation inside tds_process_tokens ??
freddy77
More information about the FreeTDS
mailing list