Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20641

nodemap debugfs removal deadlock

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • Lustre 2.18.0
    • 3
    • 9223372036854775807

      nodemap_del() holds active_config_lock across its call to lprocfs_nodemap_remove(), which ends up in debugfs_remove_recursive(). That helper waits until every reader currently executing one of the nodemap files has left.

      Such a reader is pinned by the debugfs full-proxy file operations for the whole duration of the ->show() callback, and every nodemap handler acquires active_config_lock: nodemap_ranges_show() and nodemap_ban_ranges_show() take it directly, while all the other handlers take it through nodemap_lookup_unlocked(), which locks and unlocks it internally.

      So a "lctl nodemap_del" racing with a reader of any file below /sys/kernel/debug/lustre/nodemap/<name>/ deadlocks: the reader blocks on the mutex the deleter holds, and the deleter blocks waiting for that reader to drop its file reference.

            sebastien Sebastien Buisson
            sebastien Sebastien Buisson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: