On Tue, Sep 01, 2009 at 09:32:14AM +0800, Tao Ma wrote: > >5441 open("t/t6015-rev-list-show-all-parents.sh", > >O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0777) = ? ERESTARTSYS (To be restarted) > >5441 --- SIGALRM (Alarm clock) @ 0 (0) --- > >5441 sigreturn() = ? (mask now []) > >5441 open("t/t6015-rev-list-show-all-parents.sh", > >O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0777) = -1 EEXIST (File exists) > >5441 write(2, "error: git-checkout-index: unabl"..., 100) = 100 > > > >How on earth is userspace seeing ERESTARTSYS? Did someone forget to > >-ive it? > The ERESTARTSYS may happen when we get interrupted from ocfs2_cluster_lock. > I met with it when I rm -rf a very large dir and use "ctrl+c" to > stop it when I tested bug 1162.
Yeah, I got there. In the git case, we do ocfs2_add_entry(), but then a signal interrupts ocfs2_dentry_lock(). So ERESTARTSYS is returned, but the file has been created. When entry.S goes to retry the open(O_EXCL), it gets EEXIST. I've added code to block signals around that dentry lock call, but there's another place that the git code is triggering. I'm hunting that down. In general, we can't return ERESTARTSYS once we've done something that isn't idempotent. I think we need to audit our code a bit. Joel -- Life's Little Instruction Book #173 "Be kinder than necessary." Joel Becker Principal Software Developer Oracle E-mail: joel.bec...@oracle.com Phone: (650) 506-8127 _______________________________________________ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users