[Gluster-devel] how to debug glusterfs NFS with gdb

Heiko L. heikol at fh-lausitz.de
Mon Jul 8 20:28:25 UTC 2013


Hallo

I tried debug glusterfs-nfs.
On [15] written:

 bash# make CFLAGS="-g -O0" && make install
 address at hidden sbin]# gdb glusterfs
 (gdb) run --no-daemon -f



My attempt:
- compile glusterfs like [16] with:
 # gfsver="3.3.2qa4"
 # withdebug=1



# ps axu | grep glust
root      4402  3.9  1.2 332256 44260 ?        Ssl  20:14   1:05 /usr/local/sbin/glusterfsd -s localhost --volfile-id
gv4.elke2.mnt-sda6-brick4 -p /var/lib/glusterd/vols/gv4/run/elke2-mnt-sda6-brick4.pid -S
/var/run/c8d4954e69dc941098f47378216e8c17.socket --brick-name /mnt/sda6/brick4 -l
/usr/local/var/log/glusterfs/bricks/mnt-sda6-brick4.log --xlator-option
*-posix.glusterd-uuid=c4e6a1c5-5f43-49ff-902b-2670c19ddf4a --brick-port 24011 --xlator-option gv4-server.listen-port=24011
root      4985  0.0  0.0  97592   364 ?        Ssl  20:14   0:00 /usr/local/sbin/glusterd -p /var/run/glusterd.pid
root      5023  2.1 45.1 2913148 1589528 ?     Ssl  20:14   0:35 /usr/local/sbin/glusterfs -s localhost --volfile-id
gluster/nfs -p /var/lib/glusterd/nfs/run/nfs.pid -l /usr/local/var/log/glusterfs/nfs.log -S
/var/run/a818bbe0663cda0710f46210434aac9a.socket
root      5029  0.0  0.0 164636   280 ?        Ssl  20:14   0:00 /usr/local/sbin/glusterfs -s localhost --volfile-id
gluster/glustershd -p /var/lib/glusterd/glustershd/run/glustershd.pid -l /usr/local/var/log/glusterfs/glustershd.log -S
/var/run/0c2d6fe365ee87cbc79db2015abadd21.socket --xlator-option *replicate*.node-uuid=c4e6a1c5-5f43-49ff-902b-2670c19ddf4a
root      7714  0.0  0.0   6308   596 pts/0    S+   20:42   0:00 grep glust

#### stop all active processes
# /etc/init.d/glusterfs stop

# gdb /usr/local/sbin/glusterfs

(gdb) run --no-daemon -f
Starting program: /usr/local/sbin/glusterfs --no-daemon -f
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/usr/local/sbin/glusterfs: option requires an argument -- 'f'
Try `glusterfs --help' or `glusterfs --usage' for more information.
[Inferior 1 (process 10714) exited with code 0100]

(gdb) run --no-daemon
Starting program: /usr/local/sbin/glusterfs --no-daemon
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[2013-07-08 20:04:57.094108] C [glusterfsd.c:1224:parse_cmdline] 0-glusterfs: ERROR: parsing the volfile failed (No such file
or directory)

USAGE: /usr/local/sbin/glusterfs [options] [mountpoint]
[Inferior 1 (process 10750) exited with code 0377]



How should the correct command look like?

Regards Heiko



[15] http://lists.gnu.org/archive/html/gluster-devel/2008-09/msg00004.html
  [Gluster-devel] how to debug glusterfs with gdb?

[16] http://www2.fh-lausitz.de/launic/comp/net/glusterfs/130705.lnx.make_glusterfs_howto.html








More information about the Gluster-devel mailing list