[LU-387] Test failure on test suite mmp Created: 02/Jun/11 Updated: 11/Oct/11 Resolved: 15/Jul/11 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.1.0, Lustre 1.8.6 |
| Fix Version/s: | Lustre 2.1.0, Lustre 1.8.7 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Maloo | Assignee: | Niu Yawei (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Severity: | 3 |
| Rank (Obsolete): | 4954 |
| Description |
|
This issue was created by maloo for sarah <sarah@whamcloud.com> This issue relates to the following test suite run: https://maloo.whamcloud.com/test_sets/452782d2-8d47-11e0-aab9-52540025f9af. |
| Comments |
| Comment by Sarah Liu [ 02/Jun/11 ] |
|
this one can be reproduced. |
| Comment by Niu Yawei (Inactive) [ 07/Jun/11 ] |
|
Looks the e2fsck has already completed before we try to kill it, I suspect it's a test script problem, looking into the test_9, we can see we always sleep (2 * mmp_interval) before killing the e2fsck process, I'm afraid that the fsck might have been finished during this period, and I don't quite understand why we have to wait for (2 * mmp_interval). Johann, could you take a look on this? Thanks in advance. |
| Comment by Peter Jones [ 07/Jun/11 ] |
|
Niu I understand from Johann that you have discussed this on Skype and now have a way forward on this issue so I am assigning it to you Peter |
| Comment by Niu Yawei (Inactive) [ 08/Jun/11 ] |
|
The e2fsck should last at least (2 * mmp_check_inteval), so I don't see why the script can't find e2fsck process when it trying to ternimate it. Hi, Sarah |
| Comment by Sarah Liu [ 09/Jun/11 ] |
|
with this patch, test 9 can pass. due to |
| Comment by Niu Yawei (Inactive) [ 09/Jun/11 ] |
|
This diagnostic patch just print more information in the test script, it should not affect the test result. From the output of this round of test, looks the mmp_check_interval is much shorter than the previous round, that could be the reason of why the bug wasn't triggered this time. Hi, Sarah, was there any test environment being changed during those two round of tests? Could you try to figure out that if the bug is still reproducable? (then try to reproduce it with the diagnostic patch). Thank you in advance. |
| Comment by Peter Jones [ 09/Jun/11 ] |
|
Sarah There is a patch ready for LU404 now so perhaps trying with that will enable you to run the test with auster as before Peter |
| Comment by Sarah Liu [ 09/Jun/11 ] |
|
Niu, Yes, the test environment changed a little bit. In the first run, there are three osts and two lustre clients; the second run, I uses two osts and only one lustre client. Today I run this test again on build #149 since the build with fix of https://maloo.whamcloud.com/test_sets/cc1962fa-92e8-11e0-a0d3-525400 Also, please find the mds log in the attached. |
| Comment by Niu Yawei (Inactive) [ 09/Jun/11 ] |
|
Hi, Sarah, looks the maloo link is broken? |
| Comment by Sarah Liu [ 10/Jun/11 ] |
|
https://maloo.whamcloud.com/test_sets/cc1962fa-92e8-11e0-a0d3-52540025f9af |
| Comment by Niu Yawei (Inactive) [ 14/Jun/11 ] |
|
Hi, Sarah I adjust the diagnostic patch slightly, could you reproduce it with this patch again, thanks a lot. |
| Comment by Niu Yawei (Inactive) [ 14/Jun/11 ] |
|
It's really nice that Yujian found a log with timestamp: 20:33:18:== mmp test 9: mount after aborted e2fsck ============================================================ 13:33:16 (1307824396) From the timestamp, we can see the e2fsck waited for (2 * mmp_check_interval + 1) = 11 seconds before setting EXT2_MMP_SEQ_FSCK and start fsck, however, the fsck finished in 1 (or less than 1) second! So it's quite possible that the e2fsck has completed before the test script trying to kill it. (The test script has to wait for (2 * mmp_check_interval) = 10 seconds before killing the e2fsck otherwise, EXT2_MMP_SEQ_FSCK might not be set). The solution I can think out so far is that we should fill the filesystem with more inodes and blocks before the test_9, then the fsck duration will be enlarged. Andreas & Johann, what's you opinion? Thanks. |
| Comment by Andreas Dilger [ 14/Jun/11 ] |
|
If e2fsck is run with the "-F" option it will flush the disk cache, so it should increase the test time somewhat due to extra disk seeks. I think the reason that this e2fsck is now running so quickly is because of Depending on the state of the filesystem when e2fsck is first run, I think this test may still be valid if the wait interval is only $(( {mdt,ost}_mmp_check_interval + 4)) or so. If the initial state of the MMP block is "clean" In any case, I don't think this bug is a blocker for the release, since it is a well-understood failure with the test script only, and does not implicate a problem with the MMP code itself (as we still see a wait interval of 2x the wait interval). |
| Comment by Niu Yawei (Inactive) [ 15/Jun/11 ] |
|
Thanks for your comment, Andreas. The "-F" option can only increase the time before e2fsck trying to change mmp block, seems it can't help much for this case. If the initial state of MMP block is "clean", the e2fsck will: 1. set MMP block with a random seq; I think the purpose of this test is to see if ext3/4 mount can aware of running e2fsck by checking mmp seq = EXT2_MMP_SEQ_FSCK, which means the e2fsck must be killed during phase 4, otherwise, the test might fail. The problem is that it's hard for the test script to know exactly when the e2fsck is in phase 4 and ensure it's terminated in phase 4 by some way. I think the only way is to enlarge the duration of phase 4 (that might needs fill the filesystem with inodes/blocks), am I understanding right? Anyway, let's try to create some inodes before testing to see if it works. |
| Comment by Niu Yawei (Inactive) [ 15/Jun/11 ] |
|
Hi, Sarah |
| Comment by Andreas Dilger [ 15/Jun/11 ] |
|
Niu, the "-F" flag will flush all of the cache for the device, so any IO done during pass 1-5 will have to be loaded from disk instead of from cache... That said, if there aren't many files in the filesystem it may still complete too quickly, so creating files is one way to slow it down. For landing this patch to git, if it fixes the problem, I would suggest creating the files in a subdirectory, like: DIR=$MOUNT/d0.mmp so that it spreads the files across the block groups and slows down access. Using "e2fsck -F" will still help. |
| Comment by Niu Yawei (Inactive) [ 15/Jun/11 ] |
|
Thank you, Andreas. Yes, I was wrong on the "-F" option. |
| Comment by Niu Yawei (Inactive) [ 15/Jun/11 ] |
|
Hi, Sarah, I updated the patch according to Andreas' comments, pleasee try this one. Thanks. |
| Comment by Sarah Liu [ 16/Jun/11 ] |
|
with this patch, failed again, please find logs in the attached. |
| Comment by Niu Yawei (Inactive) [ 16/Jun/11 ] |
|
Thank you, Sarah. From the log, we can see the test failed for mounting OST device, seems fsck on OST device is still too fast. (I created 100000 objects, and enabled "-F" option, looks it's still not enough). Actually, though the test for MDS device passed, it's not we expected, because the mount is not failed for MMP block checking, instead, the mount failed because the e2fsck is still running... So we are not sure if the "create dir" slow down fsck on MDS device. ================================================================================ Running e2fsck on the device /dev/sdc1 on ost1... The superblock could not be read or does not describe a correct ext2 From above log, we can see we sent abort signal to e2fsck process, but it didn't terminate immediately (maybe the process is running in kernel mode at that time), then mount MDS device failed for -EBUSY because the e2fsck process is opening the device. (we expect the mount fail with -EINVAL, since the ext3/4_fill_super() should return -EINVAL when it found the MMP block is in 'fsck' state) Actually, it's hard to guarantee the e2fsck terminate in an exact time period by kill command (you know, signal isn't realtime), in another word, it's hard to make sure the e2fsck being killed during the phase 4(pass 1 - 5). I checked some passed tests on maloo, looks they are all passed because of e2fsck not being killed, which means though the test can pass sometimes, but the results aren't valid. Now I'm wondering if we should spend more effort on this test? IMHO, the test method isn't valid, could we just simply disable it for now? Andreas, what do you think about? Thanks. |
| Comment by Andreas Dilger [ 16/Jun/11 ] |
|
I dislike disabling tests, because they very rarely get enabled again, which opens a hole for bugs to enter. Note that I don't actually consider the test to be incorrect if the MDT or OST mount fails due to e2fsck still running, since this is still correctly checking that the EXT2_MMP_SEQ_FSCK is preventing the mount from ever succeeding (the server should print "fsck is running on the filesystem" to the kernel dmesg and fail mounting). One possible way to ensure e2fsck is stopped before exiting is to use gdb to interrupt it at the start of pass1() or similar, after ext2fs_mmp_start() is run: echo -e "break e2fsck_pass1\nrun -fy $MMP_MDSDEV\nquit" > $TMP/mds_gdb_cmds This will interrupt e2fsck with mmp_seq = EXT2_MMP_SEQ_FSCK, and no need to use "sleep" or other random occurrences. One possible problem is that both "gdb" and "e2fsprogs-debuginfo" packages need to be installed on the nodes running e2fsck, which may be a problem in some test environments. |
| Comment by Niu Yawei (Inactive) [ 16/Jun/11 ] |
|
Hi, Andreas If the test_9 is running on single client node, the mount will just return -EBUSY before checking the MMP block when e2fsck is running, so it's not EXT2_MMP_SEQ_FSCK is preventing the mount. If the test_9 is running on a pair of failover nodes (e2fsck on one node, mount on another one), the test is valid, however, it'll be exactly same as test_8. I'll try the gdb way, thank you! |
| Comment by Andreas Dilger [ 16/Jun/11 ] |
|
I was just working on the MMP tests for e2fsprogs before sending it upstream, and I found another way to set EXT2_MMP_SEQ_FSCK on the filesystem without needing gdb or e2fsprogs-debuginfo installed on the client: # this will cause debugfs to create the /tmp/debugfs.mark file once it has
# passed the MMP startup, then continue reading input until it is killed
MARKFILE=$(mktemp)
{ echo "dump_inode <2> $MARKFILE"; cat /dev/zero; } | $DEBUGFS -w $TMPFILE &
while [ ! -e $MARKFILE ]; do
sleep 1
done
rm -f $MARKFILE
killall -9 debugfs
This is not timing dependent, since debugfs will continue reading from /dev/zero until it is killed. |
| Comment by Jian Yu [ 17/Jun/11 ] |
|
Lustre Branch: v1_8_6_RC2 MGS/MDS Nodes: client-10-ib(active), client-12-ib(passive)
\ /
1 combined MGS/MDT
OSS Nodes: fat-amd-1-ib(active), fat-amd-2-ib(active)
\ /
OST1 (active in fat-amd-1-ib)
OST2 (active in fat-amd-2-ib)
OST3 (active in fat-amd-1-ib)
OST4 (active in fat-amd-2-ib)
OST5 (active in fat-amd-1-ib)
OST6 (active in fat-amd-2-ib)
Client Node: fat-amd-3-ib
mmp test 9 failed as follows: Running e2fsck on the device /dev/disk/by-id/scsi-1IET_00020001 on ost1failover... fat-amd-2-ib: e2fsck 1.41.90.wc2 (14-May-2011) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information lustre-OST0000: 58/125184 files (6.9% non-contiguous), 28117/500000 blocks /usr/lib64/lustre/tests/mmp.sh: line 573: kill: (12252) - No such process Mounting /dev/disk/by-id/scsi-1IET_00020001 on ost1... Starting ost1: /dev/disk/by-id/scsi-1IET_00020001 /mnt/ost1 fat-amd-1-ib: lnet.debug=0x33f1504 fat-amd-1-ib: lnet.subsystem_debug=0xffb7e3ff fat-amd-1-ib: lnet.debug_mb=48 Started lustre-OST0000 mmp test_9: @@@@@@ FAIL: mount /dev/disk/by-id/scsi-1IET_00020001 on ost1 should fail Maloo report: https://maloo.whamcloud.com/test_sets/ea7cb158-98f0-11e0-9a27-52540025f9af |
| Comment by Niu Yawei (Inactive) [ 19/Jun/11 ] |
|
Hi, Sarah Could you try this patch? It uses debugfs to make sure the MMP block is in 'e2fsck' before trying to mount the device in test_9, and it works fine in my local testing environment. (Please make sure the test scripts updated on both client and servers) |
| Comment by Andreas Dilger [ 19/Jun/11 ] |
|
Niu, it is far better to add patches to Gerrit instead of attachments in Jira. Patches in Gerrit automatically build RPMs that can be installed for testing quickly, they can be inspected more easily, and if testing and inspection goes well it can be landed more easily afterward. |
| Comment by Niu Yawei (Inactive) [ 20/Jun/11 ] |
|
Ok, I pushed the patch for review: http://review.whamcloud.com/979 . Thanks. |
| Comment by Sarah Liu [ 20/Jun/11 ] |
|
Hi Niu, I didn't use lustre-review build 1041(from http://review.whamcloud.com/979) since lu-395's fix isn't in that branch, instead, I tested the latest lustre-master build #176 with your patches and it passed. By the way, the new added script mark_mmp.sh does not executable, you may need change that https://maloo.whamcloud.com/test_sets/cd89342a-9b72-11e0-9a27-52540025f9af |
| Comment by Niu Yawei (Inactive) [ 21/Jun/11 ] |
|
Ah, I think it because I forgot to add mmp_mark.sh into Makefile.am, will add it. Thank you. |
| Comment by Andreas Dilger [ 21/Jun/11 ] |
|
Note that Git keeps the right file permissions, so you should "chmod 0x755 mmp_mark.sh" and rebase your patch. |
| Comment by Niu Yawei (Inactive) [ 21/Jun/11 ] |
|
I checked out a new copy of mmp_mark.sh from git, the mode is 755, so I think the mode is correct when I committing it. |
| Comment by Peter Jones [ 21/Jun/11 ] |
|
Landed for 2.1 |
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Build Master (Inactive) [ 21/Jun/11 ] |
|
Integrated in Oleg Drokin : c840ed6d879c9958f08542cc20ae849bda1f617c
|
| Comment by Jian Yu [ 21/Jun/11 ] |
|
The issue also exists on Lustre b1_8 branch: Niu, could you please make a patch for the b1_8 branch? Thanks. |
| Comment by Niu Yawei (Inactive) [ 21/Jun/11 ] |
|
Hi, Yu Jian The patch for b1_8 is posted at http://review.whamcloud.com/#change,991 for review. Thanks. |
| Comment by Sarah Liu [ 24/Jun/11 ] |
|
verified on the latest master build #185 pass. |
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 14/Jul/11 ] |
|
Integrated in Oleg Drokin : e99739d9abf08ca8d76df281e481924fc2ae6849
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Build Master (Inactive) [ 15/Jul/11 ] |
|
Integrated in Johann Lombardi : d70e443dcc32d3bc5edab64d266a6e636c85136c
|
| Comment by Niu Yawei (Inactive) [ 15/Jul/11 ] |
|
landed for 2.1 and 1.8 |