Bug 762278 (GLUSTER-546)

Summary: uploading a file through apache running on booster fails
Product: [Community] GlusterFS Reporter: Raghavendra G <raghavendra>
Component: boosterAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: gluster-bugs, pavan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Raghavendra G 2010-01-15 22:37:16 UTC
there is a bug in fcntl. F_SETLK and F_SETLKW have different values when __USE_FILE_OFFSET64 is defined compared to when the same macro is not defined. This places a requirement that apache and apr-utils have to be compiled with the above macro defined.

Also, the lock structure got using va_arg seems to be corrupted.

Comment 1 Raghavendra G 2010-01-16 01:33:59 UTC
reported by Jiann-Ming Su <sujiannming> on gluster-users.

I'm playing around with glusterfs 3.0.0 on a server acting as both the
glusterfs server and client.  I've got a local directory
(/mnt/gluster/gfs2) configured in /etc/glusterfs/glusterfsd.vol:

volume posix1
 type storage/posix
 option directory /mnt/gluster/gfs2
end-volume

volume locks1
   type features/locks
   subvolumes posix1
end-volume

volume brick1
   type performance/io-threads
   option thread-count 8
   subvolumes locks1
end-volume

volume server-tcp
   type protocol/server
   option transport-type tcp
   option auth.addr.brick1.allow 127.0.0.1
   option transport.socket.listen-port 6996
   option transport.socket.nodelay on
   subvolumes brick1
end-volume

Glusterfsd starts without problems.  The client config is as follows
(gfs2-tcp.vol):

volume localhost-1
   type protocol/client
   option transport-type tcp
   option remote-host localhost
   option transport.socket.nodelay on
   option transport.remote-port 6996
   option remote-subvolume brick1
end-volume

volume writebehind
   type performance/write-behind
   option cache-size 4MB
   subvolumes localhost-1
end-volume

volume readahead
   type performance/read-ahead
   option page-count 4
   subvolumes writebehind
end-volume

volume iocache
   type performance/io-cache
   option cache-size 1GB
   option cache-timeout 1
   subvolumes readahead
end-volume

volume quickread
   type performance/quick-read
   option cache-timeout 1
   option max-file-size 64kB
   subvolumes iocache
end-volume

volume statprefetch
   type performance/stat-prefetch
   subvolumes quickread
end-volume

The /etc/booster.fstab:

/etc/glusterfs/gfs2-tcp.vol /var/boot glusterfs
subvolume=brick1,logfile=/var/log/glusterfs/gfs2.log,loglevel=DEBUG,attr_timeout=0

I start apache as follows:

$ export GLUSTERFS_BOOSTER_FSTAB=/etc/booster.fstab
$ LD_PRELOAD=/usr/lib/glusterfs/glusterfs-booster.so /usr/sbin/httpd

I connect using cadaver and try to upload a file (install.log) and
here's what I get in the glusterfs log file:

[2010-01-12 22:10:16] D [libglusterfsclient.c:4968:glusterfs_stat]
libglusterfsclient: path /var/boot/install.log
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/boot/install.log, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1728:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry found: path :/var/boot/install.log vmp: /var/boot/
[2010-01-12 22:10:16] D
[libglusterfsclient.c:896:libgf_resolve_path_light]
libglusterfsclient: Path: /install.log, Resolved Path: /install.log
[2010-01-12 22:10:16] D [libglusterfsclient.c:4889:__glusterfs_stat]
libglusterfsclient: path /install.log, op: 2
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:247:__do_path_resolve]
libglusterfsclient-dentry: loc->parent(1) already present. sending
lookup for 1//install.log
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:268:__do_path_resolve]
libglusterfsclient-dentry: resolved path(/install.log) till 1(/).
sending lookup for remaining path
[2010-01-12 22:10:16] D
[libglusterfsclient.c:2110:libgf_client_lookup_cbk]
libglusterfsclient: 1: (op_num=0) /install.log => -1 (No such file or
directory)
[2010-01-12 22:10:16] E [libglusterfsclient.c:4900:__glusterfs_stat]
libglusterfsclient: path lookup failed for (/install.log)
[2010-01-12 22:10:16] E [booster.c:1928:booster_xstat64] booster:
xstat64 failed: No such file or directory
[2010-01-12 22:10:16] D [libglusterfsclient.c:4998:glusterfs_lstat]
libglusterfsclient: path /var
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var, type: LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1731:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry not found: path: /var
[2010-01-12 22:10:16] D [libglusterfsclient.c:4998:glusterfs_lstat]
libglusterfsclient: path /var/boot
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/boot, type: LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1728:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry found: path :/var/boot vmp: /var/boot/
[2010-01-12 22:10:16] D [libglusterfsclient.c:4889:__glusterfs_stat]
libglusterfsclient: path /, op: 1
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:390:libgf_client_path_lookup]
libglusterfsclient: resolved path(/) to 1/1
[2010-01-12 22:10:16] D [libglusterfsclient.c:4819:libgf_client_stat]
libglusterfsclient: path /, status 0, errno 0
[2010-01-12 22:10:16] D [libglusterfsclient.c:4998:glusterfs_lstat]
libglusterfsclient: path /var/boot/install.log
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/boot/install.log, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1728:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry found: path :/var/boot/install.log vmp: /var/boot/
[2010-01-12 22:10:16] D
[libglusterfsclient.c:896:libgf_resolve_path_light]
libglusterfsclient: Path: /install.log, Resolved Path: /install.log
[2010-01-12 22:10:16] D [libglusterfsclient.c:4889:__glusterfs_stat]
libglusterfsclient: path /install.log, op: 1
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:247:__do_path_resolve]
libglusterfsclient-dentry: loc->parent(1) already present. sending
lookup for 1//install.log
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:268:__do_path_resolve]
libglusterfsclient-dentry: resolved path(/install.log) till 1(/).
sending lookup for remaining path
[2010-01-12 22:10:16] D
[libglusterfsclient.c:2110:libgf_client_lookup_cbk]
libglusterfsclient: 3: (op_num=0) /install.log => -1 (No such file or
directory)
[2010-01-12 22:10:16] E [libglusterfsclient.c:4900:__glusterfs_stat]
libglusterfsclient: path lookup failed for (/install.log)
[2010-01-12 22:10:16] E [booster.c:2176:booster_lxstat64] booster:
lxstat64 failed: No such file or directory
[2010-01-12 22:10:16] D [libglusterfsclient.c:3090:glusterfs_open]
libglusterfsclient: path /var/lib/dav/lockdb.dir
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/lib/dav/lockdb.dir, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1731:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry not found: path: /var/lib/dav/lockdb.dir
[2010-01-12 22:10:16] E [booster.c:414:vmp_open] booster: VMP open failed
[2010-01-12 22:10:16] D [booster.c:267:do_open] booster: Opening using
MPB: /var/lib/dav/lockdb.dir
[2010-01-12 22:10:16] E [booster.c:272:do_open] booster: Xattr
user.glusterfs-booster-volfile not found: No data available
[2010-01-12 22:10:16] D [libglusterfsclient.c:3090:glusterfs_open]
libglusterfsclient: path /var/lib/dav/lockdb.pag
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/lib/dav/lockdb.pag, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1731:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry not found: path: /var/lib/dav/lockdb.pag
[2010-01-12 22:10:16] E [booster.c:414:vmp_open] booster: VMP open failed
[2010-01-12 22:10:16] D [booster.c:267:do_open] booster: Opening using
MPB: /var/lib/dav/lockdb.pag
[2010-01-12 22:10:16] E [booster.c:272:do_open] booster: Xattr
user.glusterfs-booster-volfile not found: No data available
[2010-01-12 22:10:16] D [libglusterfsclient.c:4968:glusterfs_stat]
libglusterfsclient: path /var/boot/install.log
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/boot/install.log, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1728:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry found: path :/var/boot/install.log vmp: /var/boot/
[2010-01-12 22:10:16] D
[libglusterfsclient.c:896:libgf_resolve_path_light]
libglusterfsclient: Path: /install.log, Resolved Path: /install.log
[2010-01-12 22:10:16] D [libglusterfsclient.c:4889:__glusterfs_stat]
libglusterfsclient: path /install.log, op: 2
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:247:__do_path_resolve]
libglusterfsclient-dentry: loc->parent(1) already present. sending
lookup for 1//install.log
[2010-01-12 22:10:16] D
[libglusterfsclient-dentry.c:268:__do_path_resolve]
libglusterfsclient-dentry: resolved path(/install.log) till 1(/).
sending lookup for remaining path
[2010-01-12 22:10:16] D
[libglusterfsclient.c:2110:libgf_client_lookup_cbk]
libglusterfsclient: 4: (op_num=0) /install.log => -1 (No such file or
directory)
[2010-01-12 22:10:16] E [libglusterfsclient.c:4900:__glusterfs_stat]
libglusterfsclient: path lookup failed for (/install.log)
[2010-01-12 22:10:16] E [booster.c:1928:booster_xstat64] booster:
xstat64 failed: No such file or directory
[2010-01-12 22:10:16] D [libglusterfsclient.c:3090:glusterfs_open]
libglusterfsclient: path /var/lib/dav/lockdb.dir
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/lib/dav/lockdb.dir, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1731:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry not found: path: /var/lib/dav/lockdb.dir
[2010-01-12 22:10:16] E [booster.c:414:vmp_open] booster: VMP open failed
[2010-01-12 22:10:16] D [booster.c:267:do_open] booster: Opening using
MPB: /var/lib/dav/lockdb.dir
[2010-01-12 22:10:16] E [booster.c:272:do_open] booster: Xattr
user.glusterfs-booster-volfile not found: No data available
[2010-01-12 22:10:16] D [libglusterfsclient.c:3090:glusterfs_open]
libglusterfsclient: path /var/lib/dav/lockdb.pag
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1641:_libgf_vmp_search_entry]
libglusterfsclient: VMP Search: path /var/lib/dav/lockdb.pag, type:
LongestPrefix
[2010-01-12 22:10:16] D
[libglusterfsclient.c:1731:libgf_vmp_search_entry] libglusterfsclient:
VMP Entry not found: path: /var/lib/dav/lockdb.pag
[2010-01-12 22:10:16] E [booster.c:414:vmp_open] booster: VMP open failed
[2010-01-12 22:10:16] D [booster.c:267:do_open] booster: Opening using
MPB: /var/lib/dav/lockdb.pag
[2010-01-12 22:10:16] E [booster.c:272:do_open] booster: Xattr
user.glusterfs-booster-volfile not found: No data available


The apache config is fine because if I run apache without glusterfs,
the upload works without a problem.  I'm guessing I'm missing
something pretty simple.  Thanks for any help or insight.

Comment 2 Shehjar Tikoo 2010-02-23 07:07:52 UTC
Closing this bug because apache needs to be built as a 64 bit binary if it has to be used with booster.