I just faced a deadlock when I was trying to connect to an Oracle database. It happened in TZOracleConnection.HandleErrorOrWarning, this cycle:
Code: Select all
while true do begin
NewStatus := FPlainDriver.OCIErrorGet(ErrorHandle, I, nil, ErrorCode,
@FByteBuffer[0], SizeOf(TByteBuffer)-1, OCI_HTYPE_ERROR);
if NewStatus = OCI_NO_DATA then
Break;
[...]
end;
I'm not really familiar with what exactly is happening here, if simply adding a second value to the exit condition is fine or not... but the thing is, this cycle poses a high chance of deadlock.