[LU-13662] LNet: crash on bad user space parameters Created: 10/Jun/20  Updated: 23/Jun/20  Resolved: 23/Jun/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: Amir Shehata (Inactive) Assignee: Amir Shehata (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The following YAML causes a crash

 net:
  - net type: tcp
    local NI(s):
      - interfaces:
          0: eth0
        tunables:
          peer_credits: 32
      - interfaces:
          0: eth1
        tunables:
          peer_credits: 32
      - interfaces:
          0: eth2
        tunables:
          peer_credits: 32

peer_credits and peer_tx_credits default to 0, which causes an NI to be removed prematurely.

Missing parameters should be defaulted.



 Comments   
Comment by Serguei Smirnov [ 10/Jun/20 ]

The following yaml also causes a problem:

 net:
    - net type: tcp
      local NI(s):
        - nid: 10.122.36.80@tcp
          status: up
          interfaces:
          statistics:
              send_count: 0
              recv_count: 0
              drop_count: 0
          tunables:
              peer_timeout: 180
              peer_credits: 8
              peer_buffer_credits: 0
              credits: 256
          lnd tunables:
          tcp bonding: 0
          dev cpt: -1
numa:
    range: 0
# lnetctl import lnetconf2.txt 
error:
	fatal: out of memory
??S??:
Segmentation fault 

This was reproduced on 7.8 Centos, b2_12 patchless client system (https://build.whamcloud.com/job/lustre-b2_12-patchless/83/)  

 

Comment by Gerrit Updater [ 10/Jun/20 ]

Amir Shehata (ashehata@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38894
Subject: LU-13662 lnet: handle undefined parameters
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1e9ffc30d74c254e206a32ac8d31fd1e01cfa0de

Comment by Gerrit Updater [ 23/Jun/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38894/
Subject: LU-13662 lnet: handle undefined parameters
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d934eb3c4f63858245132b55363002cda722c50b

Comment by Peter Jones [ 23/Jun/20 ]

Landed for 2.14

Generated at Sat Feb 10 03:03:09 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.