[LU-7965] mkfs.lustre sometimes fails with a segmentation fault Created: 31/Mar/16  Updated: 27/Jan/17  Resolved: 11/Apr/16

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

Type: Bug Priority: Minor
Reporter: Gregoire Pichon Assignee: Gregoire Pichon
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-7919 Buffer overflow in mount_lustre: pars... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

During format of a Lustre target, the mkfs.lustre command sometimes crash with a segmentation fault.

It occurs at the end of the process so the target is well formatted anyway.

# mkfs.lustre -v --reformat --quiet "--fsname=fs1" --ost --index=0 "--mgsnode=mexico9@o2ib5" "--mkfsoptions=-m 0 -E lazy_itable_init=0,lazy_journal_init=0" --device-size=4194304 /var/loop/ost0

   Permanent disk data:
Target: fs1:OST0000
Index: 0
Lustre FS: fs1
Mount type: ldiskfs
Flags: 0x62
              (OST first_time update )
Persistent mount opts: errors=remount-ro
Parameters: mgsnode=10.128.0.13@o2ib5

formatting backing filesystem ldiskfs on /dev/loop0
        target name fs1:OST0000
        4k blocks 1048576
        options -m 0 -J size=163 -I 256 -q -O extents,uninit_bg,dir_nlink,quota,huge_file,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0,resize=4290772992 -F
mkfs_cmd = mke2fs -j -b 4096 -L fs1:OST0000 -m 0 -J size=163 -I 256 -q -O extents,uninit_bg,dir_nlink,quota,huge_file,flex_bg -G 256 -E lazy_itable_init=0,lazy_journal_init=0,resize=4290772992 -F /dev/loop0 1048576
Writing CONFIGS/mountdata
Segmentation fault

After analysis of the problem, it appears the stack is corrupted.
Issue comes from enable_default_ext4_features() routine.

I am going to push a patch that fixes the problem.

The bug probably affects other Lustre versions.



 Comments   
Comment by Gerrit Updater [ 31/Mar/16 ]

Grégoire Pichon (gregoire.pichon@bull.net) uploaded a new patch: http://review.whamcloud.com/19260
Subject: LU-7965 utils: fix stack corruption in mkfs.lustre
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 99f37b41a069bdc7146c298ffe5e76603fea56db

Comment by Gerrit Updater [ 11/Apr/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/19260/
Subject: LU-7965 utils: fix stack corruption in mkfs.lustre
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8d7c131c9610fe1ffafdda50b3d543766463a291

Comment by Joseph Gmitter (Inactive) [ 11/Apr/16 ]

Landed to master for 2.9.0

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