Skip to content

A LMDB write when disk is full hits a release_assert #3552

@thsfs

Description

@thsfs

Summary

When trying to reproduce #3549 noticed that a release_assert is hit, making the node to stop with an assert error.

This should be ideally changed so the node could detect it is running out of disk space, eventually triggering warnings for that. A graceful shutdown is preferred rather then letting it to fail on a success check write assertion.

Node version

V23.0DB3

Build details

Manually built.

OS and version

Ubuntu 20.04

Steps to reproduce the behavior

  1. Ensure there is only a little of disk-space (50M) for the node to start running (it fails when there is no more disk-space).
  2. Run a node instance.
  3. Wait for it to stop working.
  4. It hits a release assertion in the nano::write_mdb_txn::commit () method, at lmdb_txn.cpp:103
Assertion (status == 0) failed
virtual void nano::write_mdb_txn::commit()
/home/thiagosfs/ws/nano/nano-node/nano/node/lmdb/lmdb_txn.cpp:103
Error: Input/output error

Expected behavior

This scenario was only covered by an assertion.

Actual behavior

Hits the assertion and exits with a fail message.

Possible solution

Implement the solution proposed by: #3551

  • Eventually trigger a warning for running out of disk-space.
  • Have a graceful shutdown before hitting the assertion.

Supporting files

No response

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