[MDEV-32748] debug_sync_set_action() Fails if Entered in an Error State Created: 2023-11-09  Updated: 2023-11-09

Status: Open
Project: MariaDB Server
Component/s: Debug, Tests
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2

Type: Bug Priority: Major
Reporter: Brandon Nesterenko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

If invoking debug_sync_set_action(thd, ...) when thd->is_error() is true, it will return in error itself, even if the synchronization worked correctly. This is because of the following condition in its logic:

    if (unlikely(thd->is_error()))
      DBUG_RETURN(TRUE);

This means the established pattern of

DBUG_ASSERT(!debug_sync_set_action(thd,...))

will throw the DBUG_ASSERT when trying to synchronize threads during error handling.

It seems valid to synchronize in an error state, and debug_sync_set_action() should only return in error if it itself errors, and not if simply invoked in an already err'd out state.


Generated at Thu Feb 08 10:33:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.