[Gluster-devel] NULL loc in posix_acl_truncate

Vijay Bellur vbellur at redhat.com
Sat May 26 07:44:52 UTC 2012


On 05/26/2012 11:07 AM, Emmanuel Dreyfus wrote:
> here is a bug in release-3.3:
>
>
> I tracked this down to posix_acl_truncate() on the server, where loc->inode
> and loc->pah are NULL. This code goes red and raise EACCESS:
>
>          if (acl_permits (frame, loc->inode, POSIX_ACL_WRITE))
>                  goto green;
>          else
>                  goto red;
>
> Here is the relevant baccktrace:
>
> #9  0xb99d1ca6 in posix_acl_truncate (frame=0xbb77f780, this=0xb9d20000,
>      loc=0xb9d41020, off=48933, xdata=0x0) at posix-acl.c:898
> #10 0xb99ba4f8 in truncate_stat_cbk (frame=0xbb77f400, cookie=0xbb77f6a0,
>      this=0xb9d22000, op_ret=0, op_errno=0, buf=0xb89ffac4, xdata=0x0)
>      at posix.c:204
> #11 0xbbb87933 in default_stat_cbk (frame=0xbb77f6a0, cookie=0xbb77f710,
>      this=0xb9d20000, op_ret=0, op_errno=0, buf=0xb89ffac4, xdata=0x0)
>      at defaults.c:47
> #12 0xb99e1751 in posix_stat (frame=0xbb77f710, this=0xb9d1f000,
>      loc=0xba60091c, xdata=0x0) at posix.c:231
>
> In frame 12, loc->inode is not NULL, and loc->path makes sense:
> "<gfid:9d92d4e5-2e70-4183-ab97-39fe2b5380b3>/netbsd/usr/src/tooldir.NetBSD-6.9
> 9.4-i386/bin/inst.01911a"
>
> In frame 10, loc->path and loc->inode are NULL.
>
> In note that xlators/features/locks/src/posix.c:pl_ftruncate() sets
> truncate_stat_cbk() as the callback, and not ftruncate_stat_cbk(). That later
> function does not even exist. f-style functions not calling f-style callbacks
> have been the root of various bugs so far, is it one more of them?

I don't think it is a f-style problem. I do not get a EPERM with the 
testcase that you posted for qa39. Can you please provide a bigger bt?

Thanks,
Vijay

>
>





More information about the Gluster-devel mailing list