[LU-11658] The cl_cache may be uninitialized while osc is activating Created: 12/Nov/18  Updated: 31/Aug/23  Resolved: 04/Jan/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.13.0, Lustre 2.10.7, Lustre 2.12.1

Type: Bug Priority: Minor
Reporter: Yang Sheng Assignee: Yang Sheng
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-17069 Crash when writing to a deactivated OSC Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The obd_set_info_async will be invoked with KEY_CACHE_SET to initialize cl_cache while normal osc setup. We don't call it when osc has been disabled since export has not been setup. But it still be missed while osc active and causes the client to crash.

[3968842.116112] Lustre: MGC10.53.18.101@tcp: Connection restored to MGS (at 10.53.18.101@tcp)
[4195817.824439] BUG: unable to handle kernel NULL pointer dereference at           (null)
[4195817.824813] IP: [<ffffffffa0b934a5>] osc_lru_reserve+0x25/0x130 [osc]
[4195817.825016] PGD ec67e1067 PUD 112e776067 PMD 0
[4195817.825209] Oops: 0000 [#1] SMP

.....

[4195817.833867] Call Trace:
[4195817.834063]  [<ffffffffa0b98b36>] osc_io_write_iter_init+0x86/0x1e0 [osc]
[4195817.834280]  [<ffffffffa077448c>] cl_io_iter_init+0x5c/0x120 [obdclass]
[4195817.834474]  [<ffffffffa063037c>] lov_io_iter_init+0x1fc/0x5a0 [lov]
[4195817.834670]  [<ffffffffa0630898>] lov_io_rw_iter_init+0x178/0x2c0 [lov]
[4195817.834873]  [<ffffffffa077448c>] cl_io_iter_init+0x5c/0x120 [obdclass]
[4195817.835080]  [<ffffffffa0777b72>] cl_io_loop+0x42/0x190 [obdclass]
[4195817.835281]  [<ffffffffa0a9fc91>] ll_file_io_generic+0x601/0xad0 [lustre]
[4195817.835479]  [<ffffffffa0aa050d>] ll_file_aio_write+0x20d/0x870 [lustre]
[4195817.835679]  [<ffffffffa0aa0c3b>] ll_file_write+0xcb/0x1e0 [lustre]
[4195817.835873]  [<ffffffff811fe12d>] vfs_write+0xbd/0x1e0
[4195817.836063]  [<ffffffff811fee02>] SyS_pwrite64+0x92/0xc0
[4195817.836253]  [<ffffffff816965c9>] system_call_fastpath+0x16/0x1b
[4195817.836448] Code: 66 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 41 54 49 89 fc 53 44 8b 87 4c 01 00 00 44 0f af 87 48 01 00 00 48 8b 97 98 07 00 00 <48> 8b 0a 4c 39 c6 49 0f 47 f0 48 39 f1 48 89 f3 72 40 48 89 ce
[4195817.837229] RIP  [<ffffffffa0b934a5>] osc_lru_reserve+0x25/0x130 [osc]
[4195817.837434]  RSP <ffff881190fffbb8>
[4195817.837612] CR2: 0000000000000000


 Comments   
Comment by Gerrit Updater [ 13/Nov/18 ]

Yang Sheng (ys@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33650
Subject: LU-11658 lov: cl_cache could missing initialize
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e0383b38484b3bf7fd5920eb53ac9ddc7235164d

Comment by Gerrit Updater [ 04/Jan/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33650/
Subject: LU-11658 lov: cl_cache could miss initialize
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 42e83c44eb5a22cbacf1ed4c6d4d6b588e07faa9

Comment by Peter Jones [ 04/Jan/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 07/Jan/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33980
Subject: LU-11658 lov: cl_cache could miss initialize
Project: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: a1e4aa728667fabfffac96bbd560c710e762a175

Comment by Gerrit Updater [ 08/Jan/19 ]

Yang Sheng (ys@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33983
Subject: LU-11658 tests: fix typo in previous patch
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 52af5ee10a12a6de5918b8068cecc2daf6d5712f

Comment by Gerrit Updater [ 19/Jan/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33980/
Subject: LU-11658 lov: cl_cache could miss initialize
Project: fs/lustre-release
Branch: b2_10
Current Patch Set:
Commit: 2bd4a23b0f716551bf95775be1db0f44dfe68682

Comment by Gerrit Updater [ 30/Jan/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33983/
Subject: LU-11658 tests: fix typo in previous patch
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c69e34ce0ed5759fbef20f5aae7f47ead5598094

Comment by Gerrit Updater [ 25/Feb/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34306
Subject: LU-11658 lov: cl_cache could miss initialize
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: b2c4190b3c161ddebd82e17309d699a49b9ed469

Comment by Gerrit Updater [ 14/Mar/19 ]

Yang Sheng (ys@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34419
Subject: LU-11658 lov: remove KEY_CACHE_SET to simplify the code
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c922f159bf791dd371550b027b7e4319142f7da7

Comment by Gerrit Updater [ 01/Apr/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34306/
Subject: LU-11658 lov: cl_cache could miss initialize
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: e1ff19d73c77bccf66429af1d8fb1ade7fcf8701

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