Skip to content

mnesia:force_load_table/1 may stuck after peer node becomes unavailable #11344

Description

@dmitrivereshchagin

Describe the bug

mnesia:force_load_table/1 may stuck after a peer node becomes unavailable while loading tables from it.

To Reproduce

Two similar cases were discovered.

To reproduce the first one:

  1. Create schema and start Mnesia on two nodes.
  2. Create and populate disc_copies table.
  3. On the first node, set the second node as master node for all tables.
  4. Restart Mnesia on the first node.
  5. Break connectivity while the table is loading.
  6. On the first node, wait until the second node becomes unavailable.
  7. On the first node, force the table to be loaded immediately.

mnesia:force_load_table/1 gets stuck. The second call to the function loads the table. As a workaround, a small delay can be added before the call.

The second case differs by using a disc_only_copies table and adding a one-second delay before calling mnesia:force_load_table/1.

mnesia:force_load_table/1 gets stuck. The same thing happens on subsequent calls to the function.

Expected behavior

mnesia:force_load_table/1 loads the table and returns control.

Affected versions

At least OTP-27.1.2, OTP-28.5.0.3, and OTP-29.0.3.

Additional context

Code to reproduce and instructions on how to run it are in attached zip file.

mnesia-force-load-table-stuck-master.zip

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:PSAssigned to OTP team PS

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions