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

OBD_FREE_LARGE() can sleep under a spinlock, causing soft lockups

XMLWordPrintable

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

      Since LU-18687 (2.17.0), OBD_FREE_LARGE() frees vmalloc memory with vfree(), which can sleep, and some callers hold a spinlock: ptlrpc_server_drop_request() frees request buffers under scp_lock. On kernels without CONFIG_PREEMPT_COUNT, such as RHEL 8, the holder can be scheduled out while the other service threads on its CPT spin on the lock:

      ptlrpc_main -> ptlrpc_server_drop_request -> queued_spin_lock_slowpath
      

      With PREEMPT_COUNT this is only a debug kernel warning (LU-19869 fixed one caller). OBD_FREE_LARGE() can defer the free whenever preemptible() is false, which fixes every caller at once.

            wc-triage WC Triage
            paf0186 Patrick Farrell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: