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

lnetctl net show dump size wraps u16 min_dump_alloc with 8+ NIs

XMLWordPrintable

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

       LU-20221 (b94f56769f) sizes the lnetctl net show dump buffer per NI and writes the total into cb->min_dump_alloc. On kernels where that field is u16, the total wraps once it passes 65535. At ~6.5KB per NI, 0@lo plus 8 tcp NIs gives 66162, which wraps to 626. That is smaller than the U16_MAX it replaced.

        Two smaller problems are in the same code:
      ▎ - lnet_net_size_skb() resets prev_type from its LNET_NET_ANY argument rather than the net being sized, so it charges a key table for every net.
      ▎ - The malformed-request exit in lnet_net_show_start() returns without freeing nlist. ->done() is not called when ->start() fails.
      ▎
      ▎ Fix: Sum into a local ssize_t and cap at the field's maximum, as lnet_route_show_start() does. This keeps large nodes at the old U16_MAX instead of making net show fail. Also track prev_type correctly and take the malformed-request exit through report_err.

            mdiep Minh Diep - TLC
            mdiep Minh Diep - TLC
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: