Skip to content

BDN randomly crashes on Linux? #90691

Closed
@EgorBo

Description

@EgorBo

Filing a tracking issue for the bug @stephentoub noticed on Linux-x64, minimal repro:

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Tests).Assembly).Run(args);

[DisassemblyDiagnoser]
public class Tests
{
    IEnumerable<int> _source = Enumerable.Repeat(0, 1024);
    Random _rand = new();

    [Benchmark]
    public bool Any() => _rand.NextDouble() < 1.0 ?
        _source.Any(i => i == 42) :
        _source.Any(i => i == 43);
}

Run with:

dotnet run -c Release -f net8.0 -- -j short --filter "*" --iterationTime 50

(--iterationTime 50 is just to make crash faster, it reproduces without it as well)

When we run - it randomly just quits silently in the middle of benchmarking (it doesn't happen for all benchmarks, but so far it looks like it's not PGO, TieredCompilation, AVX512 and Stephen even managed to repro it on .NET 7.0).

Presumably, the culprit is [DisassemblyDiagnoser] and ClrMD behind it.

cc @adamsitnik

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions