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

socklnd: nonblk_zcack=0 oopses in ksocknal_queue_tx_msg_v2

XMLWordPrintable

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

      Setting the ksocklnd parameter nonblk_zcack=0 crashes a node within seconds of bulk traffic, with a NULL pointer write in ksocknal_queue_tx_msg_v2() (socklnd_proto.c:134 on master 7c3c9f8814). The default, nonblk_zcack=1, never reaches the code, so only sites that change the parameter are hit.

      Cause: with nonblk_zcack=0 a ZC-ACK that is waiting on a connection as a NOOP is carried by the next LNet message queued there, which should take the NOOP's place in the transmit queue. That replacement used to be list_add() of the new tx after the NOOP followed by list_del() of the NOOP. LU-9679 ("various: use list_splice and list_splice_init", 45a64335d0, 2.13.53) turned it into list_splice(&tx->tx_list, &tx_msg->tx_list), which treats the NOOP's list entry as a list head and splices into the new message's tx_list, which was never initialised. The other conversions in that patch operate on real list heads and are correct.

      Reproduction: two nodes on socklnd, nonblk_zcack=0 on both, lnet_selftest brw of 1 MB transfers. Seen on Rocky 10 VMs (6.12 kernel): oops within seconds.

      Fix: list_replace(&tx->tx_list, &tx_msg->tx_list).

            wc-triage WC Triage
            patrickbot Patrick Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: