Bug 764175 (GLUSTER-2443) - starting glusterfs/d -f with relative path crashes
Summary: starting glusterfs/d -f with relative path crashes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2443
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: All
OS: Solaris
low
low
Target Milestone: ---
Assignee: shishir gowda
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-18 05:22 UTC by shishir gowda
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description shishir gowda 2011-02-18 05:22:55 UTC
If glusterfs/glusterfsd is given a relative path for the vol file, it crashes in parse_opts on solaris.

This is due to getcwd() being parsed a size 0. On solaris, the size has to be non-zero, whereas in linux, if it is zero, it allocates buffer of required size.

The fix is to pass the size as PATH_MAX, which will be handled fine on both solaris and linux

Comment 1 Anand Avati 2011-02-22 07:11:34 UTC
PATCH: http://patches.gluster.com/patch/6209 in master (Fix getcwd size arg to make it work in solaris.)

Comment 2 Saurabh 2011-03-11 04:03:17 UTC
bash-3.00# ls
bricks                          info                            new.192.168.1.73.data-dir1.vol  run
cksum                           new-fuse.vol                    new.192.168.1.73.data-dir2.vol
bash-3.00# glusterfsd -f new.192.168.1.73.data-dir1.vol



bash-3.00# less /usr/local/var/log/glusterfs/
.cmd_log_history                                          nfs.log
bricks/                                                   usr-local-etc-glusterfs-glusterd.vol.log
etc-glusterd-vols-new-new.192.168.1.73.data-dir1.vol.log  
bash-3.00# less /usr/local/var/log/glusterfs/etc-glusterd-vols-new-new.192.168.1.73.data-dir1.vol.log 
[2011-03-11 06:54:52.411192] E [socket.c:338:__socket_server_bind] tcp.new-server: binding to  failed: Address already in use
[2011-03-11 06:54:52.411268] E [socket.c:341:__socket_server_bind] tcp.new-server: Port is already in use
[2011-03-11 06:54:52.411306] E [xlator.c:784:xlator_init] new-server: Initialization of volume 'new-server' failed, review your volfile
 again
[2011-03-11 06:54:52.411318] E [graph.c:331:glusterfs_graph_init] new-server: initializing translator failed
[2011-03-11 06:54:52.411411] I [glusterfsd.c:710:cleanup_and_exit] glusterfsd: shutting down


Note You need to log in before you can comment on or make changes to this bug.