Skip to content

[Linux, amd64] ICorDebugEval::Abort are broken. #82422

Description

@viewizard

Description

During netcoredbg testing with .NET SDK 7.0 (dotnet-sdk-7.0.200-linux-x64.tar.gz). We found, that tests related to evaluation abort (timeout during execution and System.Diagnostics.Debugger.NotifyOfCrossThreadDependency() usage in evaluated code) are failed.
We found, that ICorDebugEval::Abort and ICorDebugEval2::RudeAbort return S_OK at call, but don't really abort evaluation in 7.0 (we also tested latest .NET SDK 3.1, 5.0, 6.0 and don't found any issues).

Reproduction Steps

Call ICorDebugEval::Abort in debugger. For example, create property with getter with System.Diagnostics.Debugger.NotifyOfCrossThreadDependency() and evaluate it. In this case runtime will call ICorDebugManagedCallback3::CustomNotification that forced debugger to use ICorDebugEval::Abort (CoreCLR debug API don't really provide any other way you could abort code execution during evaluation).

Expected behavior

  1. During evaluation call ICorDebugEval::Abort or ICorDebugEval2::RudeAbort, it will return S_OK.
  2. Evaluated code don't continue execution.
  3. ICorDebugManagedCallback::EvalComplete or ICorDebugManagedCallback::EvalException called, ICorDebugEval::GetResult() return CORDBG_S_FUNC_EVAL_ABORTED.

Actual behavior

  1. During evaluation call ICorDebugEval::Abort or ICorDebugEval2::RudeAbort, it will return S_OK.
  2. Evaluated code continue execution.
  3. After evaluated code execution ends ICorDebugManagedCallback::EvalComplete or ICorDebugManagedCallback::EvalException called, ICorDebugEval::GetResult() return S_OK. In case evaluated code never ends (for example, about deadlock), ICorDebugManagedCallback::EvalComplete or ICorDebugManagedCallback::EvalException never called.

Regression?

It works fine on Linux amd64 with .NET SDK 3.1, 5.0 and 6.0.

Known Workarounds

No response

Configuration

Ubuntu 20.04 amd64, .NET SDK 7.0 (dotnet-sdk-7.0.200-linux-x64.tar.gz).

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions