Details
-
Bug
-
Resolution: Fixed
-
Major
-
Lustre 2.7.0, Lustre 2.8.0
-
CentOS 6 + Lustre master tree 2.7+
-
3
-
9223372036854775807
Description
We can crash the lustre client using the simple code below:
#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <stdio.h> #include <lustre/lustre_user.h> int main(int argc, char *argv[]) { int fd; int rc; int gid; char *buf; fd = open("/mnt/testfile.00000000", O_RDWR); gid = atoi(argv[1]); rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid); if (rc) { printf("ioctl %d\n", rc); return rc; } buf = malloc(1<<20); memset(buf, 1, 1<<20); while (1) write(fd, buf, 1<<20); return 0; }
demo purpose only, no error handling.
Run the program with a gid and then run another instance of the program with a different gid, the client will crash right after.
crash> bt PID: 1989 TASK: ffff88013ca86ae0 CPU: 1 COMMAND: "ldlm_bl_02" #0 [ffff88011fe0d8c8] machine_kexec at ffffffff8103b5bb #1 [ffff88011fe0d928] crash_kexec at ffffffff810c9852 #2 [ffff88011fe0d9f8] panic at ffffffff81529343 #3 [ffff88011fe0da78] lbug_with_loc at ffffffffa0251ecb [libcfs] #4 [ffff88011fe0da98] osc_cache_writeback_range at ffffffffa0958e35 [osc] #5 [ffff88011fe0dc28] osc_lock_flush at ffffffffa0941495 [osc] #6 [ffff88011fe0dca8] osc_ldlm_blocking_ast at ffffffffa0941828 [osc] #7 [ffff88011fe0dd18] ldlm_cancel_callback at ffffffffa05404cc [ptlrpc] #8 [ffff88011fe0dd38] ldlm_cli_cancel_local at ffffffffa05525da [ptlrpc] #9 [ffff88011fe0dd68] ldlm_cli_cancel at ffffffffa0557200 [ptlrpc] #10 [ffff88011fe0dda8] osc_ldlm_blocking_ast at ffffffffa094165b [osc] #11 [ffff88011fe0de18] ldlm_handle_bl_callback at ffffffffa055ac40 [ptlrpc] #12 [ffff88011fe0de48] ldlm_bl_thread_main at ffffffffa055b1a1 [ptlrpc] #13 [ffff88011fe0dee8] kthread at ffffffff8109e66e #14 [ffff88011fe0df48] kernel_thread at ffffffff8100c20a
Attachments
Issue Links
- is related to
-
LU-6368 ASSERTION( cur->oe_dlmlock == victim->oe_dlmlock ) failed
-
- Resolved
-
ok do you mean server won't send blocking ast to the client, it will only issue ast to the client when it's possible to grant the lock(previous lock got released)?
If so, do we still need patch http://review.whamcloud.com/15119 as we won't handle blocking ast for the group lock on the client anyway?