[LU-2888] After downgrade from 2.4 to 2.1.4, hit (osd_handler.c:2343:osd_index_try()) ASSERTION( dt_object_exists(dt) ) failed Created: 27/Feb/13  Updated: 25/Jul/13  Resolved: 18/Apr/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.0, Lustre 2.1.4
Fix Version/s: Lustre 2.4.0, Lustre 2.1.6

Type: Bug Priority: Major
Reporter: Sarah Liu Assignee: Zhenyu Xu
Resolution: Fixed Votes: 0
Labels: None
Environment:

before upgrade, server and client: 2.1.4 RHEL6
after upgrade, server and client: lustre-master build# 1270 RHEL6


Attachments: File 2.4-start-mdt.log.tar.bz2     File upgrade-ls.log.tar.bz2    
Issue Links:
Duplicate
duplicates LU-3574 MDT cannot sync with OST after upgrad... Resolved
Related
is related to LU-2684 convert ost_id to lu_fid for FID_SEQ_... Resolved
is related to LU-3267 cl_echo_object_find()) ASSERTION( ost... Resolved
Severity: 3
Rank (Obsolete): 6970

 Description   

Here are what I did:
1. format the system as 2.1.4 and then upgrade to 2.4, success.
2. showdown the filesystem and disable quota
3. downgrade the system to 2.1.4 again, when mount MDS, hit following errors

Here is the console of MDS:

Lustre: DEBUG MARKER: == upgrade-downgrade End == 18:53:45 (1362020025)
LDISKFS-fs warning (device sdb1): ldiskfs_fill_super: extents feature not enabled on this filesystem, use tune2fs.
LDISKFS-fs (sdb1): mounted filesystem with ordered data mode. Opts: 
LDISKFS-fs warning (device sdb1): ldiskfs_fill_super: extents feature not enabled on this filesystem, use tune2fs.
LDISKFS-fs (sdb1): mounted filesystem with ordered data mode. Opts: 
LDISKFS-fs warning (device sdb1): ldiskfs_fill_super: extents feature not enabled on this filesystem, use tune2fs.
LDISKFS-fs (sdb1): mounted filesystem with ordered data mode. Opts: 
Lustre: MGS MGS started
Lustre: 7888:0:(ldlm_lib.c:952:target_handle_connect()) MGS: connection from 7306ea48-8511-52b2-40cf-6424fc417e41@0@lo t0 exp (null) cur 1362020029 last 0
Lustre: MGC10.10.4.132@tcp: Reactivating import
Lustre: MGS: Logs for fs lustre were removed by user request.  All servers must be restarted in order to regenerate the logs.
Lustre: Setting parameter lustre-MDT0000-mdtlov.lov.stripesize in log lustre-MDT0000
Lustre: Setting parameter lustre-clilov.lov.stripesize in log lustre-client
Lustre: Enabling ACL
Lustre: Enabling user_xattr
LustreError: 7901:0:(osd_handler.c:2343:osd_index_try()) ASSERTION( dt_object_exists(dt) ) failed: 
LustreError: 7901:0:(osd_handler.c:2343:osd_index_try()) LBUG
Pid: 7901, comm: llog_process_th

Message from
Call Trace:
 syslogd@fat-amd [<ffffffffa03797f5>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
-1 at Feb 27 18: [<ffffffffa0379e07>] lbug_with_loc+0x47/0xb0 [libcfs]
53:49 ...
 ker [<ffffffffa0d6bd74>] osd_index_try+0x84/0x540 [osd_ldiskfs]
nel:LustreError: [<ffffffffa04c1dfe>] dt_try_as_dir+0x3e/0x60 [obdclass]
 7901:0:(osd_han [<ffffffffa0c5eb3a>] orph_index_init+0x6a/0x1e0 [mdd]
dler.c:2343:osd_ [<ffffffffa0c6ec45>] mdd_prepare+0x1d5/0x640 [mdd]
index_try()) ASS [<ffffffffa0ccd23c>] ? mdt_process_config+0x6c/0x1030 [mdt]
ERTION( dt_objec [<ffffffffa0da0499>] cmm_prepare+0x39/0xe0 [cmm]
t_exists(dt) ) f [<ffffffffa0ccfd7d>] mdt_device_alloc+0xe0d/0x2190 [mdt]
ailed: 

Me [<ffffffffa04bdeff>] ? keys_fill+0x6f/0x1a0 [obdclass]
ssage from syslo [<ffffffffa04a2c87>] obd_setup+0x1d7/0x2f0 [obdclass]
gd@fat-amd-1 at  [<ffffffffa048ef3b>] ? class_new_export+0x72b/0x960 [obdclass]
Feb 27 18:53:49  [<ffffffffa04a2fa8>] class_setup+0x208/0x890 [obdclass]
...
 kernel:Lu [<ffffffffa04aac6c>] class_process_config+0xc3c/0x1c30 [obdclass]
streError: 7901: [<ffffffffa037a993>] ? cfs_alloc+0x63/0x90 [libcfs]
0:(osd_handler.c [<ffffffffa04a5813>] ? lustre_cfg_new+0x353/0x7e0 [obdclass]
:2343:osd_index_ [<ffffffffa04acd0b>] class_config_llog_handler+0x9bb/0x1610 [obdclass]
try()) LBUG
 [<ffffffffa0637e3b>] ? llog_client_next_block+0x1db/0x4b0 [ptlrpc]
 [<ffffffffa0478098>] llog_process_thread+0x888/0xd00 [obdclass]
 [<ffffffffa0477810>] ? llog_process_thread+0x0/0xd00 [obdclass]
 [<ffffffff8100c14a>] child_rip+0xa/0x20
 [<ffffffffa0477810>] ? llog_process_thread+0x0/0xd00 [obdclass]
 [<ffffffffa0477810>] ? llog_process_thread+0x0/0xd00 [obdclass]
 [<ffffffff8100c140>] ? child_rip+0x0/0x20

Kernel panic - not syncing: LBUG
Pid: 7901, comm: llog_process_th Not tainted 2.6.32-279.14.1.el6_lustre.x86_64 #1
Call Trace:

 [<ffffffff814fdcba>] ? panic+0xa0/0x168
Message from sy [<ffffffffa0379e5b>] ? lbug_with_loc+0x9b/0xb0 [libcfs]
slogd@fat-amd-1  [<ffffffffa0d6bd74>] ? osd_index_try+0x84/0x540 [osd_ldiskfs]
at Feb 27 18:53: [<ffffffffa04c1dfe>] ? dt_try_as_dir+0x3e/0x60 [obdclass]
49 ...
 kernel [<ffffffffa0c5eb3a>] ? orph_index_init+0x6a/0x1e0 [mdd]
:Kernel panic -  [<ffffffffa0c6ec45>] ? mdd_prepare+0x1d5/0x640 [mdd]
not syncing: LBU [<ffffffffa0ccd23c>] ? mdt_process_config+0x6c/0x1030 [mdt]
G
 [<ffffffffa0da0499>] ? cmm_prepare+0x39/0xe0 [cmm]
 [<ffffffffa0ccfd7d>] ? mdt_device_alloc+0xe0d/0x2190 [mdt]
 [<ffffffffa04bdeff>] ? keys_fill+0x6f/0x1a0 [obdclass]
 [<ffffffffa04a2c87>] ? obd_setup+0x1d7/0x2f0 [obdclass]
 [<ffffffffa048ef3b>] ? class_new_export+0x72b/0x960 [obdclass]
 [<ffffffffa04a2fa8>] ? class_setup+0x208/0x890 [obdclass]
 [<ffffffffa04aac6c>] ? class_process_config+0xc3c/0x1c30 [obdclass]
 [<ffffffffa037a993>] ? cfs_alloc+0x63/0x90 [libcfs]
 [<ffffffffa04a5813>] ? lustre_cfg_new+0x353/0x7e0 [obdclass]
 [<ffffffffa04acd0b>] ? class_config_llog_handler+0x9bb/0x1610 [obdclass]
 [<ffffffffa0637e3b>] ? llog_client_next_block+0x1db/0x4b0 [ptlrpc]
 [<ffffffffa0478098>] ? llog_process_thread+0x888/0xd00 [obdclass]
 [<ffffffffa0477810>] ? llog_process_thread+0x0/0xd00 [obdclass]
 [<ffffffff8100c14a>] ? child_rip+0xa/0x20
 [<ffffffffa0477810>] ? llog_process_thread+0x0/0xd00 [obdclass]
 [<ffffffffa0477810>] ? llog_process_thread+0x0/0xd00 [obdclass]
 [<ffffffff8100c140>] ? child_rip+0x0/0x20
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu


 Comments   
Comment by Zhenyu Xu [ 01/Mar/13 ]

I doubt it's related to new OI index file changed in 2.4

In 2.14, the calling path is mdd_prepare()-> orph_index_init() -> dt_store_open() // to open a dt_object named as "PENDING"
->dt_reg_open() ->dt_locate() ->lu_object_find() ->lu_object_find_at() ->lu_object_find_try ->lu_object_alloc ->loo_object_init() // Initialize "PENDING" dt_object

->osd_object_init() ->osd_fid_lookup() // lookup "PENDING" dt_object

osd_oi_lookup()
        result = osd_oi_lookup(info, oi, fid, id); 
        if (result == 0) {                         
           ......
        } else if (result == -ENOENT)
                result = 0;

If in OI index file, "PENDING" is not found there (2.4 changed OI index mechanism, could it be the reason?) osd_oi_lookup() returns 0, then osd_object_init() won't call osd_object_init0() and "PENDING" dt_object does not has LOHA_EXISTS in its common attributes.

Comment by Andreas Dilger [ 05/Mar/13 ]

"PENDING" should definitely exist, and I'd think it would be in the special "lookup by name" list instead of needing the OI?

Comment by Zhenyu Xu [ 06/Mar/13 ]

Add some log, which partially fit my description. During orph_index_init(), it find out that PENDING object has been created.

00000004:00000001:0.0:1362551173.779945:0:4818:0:(mdd_orphans.c:470:orph_index_init()) Process entered
00000020:00000001:0.0:1362551173.779945:0:4818:0:(dt_object.c:377:dt_store_open()) Process entered
00000020:00000001:0.0:1362551173.779952:0:4818:0:(dt_object.c:352:dt_reg_open()) Process entered
00000020:00000001:0.0:1362551173.779952:0:4818:0:(dt_object.c:222:dt_lookup()) Process entered
00000004:00000001:0.0:1362551173.779952:0:4818:0:(osd_handler.c:3804:osd_index_ea_lookup()) Process entered
00000004:00000001:0.0:1362551173.779953:0:4818:0:(osd_handler.c:2753:osd_get_fid_from_dentry()) Process leaving (rc=18446744073709551555 : -61 : ffffffffffffffc3)
00000004:00000001:0.0:1362551173.779954:0:4818:0:(osd_handler.c:1903:osd_ea_fid_get()) Process entered
00000004:00000001:0.0:1362551173.779955:0:4818:0:(osd_handler.c:1939:osd_ea_fid_get()) Process leaving (rc=0 : 0 : 0)
00000004:00000001:0.0:1362551173.779955:0:4818:0:(osd_handler.c:3099:osd_ea_lookup_rec()) Process leaving (rc=0 : 0 : 0)
00000004:00000001:0.0:1362551173.779956:0:4818:0:(osd_handler.c:3816:osd_index_ea_lookup()) Process leaving (rc=1 : 1 : 1)
00000020:00000001:0.0:1362551173.779956:0:4818:0:(dt_object.c:232:dt_lookup()) Process leaving (rc=0 : 0 : 0)
00000020:00000002:0.0:1362551173.779957:0:4818:0:(dt_object.c:355:dt_reg_open()) dt_locate [0x200000001:0x7:0x0] ==> PENDING fid
00000020:00000001:0.0:1362551173.779957:0:4818:0:(dt_object.c:245:dt_locate()) Process entered
00000020:00000001:0.0:1362551173.779957:0:4818:0:(lu_object.c:621:lu_object_find_at()) Process entered
00000020:00000001:0.0:1362551173.779958:0:4818:0:(lu_object.c:550:lu_object_find_try()) Process entered
00000020:00000001:0.0:1362551173.779959:0:4818:0:(lu_object.c:573:lu_object_find_try()) Process leaving (rc=18446612133311027672 : -131940398523944 : ffff88003b6a19d8) ==> found it in the hash table
00000020:00000001:0.0:1362551173.779959:0:4818:0:(lu_object.c:625:lu_object_find_at()) Process leaving (rc=18446612133311027672 : -131940398523944 : ffff88003b6a19d8)
00000020:00000001:0.0:1362551173.779960:0:4818:0:(dt_object.c:253:dt_locate()) Process leaving (rc=18446612133330352192 : -131940379199424 : ffff88003c90f840)
00000020:00000001:0.0:1362551173.779961:0:4818:0:(dt_object.c:360:dt_reg_open()) Process leaving (rc=18446612133330352192 : -131940379199424 : ffff88003c90f840)
00000020:00000001:0.0:1362551173.779961:0:4818:0:(lustre_fid.h:375:fid_flatten32()) Process leaving (rc=4261420800 : 4261420800 : fe001f00)
00000020:00000001:0.0:1362551173.779962:0:4818:0:(dt_object.c:387:dt_store_open()) Process leaving (rc=18446612133330352192 : -131940379199424 : ffff88003c90f840)
00000004:00020000:0.0:1362551173.779963:0:4818:0:(osd_handler.c:2345:osd_index_try()) dt does not exists
00000004:00020000:0.0:1362551173.780032:0:4818:0:(mdd_orphans.c:478:orph_index_init()) "PENDING" is not an index! : rc = -20

so I look back to when this object was created, and I find that the PENDING dt_object was created in osd_prepare() => llo_local_objects_setup() => llo_store_create_index() => llo_create_obj()

00000004:00000001:0.0:1362555707.896340:0:4934:0:(mdt_handler.c:4881:mdt_object_init()) Process leaving (rc=0 : 0 : 0)
00000004:00000001:0.0:1362555707.896341:0:4934:0:(cmm_object.c:187:cml_object_init()) Process entered
00000004:00000010:0.0:1362555707.896341:0:4934:0:(mdd_object.c:248:mdd_object_alloc()) kmalloced 'mdd_obj': 136 at ffff88003d75cb40.
00000004:00000001:0.0:1362555707.896341:0:4934:0:(cmm_object.c:209:cml_object_init()) Process leaving (rc=0 : 0 : 0)
00000004:00000001:0.0:1362555707.896342:0:4934:0:(mdd_object.c:271:mdd_object_init()) Process entered
00000004:00000010:0.0:1362555707.896342:0:4934:0:(osd_handler.c:298:osd_object_alloc()) kmalloced 'mo': 192 at ffff88003d75cc00.
00000004:00000001:0.0:1362555707.896343:0:4934:0:(mdd_object.c:282:mdd_object_init()) Process leaving (rc=0 : 0 : 0)
00000004:00000001:0.0:1362555707.896343:0:4934:0:(osd_handler.c:444:osd_object_init()) Process entered
00000004:00000001:0.0:1362555707.896344:0:4934:0:(osd_handler.c:386:osd_fid_lookup()) Process entered
00000004:00000002:0.0:1362555707.896344:0:4934:0:(osd_handler.c:397:osd_fid_lookup()) osd_oi_lookup [0x200000001:0x7:0x0] returns -2 oi lookup cannot find the obj
00000004:00000001:0.0:1362555707.896344:0:4934:0:(osd_handler.c:421:osd_fid_lookup()) Process leaving (rc=0 : 0 : 0)
00000004:00000001:0.0:1362555707.896345:0:4934:0:(osd_handler.c:453:osd_object_init()) Process leaving (rc=0 : 0 : 0)

check out b2_1 version of osd_oi_lookup

osd_oi_lookup
        if (fid_seq(fid) == FID_SEQ_LOCAL_FILE)
                return -ENOENT;

2.1 does not use oi for local file lookup, that's the root cause.

Comment by nasf (Inactive) [ 06/Mar/13 ]

Try to remove the check "if (fid_seq(fid) == FID_SEQ_LOCAL_FILE)" from "osd_oi_lookup()".

Comment by Zhenyu Xu [ 06/Mar/13 ]

For the record, my test shows that removing the check works on this scenario, but panics on 2.1.4 formatted system.

Comment by Andreas Dilger [ 13/Mar/13 ]

To clarify, in 2.4 the "PENDING" FID is stored in the OI file, but in 2.1 it is not? And 2.1 does not like this?

Is it still possible to get a patch into 2.1.5 to fix this? Is this caused by the initial LFSCK scan added in 2.4 to fix the OI for local objects?

Comment by nasf (Inactive) [ 13/Mar/13 ]

In 2.4, the "PENDING" FID is added into local file, but it is NOT in 2.1. We can back port OI scrub related patches (including initial OI scrub) to b2_1, part of the back porting are as following:

http://review.whamcloud.com/#change,4620
http://review.whamcloud.com/#change,4621
http://review.whamcloud.com/#change,4623
http://review.whamcloud.com/#change,4624
http://review.whamcloud.com/#change,4626
http://review.whamcloud.com/#change,4627
http://review.whamcloud.com/#change,4628
http://review.whamcloud.com/#change,4629
http://review.whamcloud.com/#change,4630

I do not think the back porting can be ready in a short time. So the better way is to fix b2_1 with removing some check. If there are other bugs after removing, we can try to resolve them one by one. I think it will be faster than the whole back porting.

Comment by Oleg Drokin [ 15/Mar/13 ]

Well, we should not really crash unfixed 2.1 servers.
and 2.1.5 should be released any moment now too so there's not tiem for any development to fit there.
We need to think up something in 2.4, and fast I think

Comment by Zhenyu Xu [ 15/Mar/13 ]

just posted a 2.1 patch to port only necessary ldiskfs based OI implementation at http://review.whamcloud.com/5731

Comment by Jodi Levi (Inactive) [ 20/Mar/13 ]

Will there also be a patch for master?

Comment by Zhenyu Xu [ 27/Mar/13 ]

Jodi,

No, master does not need a patch, this patch is to make 2.1.4 server OI implementation align to that of master.

Comment by Oleg Drokin [ 27/Mar/13 ]

Can yu please rebase this on top of current b2_1?

Comment by Zhenyu Xu [ 28/Mar/13 ]

ok, and done

Comment by Jian Yu [ 02/Apr/13 ]

just posted a 2.1 patch to port only necessary ldiskfs based OI implementation at http://review.whamcloud.com/5731

Here are the test configuration and result:

Lustre b2_1 build: http://build.whamcloud.com/job/lustre-reviews/14375/
Lustre master build: http://build.whamcloud.com/job/lustre-master/1369/
Distro/Arch: RHEL6.3/x86_64

Clean upgrade and downgrade path: b2_1->master->b2_1

After downgrading from master to b2_1, mounting the server targets and clients succeeded. However, on the MDS node, "lctl dl" showed that:

[root@wtm-83 ~]# lctl dl
  0 UP mgs MGS MGS 15
  1 UP mgc MGC10.10.19.8@tcp ac763461-679d-82b7-e00e-7e3d7f5e6234 5
  2 UP lov lustre-MDT0000-mdtlov lustre-MDT0000-mdtlov_UUID 4
  3 UP mdt lustre-MDT0000 lustre-MDT0000_UUID 9
  4 UP mds mdd_obd-lustre-MDT0000 mdd_obd_uuid-lustre-MDT0000 3
  5 IN osc lustre-OST0000-osc-MDT0000 lustre-MDT0000-mdtlov_UUID 5
  6 IN osc lustre-OST0001-osc-MDT0000 lustre-MDT0000-mdtlov_UUID 5

Dmesg on the MDS node showed that:

Lustre: MGS MGS started
Lustre: 10437:0:(ldlm_lib.c:952:target_handle_connect()) MGS: connection from ac763461-679d-82b7-e00e-7e3d7f5e6234@0@lo t0 exp (null) cur 1365015074 last 0
Lustre: MGC10.10.19.8@tcp: Reactivating import
Lustre: Enabling ACL
Lustre: Enabling user_xattr
Lustre: lustre-MDT0000: used disk, loading
Lustre: 10441:0:(mdt_lproc.c:416:lprocfs_wr_identity_upcall()) lustre-MDT0000: identity upcall set to /usr/sbin/l_getidentity
LustreError: 10441:0:(llog_lvfs.c:199:llog_lvfs_read_header()) bad log / header magic: 0x2e (expected 0x10645539)
LustreError: 10441:0:(llog_obd.c:220:llog_setup_named()) obd lustre-OST0000-osc-MDT0000 ctxt 2 lop_setup=ffffffffa0562ca0 failed -5
LustreError: 10441:0:(osc_request.c:4231:__osc_llog_init()) failed LLOG_MDS_OST_ORIG_CTXT
LustreError: 10441:0:(osc_request.c:4248:__osc_llog_init()) osc 'lustre-OST0000-osc-MDT0000' tgt 'mdd_obd-lustre-MDT0000' catid ffff880c24f6b8b0 rc=-5
LustreError: 10441:0:(osc_request.c:4250:__osc_llog_init()) logid 0x2:0x0
LustreError: 10441:0:(osc_request.c:4278:osc_llog_init()) rc: -5
LustreError: 10441:0:(lov_log.c:248:lov_llog_init()) error osc_llog_init idx 0 osc 'lustre-OST0000-osc-MDT0000' tgt 'mdd_obd-lustre-MDT0000' (rc=-5)
LustreError: 10441:0:(llog_lvfs.c:616:llog_lvfs_create()) error looking up logfile 0x4:0x0: rc -116
LustreError: 10441:0:(llog_obd.c:220:llog_setup_named()) obd lustre-OST0001-osc-MDT0000 ctxt 2 lop_setup=ffffffffa0562ca0 failed -116
LustreError: 10441:0:(osc_request.c:4231:__osc_llog_init()) failed LLOG_MDS_OST_ORIG_CTXT
LustreError: 10441:0:(osc_request.c:4248:__osc_llog_init()) osc 'lustre-OST0001-osc-MDT0000' tgt 'mdd_obd-lustre-MDT0000' catid ffff880c24f6b8b0 rc=-116
LustreError: 10441:0:(osc_request.c:4250:__osc_llog_init()) logid 0x4:0x0
LustreError: 10441:0:(osc_request.c:4278:osc_llog_init()) rc: -116
LustreError: 10441:0:(lov_log.c:248:lov_llog_init()) error osc_llog_init idx 1 osc 'lustre-OST0001-osc-MDT0000' tgt 'mdd_obd-lustre-MDT0000' (rc=-116)
Lustre: 10566:0:(debug.c:326:libcfs_debug_str2mask()) You are trying to use a numerical value for the mask - this will be deprecated in a future release.
Lustre: 10567:0:(debug.c:326:libcfs_debug_str2mask()) You are trying to use a numerical value for the mask - this will be deprecated in a future release.
Lustre: 10437:0:(ldlm_lib.c:952:target_handle_connect()) MGS: connection from 4447b0f0-2f2f-51f4-cd9f-aa011ef3eb77@10.10.19.17@tcp t0 exp (null) cur 1365015077 last 0
Lustre: 10209:0:(client.c:1817:ptlrpc_expire_one_request()) @@@ Request  sent has timed out for slow reply: [sent 1365015074/real 1365015074]  req@ffff8805fb180800 x1431322036797450/t0(0) o8->lustre-OST0000-osc-MDT0000@10.10.19.17@tcp:28/4 lens 368/512 e 0 to 1 dl 1365015079 ref 1 fl Rpc:XN/0/ffffffff rc 0/-1
Lustre: 10437:0:(ldlm_lib.c:952:target_handle_connect()) MGS: connection from a8451e2f-8501-14bd-8ab3-88e0df1b7640@10.10.19.26@tcp t0 exp (null) cur 1365015079 last 0
Lustre: 10209:0:(client.c:1817:ptlrpc_expire_one_request()) @@@ Request  sent has timed out for slow reply: [sent 1365015075/real 1365015075]  req@ffff880626de8800 x1431322036797451/t0(0) o8->lustre-OST0001-osc-MDT0000@10.10.19.26@tcp:28/4 lens 368/512 e 0 to 1 dl 1365015080 ref 1 fl Rpc:XN/0/ffffffff rc 0/-1
Lustre: 10437:0:(ldlm_lib.c:952:target_handle_connect()) MGS: connection from a2dec252-dec3-5b33-4395-9b26a06a9dac@10.10.18.253@tcp t0 exp (null) cur 1365015081 last 0
Lustre: lustre-MDT0000: Temporarily refusing client connection from 10.10.18.253@tcp
Lustre: lustre-MDT0000: Temporarily refusing client connection from 10.10.18.253@tcp
Lustre: lustre-MDT0000: Temporarily refusing client connection from 10.10.18.253@tcp
Lustre: lustre-MDT0000: Temporarily refusing client connection from 10.10.18.253@tcp
LustreError: 10599:0:(lov_log.c:160:lov_llog_origin_connect()) error osc_llog_connect tgt 1 (-107)
LustreError: 10598:0:(mds_lov.c:832:__mds_lov_synchronize()) lustre-OST0000_UUID failed at llog_origin_connect: -107
LustreError: 10598:0:(mds_lov.c:861:__mds_lov_synchronize()) sync lustre-OST0000_UUID failed -107
LustreError: 10598:0:(mds_lov.c:865:__mds_lov_synchronize()) deactivating lustre-OST0000_UUID
LustreError: 10599:0:(lov_log.c:160:lov_llog_origin_connect()) Skipped 1 previous similar message
LustreError: 10599:0:(mds_lov.c:832:__mds_lov_synchronize()) lustre-OST0001_UUID failed at llog_origin_connect: -107
LustreError: 10599:0:(mds_lov.c:861:__mds_lov_synchronize()) sync lustre-OST0001_UUID failed -107
LustreError: 10599:0:(mds_lov.c:865:__mds_lov_synchronize()) deactivating lustre-OST0001_UUID
Lustre: 10454:0:(ldlm_lib.c:952:target_handle_connect()) lustre-MDT0000: connection from d03c55d9-e816-05ed-ff50-0ba89f2504bb@10.10.18.253@tcp t0 exp (null) cur 1365015101 last 0
Lustre: DEBUG MARKER: Using TIMEOUT=20
Lustre: DEBUG MARKER: 2 OST are inactive after 20 seconds, give up

Test report is still in Maloo import queue.

Comment by Minh Diep [ 04/Apr/13 ]

Here is the test report: https://maloo.whamcloud.com/test_sessions/f77f5032-9cd5-11e2-802d-52540035b04c

Comment by Oleg Drokin [ 08/Apr/13 ]

So is my reaing right that the test actually failed because all OSCs are in inactive state, so it won't be possible to create any new files on such a filesystem? I do not see any attempts for the test to actually create anything post-downgrade so perhaps it's a case we are missing?

Comment by Zhenyu Xu [ 09/Apr/13 ]

I don't know about the test case, but the latest error has something about CATALOGS file changing in 2.4.

the CATALOGS write by 2.1 is as follows (logid is i_ino+ __u64 0x0+i_generation)

  1. od -x /mnt/mds1/CATALOGS
    0000000 0021 0000 0000 0000 0000 0000 0000 0000
    0000020 2a9d 1d4f 0000 0000 0000 0000 0000 0000
    0000040 0022 0000 0000 0000 0000 0000 0000 0000
    0000060 2a9e 1d4f 0000 0000 0000 0000 0000 0000
    0000100 0023 0000 0000 0000 0000 0000 0000 0000
    0000120 2a9f 1d4f 0000 0000 0000 0000 0000 0000
    0000140

after 2.4 mounted it, the CATALOGS logic arrays changes to

  1. od -x /mnt/mds1/CATALOGS
    0000000 0002 0000 0000 0000 0001 0000 0000 0000
    0000020 0000 0000 0000 0000 0000 0000 0000 0000
    0000040 0004 0000 0000 0000 0001 0000 0000 0000
    0000060 0000 0000 0000 0000 0000 0000 0000 0000
    0000100 0006 0000 0000 0000 0001 0000 0000 0000
    0000120 0000 0000 0000 0000 0000 0000 0000 0000
    0000140
Comment by Zhenyu Xu [ 09/Apr/13 ]

Without those patches having on-disk change porting backward, the upgrade then downgrade test would be a headache.

Comment by Jian Yu [ 09/Apr/13 ]

So is my reaing right that the test actually failed because all OSCs are in inactive state, so it won't be possible to create any new files on such a filesystem?

Right, touching a new file on Lustre client failed as follows:

# touch /mnt/lustre/file
touch: cannot touch `/mnt/lustre/file': Input/output error

I do not see any attempts for the test to actually create anything post-downgrade so perhaps it's a case we are missing?

The upgrade/downgrade testing needs to be performed as per wiki page https://wiki.hpdd.intel.com/display/ENG/Upgrade+and+Downgrade+Testing. As we can see, the data creating/verifying steps are included in the post-downgrade phases. However, these test cases are not covered in one test script currently. The script which detected the issue in this ticket was upgrade-downgrade.sh, which covered extra quotas and OST pools testing along the upgrade/downgrade path.

The issue is that while performing this script to do downgrade testing, the extra quotas testing was disabled (due to the new way of setting quotas on master branch), only OST pools testing was covered along the downgrade path, which only verified that the existing files/directories could be accessed and the striping info was correct, but did not create new files.

So, in order to cover all of the test cases in the wiki page, we need improve upgrade-downgrade.sh to make the quotas codes work on master branch, and also need run the other two test scripts {clean,rolling}-upgrade-downgrade.sh before the test cases covered by them are added into upgrade-downgrade.sh.

Comment by Zhenyu Xu [ 09/Apr/13 ]

This log shows that 2.4 MDT start cannot find the old llog objects, and created new ones in 2.4 way (using llog_osd_ops), which 2.1 code (using llog_lvfs_ops) cannot recognise.

Comment by Zhenyu Xu [ 10/Apr/13 ]

Actually, I found that when 2.1 formatted disk upgraded 2.4, all files' size becomes 0, their content are lost.

Comment by Andreas Dilger [ 10/Apr/13 ]

Bobijam, that sounds like a very critical problem. Does conf-sanity test 32 not detect this problem during 2.1 to 2.4 upgrade? Is that problem repeatable?

Please file a separate bug for that problem and make it a 2.4 blocker until it is better understood and fixed.

Comment by Alex Zhuravlev [ 10/Apr/13 ]

this is rather strange.. I do remember Li Wei improved conf-sanity/32 to verify actual data with md5sum.

Comment by Zhenyu Xu [ 10/Apr/13 ]

Is it possible that the disk2_1-ldiskfs.tar.bz2 was created with an outdated compatible b2_1 version? I just tested with current b2_1 and master branch, the procedure is

1. create a lustre filesystem with b2_1 version
2. copy /etc/* to this filesystem
3. umount it
4. mount the file system with master version, succeeded
5. 'ls -l' the filesystem, all files are there but all sized 0 with no content.

Comment by Alex Zhuravlev [ 10/Apr/13 ]

iirc, Li Wei did put a function to create such an image in conf-sanity.sh

Comment by Zhenyu Xu [ 10/Apr/13 ]

strangely, I don't even need master version, with b2_1 alone, format & mount & copy files & umount & mount it again, all files become 0.

btw, I'm using current b2_1 lustre code with linux-2.6.32-279.22.1.el6 kernel code.

Comment by Zhenyu Xu [ 10/Apr/13 ]

Fired a ticket (LU-3141) for the 'empty file' issue.

Comment by Zhenyu Xu [ 10/Apr/13 ]

it turns out that the 'empty file' issue is not a bug, I was using llmountcleanup.sh which calls 'umount -f' and it does not flush dirty data.

I'll push another patch which can pass the upgrade & downgrade test on my VM environment.

Comment by Zhenyu Xu [ 11/Apr/13 ]

Wang Di,

The upgrade test shows these messages on client side

Maloo report: https://maloo.whamcloud.com/test_sessions/ef5c83fe-a2be-11e2-81ba-52540035b04c

I found the following error messages in the console log of client wtm-81 after upgrading:

LustreError: 33998:0:(lustre_idl.h:705:ostid_to_fid()) bad MDT0 id, 0x6dec:1024 ost_idx:0
LustreError: 33998:0:(lustre_idl.h:705:ostid_to_fid()) bad MDT0 id, 0x6dec:1024 ost_idx:0
LustreError: 33998:0:(lustre_idl.h:705:ostid_to_fid()) bad MDT0 id, 0x6d78:1024 ost_idx:0
LustreError: 33998:0:(lustre_idl.h:705:ostid_to_fid()) Skipped 31 previous similar messages
LustreError: 33998:0:(lustre_idl.h:705:ostid_to_fid()) bad MDT0 id, 0x6d6d:1024 ost_idx:0

I noticed that it's from your recent patch, what the issue could it be? Is it potentially harmful?

Comment by Zhenyu Xu [ 11/Apr/13 ]

Just update what I found. My local test shows the error message is from lov_attr_get_raid0()

00020000:00000001:0.0:1365706828.914809:0:18347:0:(lov_object.c:420:lov_attr_get_raid0()) Process entered
00020000:00020000:0.0:1365706828.914809:0:18347:0:(lustre_idl.h:705:ostid_to_fid()) bad MDT0 id, 0x54:1024 ost_idx:0
00020000:00000002:0.0:1365706828.914810:0:18347:0:(lov_merge.c:76:lov_merge_lvb_kms()) MDT FID [0x0:0x0:0x0] initial value: s=0 m=9223372036854775808 a=9223372036854775808 c=9223372036854775808 b=0
00020000:00000001:0.0:1365706828.914811:0:18347:0:(lov_offset.c:59:lov_stripe_size()) Process entered
00020000:00000001:0.0:1365706828.914811:0:18347:0:(lov_offset.c:74:lov_stripe_size()) Process leaving (rc=370 : 370 : 172)
00020000:00000001:0.0:1365706828.914812:0:18347:0:(lov_offset.c:59:lov_stripe_size()) Process entered
00020000:00000001:0.0:1365706828.914812:0:18347:0:(lov_offset.c:74:lov_stripe_size()) Process leaving (rc=370 : 370 : 172)
00020000:00000002:0.0:1365706828.914813:0:18347:0:(lov_merge.c:110:lov_merge_lvb_kms()) MDT FID [0x0:0x0:0x0] on OST[1]: s=370 m=1365706747 a=1365706747 c=1365706747 b=8
00020000:00000001:0.0:1365706828.914814:0:18347:0:(lov_merge.c:119:lov_merge_lvb_kms()) Process leaving (rc=0 : 0 : 0)
00000020:00000001:0.0:1365706828.914814:0:18347:0:(cl_object.c:1019:cl_lvb2attr()) Process entered
00000020:00000001:0.0:1365706828.914814:0:18347:0:(cl_object.c:1025:cl_lvb2attr()) Process leaving
00020000:00000001:0.0:1365706828.914815:0:18347:0:(lov_object.c:476:lov_attr_get_raid0()) Process leaving (rc=0 : 0 : 0)

while in lov_merge_lvb_kms(), stack variable 'fid' has no effect except for displaying debug messages.

WangDi, need your input.

Comment by Andreas Dilger [ 11/Apr/13 ]

Di, it appears that this might relate to http://review.whamcloud.com/5820 incorrectly converting struct llog_logid to use struct ost_id. The fields in that structure were already used a bit strangely, and I think that the ostid_to_fid() and fid_to_ostid() macros may be mangling the fields in this structure, since they were never really used as OST id/seq/, but rather MDS inode/0/generation.

On 1.8 the CATALOGS file looks like oid=ino/ogr=0/ogen=gen:

0000000 0000000000000021 0000000000000000
0000020 000000001d4f2a9d 0000000000000000
0000040 0000000000000022 0000000000000000
0000060 000000001d4f2a9e 0000000000000000
0000100 0000000000000023 0000000000000000
0000120 000000001d4f2a9f 0000000000000000

On 2.1 (upgraded from 1.8, if it matters) the CATALOGS file looks like oid=ino/oseq=1/ogen=gen:

000000 0000000000020002 0000000000000001
000010 00000000ec467621 0000000000000000
000020 0000000000020003 0000000000000001
000030 00000000ec467622 0000000000000000
000040 0000000000020004 0000000000000001
000050 00000000ec467623 0000000000000000
000060 0000000000020005 0000000000000001
000070 0000000095595788 0000000000000000
000080 000000000002005b 0000000000000001
000090 000000001ecc9141 0000000000000000

On 2.4 (new) the CATALOGS file looks like (f_seq=1/f_oid=oid/ogen=0):

000000 0000000000000001 0000000000000002
000010 0000000000000000 0000000000000000
000020 0000000000000001 0000000000000004
000030 0000000000000000 0000000000000000
000040 0000000000000001 0000000000000006
000050 0000000000000000 0000000000000000

I suspect that the latter change is unintentional, since I think it breaks the on-disk and on-wire llog_logid protocol. I'm just running another test with a pre 6794d7654b4c459519a9e6d85ed439c8c594c2e7 build to see what the CATALOGS file looks like.

Di, could you please work up a patch that reverts the changes to llog_logid and its usage, and we can see if that fixes this latest issue.

Comment by Andreas Dilger [ 11/Apr/13 ]

Only the latest issue may be related to LU-2684, not the original one.

Comment by Andreas Dilger [ 11/Apr/13 ]

The pre-LU-2684 CATALOGS file looks like:

000000 000000000000000a 0000000000000001
000010 0000000000000000 0000000000000000
000020 000000000000000c 0000000000000001
000030 0000000000000000 0000000000000000
000040 000000000000000e 0000000000000001
000050 0000000000000000 0000000000000000

so indeed this is an unintentional compatibility breakage with the new code.

Comment by Di Wang [ 12/Apr/13 ]

Bobi: Could you please try this patch? http://review.whamcloud.com/#change,6034 It seems lmm_oi is being overwritten by some other threads. As Andreas said it might related with ostid_to_fid for llog object. So this patch will use oi_id/oi_seq directly to identify the log object, so to avoid ostid_to_fid conversion. Could you please try a few times, I guess this problem can not be reproduced often, at least I can not reproduce it locally. Thanks.

Comment by Zhenyu Xu [ 12/Apr/13 ]

http://review.whamcloud.com/6034 does not solve the issue. The error message is not from llog handling, it's from stat/ls the file created by 2.1 system.

attached is the -1 log.

Comment by Zhenyu Xu [ 12/Apr/13 ]

I have an example of ostid here extracted from lov_merge_lvb_kms()

LustreError: 8277:0:(lustre_idl.h:705:ostid_to_fid()) bad MDT0 id, 0x51:1024 ost_idx:0
LustreError: 8277:0:(lustre_idl.h:706:ostid_to_fid()) 0x51:0x200000400

The second log message format is as follows

                        CERROR("bad MDT0 id, "DOSTID" ost_idx:%u\n",
                                POSTID(ostid), ost_idx);
                        CERROR(LPX64":"LPX64"\n", ostid->oi.oi_id, ostid->oi.oi_seq);
Comment by Di Wang [ 12/Apr/13 ]

Hmm, the problem is that in 2.1, we define the lsm/lmm in this

struct lov_mds_md_v1 {            /* LOV EA mds/wire data (little-endian) */
        __u32 lmm_magic;          /* magic number = LOV_MAGIC_V1 */
        __u32 lmm_pattern;        /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
        __u64 lmm_object_id;      /* LOV object ID */
        __u64 lmm_object_seq;     /* LOV object seq number */
        __u32 lmm_stripe_size;    /* size of stripe in bytes */
        __u32 lmm_stripe_count;   /* num stripes in use for this object */
        struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
};        

But lmm_object_seq/lmm_object_id is actually normal MDT FIDS, i.e. lmm_object_id/lmm_object_seq will be f_oid/normal_seq, and when unpack lmm to lsm on 2.4,

it will use ostid_le_to_cpu()

static inline void ostid_le_to_cpu(struct ost_id *src_oi,
                                   struct ost_id *dst_oi)
{
        if (fid_seq_is_mdt0(ostid_seq(src_oi))) {
                dst_oi->oi.oi_id = le64_to_cpu(src_oi->oi.oi_id);
                dst_oi->oi.oi_seq = le64_to_cpu(src_oi->oi.oi_seq);
        } else {
                fid_le_to_cpu(&dst_oi->oi_fid, &src_oi->oi_fid);
        }
}

And treat the ostid as normal FID, which cause the problem.

Sigh, it seems we do not have better way to convert this special ostid to the real FID.

Comment by Di Wang [ 12/Apr/13 ]

http://review.whamcloud.com/#change,6037 Bobi: please check this one. Thanks!

Comment by Zhenyu Xu [ 12/Apr/13 ]

yes, with http://review.whamcloud.com/5731 on b2_1 and http://review.whamcloud.com/6034 and http://review.whamcloud.com/6037 on master, the downgrade and upgrade test passed with no noise.

Comment by Jodi Levi (Inactive) [ 12/Apr/13 ]

Change/6034 and 6037 have been merged into http://review.whamcloud.com/#change,6044

Comment by Jodi Levi (Inactive) [ 15/Apr/13 ]

Landed for 2.4

Comment by Zhenyu Xu [ 15/Apr/13 ]

http://review.whamcloud.com/#change,5731 hasn't landed on b2_1 yet, need that to be claimed to be fixed.

Comment by Jodi Levi (Inactive) [ 15/Apr/13 ]

Reducing 2.4 blocker, but keeping open until lands on b2_1.

Comment by Sarah Liu [ 16/Apr/13 ]

Please also make changes to b1_8, hit the same LBUG after downgrade from the latest tag-2.3.64 to 1.8.9

Lustre: Enabling user_xattr
LustreError: 27458:0:(osd_handler.c:2343:osd_index_try()) ASSERTION( dt_object_exists(dt) ) failed: 
LustreError: 27458:0:(osd_handler.c:2343:osd_index_try()) LBUG
Pid: 27458, comm: llog_process_th
Comment by Zhenyu Xu [ 16/Apr/13 ]

Do we support 2.x to 1.8 downgrade?

Comment by Sarah Liu [ 16/Apr/13 ]

Sorry, I was downgraded the system to b2_1 by mistake, 1.8.9<->2.4 doesn't have this issue.

Comment by Zhenyu Xu [ 18/Apr/13 ]

landed on b2_1 for 2.1.6

Comment by Cory Spitz [ 13/May/13 ]

Yes, I think that we should support 1.8.x->2.4->1.8.9-wc1 upgrade & downgrade. Of course, w/o dirdata and large_xattr, etc. used.

Comment by Cory Spitz [ 20/May/13 ]

I also think that 2.3->2.4->2.3 upgrade & downgrade should be supported. But this bug occurs there as well. Is the appropriate response to reopen this ticket and mark it as affecting 2.3 (and I suppose 2.2 too)? Or should we make a clone?

Also, I think it is a pretty bad story that we'd have to get a fix onto b2_3 to make the upgrade/downgrade scenario work. Because even if we get the existing patch landed to b2_3 you can't revert to 2.3.0.

Comment by Sarah Liu [ 25/Jul/13 ]

I hit this issue when downgrade from 2.5 to 2.3.0, will create a new issue for that.

Generated at Sat Feb 10 01:29:04 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.