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

LNet: acceptor listener shutdown order and teardown race

XMLWordPrintable

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

      LNetNIFini() stops the acceptor before the LNDs are shut down. The acceptor thread releases the listening sockets when it exits, so ksocklnd later fails to find them and "listening socket not found" is logged on every LNet shutdown (see LU-19651). The LNetNIInit()   error path has the same ordering problem.

      In addition, the listening socket's data_ready callback is swapped without sk_callback_lock and without waiting for running softirq callbacks, and accepted sockets inherit the listener's callback and sk_user_data. This can leave a callback running on a stale or      freed listener during teardown or module unload.

            cbordage Cyril Bordage
            cbordage Cyril Bordage
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: