[LU-12549] Lustre project PID 32-bit overflow Created: 15/Jul/19  Updated: 08/Aug/21  Resolved: 11/Jul/20

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

Type: Bug Priority: Minor
Reporter: Tommi Tervo Assignee: Etienne Aujames
Resolution: Fixed Votes: 0
Labels: easy
Environment:

lustre-client-2.10.7_ddn8-1.el7.x86_64, server is the latest Exascaler 2.10.7_ddn8
lustre-client-2.10.7_ddn8-1.el7.x86_64


Issue Links:
Related
is related to LU-13845 Kernel crash on: lfs quota -u $(( (1<... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Project quota pid overflows somewhere between 4.2B and 4.3B without warning.

  1. lfs project -p 4210007132 /users/tervotom
  2. lfs project -d /users/tervotom
    4210007132 - /users/tervotom
    lfs project -p 4310007132 /users/tervotom
    lfs project -d /users/tervotom
    15039836 - /users/tervotom


 Comments   
Comment by Tommi Tervo [ 15/Jul/19 ]

(too tired, managed to put description to the env-field)

Project quota pid overflows somewhere between 4.2M and 4.3M without warning.

  1. lfs project -p 4210007132 /users/tervotom
  2. lfs project -d /users/tervotom
    4210007132 - /users/tervotom
    lfs project -p 4310007132 /users/tervotom
    lfs project -d /users/tervotom
    15039836 - /users/tervotom
Comment by Andreas Dilger [ 16/Jul/19 ]

From your examples, the project ID is overflowing at 2^32-1 = 0xffffffff =4294967296, somewhat over 4B, not 4M:

$ printf "%x\n" 4210007132
faef9c5c
$ printf "%x\n" 4210007132
faef9c5c
$ printf "%x\n" 4310007132
100e57d5c
$ printf "%d\n" 0xe57d5c
15039836

so this is totally expected because the on-disk and network data structures only store a 32-bit value for projid.

I guess the issue is that "lfs project -p" should report an error when a user provides a project ID larger than 2^32-1.

Comment by Tommi Tervo [ 16/Jul/19 ]

Error message would be preferable. This sounds like a "junior job", does WC Jira have labels for those?

Comment by Peter Jones [ 16/Jul/19 ]

Yup- the easy label

Comment by Gerrit Updater [ 15/Jun/20 ]

Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/38938
Subject: LU-12549 utils: Check range of project ID for "lfs" arguments
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1a152c82bee8d6e8098bbc8bee55be767efd5e4b

Comment by Gerrit Updater [ 15/Jun/20 ]

Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/38939
Subject: LU-12549 utils: Uniformize 32bits check for lfs_find
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 19933aa3123895cb1237f87b624abc028e0c2cc6

Comment by Gerrit Updater [ 10/Jul/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38938/
Subject: LU-12549 utils: Check range of quota ID for "lfs" arguments
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3d9900e78e180a211c50ea1030fa147c5a330f22

Comment by Peter Jones [ 11/Jul/20 ]

Landed for 2.14

Generated at Sat Feb 10 02:53:34 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.