Skip to content

BaseTestDatabase.PrepareDatabase() causes deadlock #82

@Shazwazza

Description

@Shazwazza

I've been trying to run some of these tests and while I have success sometimes running dotnet test, other times it entirely fails.

An agent took a mem dump to try to analyze:

The dump reveals the hang is in Umbraco's BaseTestDatabase.PrepareDatabase() — multiple threads are blocked on BlockingCollection.Take() waiting for a database to be
prepared. This is an Umbraco test infrastructure issue, not an Examine API compatibility issue.

Key findings from the dump:

  1. Multiple threads stuck at BaseTestDatabase.PrepareDatabase() → BlockingCollection.Take()
  2. One thread running Lucene.Net.Search.ControlledRealTimeReopenThread (normal Lucene background thread)
  3. The NUnit test method DraftStructure_WithChildDeleted_YieldsNothingBelowRoot is blocked waiting for the async test setup to complete
  4. No Examine code appears in any deadlocked stack — the hang is entirely in Umbraco's BaseTestDatabase infrastructure

Root cause of test hang: Thread dump analysis (--blame-hang) shows multiple threads stuck in
Umbraco.Cms.Tests.Integration.Testing.BaseTestDatabase.PrepareDatabase() →
BlockingCollection.Take(). This is an Umbraco test database pool exhaustion issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions