Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-5918

(lcommon_misc.c:194:cl_put_grouplock()) ASSERTION( cg->cg_gid ) failed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • None
    • Lustre 2.5.1, Lustre 2.7.0
    • None
    • 3
    • 16523

    Description

      Taking and releasing a group lock with group id 0 will crash the client. Works for any user.

      /* gcc -Wall grplock.c -o grplock -Ilustre/include -Ilibcfs/include */
      
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      #include <sys/ioctl.h>
      #include <errno.h>
      
      #include <lustre/lustreapi.h>
      
      int main(void)
      {
      	int fd;
      	const char *dname = "/mnt/lustre/testfile";
      	int rc;
      
      	fd = open(dname, O_CREAT | O_RDWR, 0600);
      	printf("fd=%d\n", fd);
      
      	rc = ioctl(fd, LL_IOC_GROUP_LOCK, 0);
      	printf("rc=%d %d\n", rc, errno);
      
      	rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, 0);
      	printf("rc=%d %d\n", rc, errno);
      
      	return 0;
      }
      

      2 ways to fix, depending on whether group id 0 is special. Either reject the lock when group id is 0, or remove that assert.

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              fzago Frank Zago (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: