[Gluster-devel] "gluster vol start" is failing when glusterfs is compiled with debug enable .
Anoop C S
anoopcs at redhat.com
Wed Jul 22 12:48:18 UTC 2015
On Wed, 2015-07-22 at 18:12 +0530, Anoop C S wrote:
> On Wed, 2015-07-22 at 12:19 +0530, Anand Nekkunti wrote:
> >
> > On 07/22/2015 11:47 AM, Raghavendra Bhat wrote:
> > > On 07/22/2015 09:50 AM, Atin Mukherjee wrote:
> > > >
> > > > On 07/22/2015 12:50 AM, Anand Nekkunti wrote:
> > > > > Hi All
> > > > > "gluster vol start" is failing when glusterfs is compiled
> > > > >
> > > > > with
> > > > > debug
> > > > > enable .
> > > > > Link: :https://bugzilla.redhat.com/show_bug.cgi?id=1245331
> > > > >
> > > > > *brick start is failing with fallowing error:*
> > > > > 2015-07-21 19:01:59.408729] I [MSGID: 100030]
> > > > > [glusterfsd.c:2296:main]
> > > > > 0-/usr/local/sbin/glusterfsd: Started running
> > > > > /usr/local/sbin/glusterfsd
> > > > > version 3.8dev (args: /usr/local/sbin/glusterfsd -s
> > > > > 192.168.0.4
> > > > > --volfile-id VOL.192.168.0.4.tmp-BRICK1 -p
> > > > > /var/lib/glusterd/vols/VOL/run/192.168.0.4-tmp-BRICK1.pid -S
> > > > > /var/run/gluster/0a4faf3d8d782840484629176ecf307a.socket -
> > > > > -brick-name
> > > > > /tmp/BRICK1 -l /var/log/glusterfs/bricks/tmp-BRICK1.log -
> > > > > -xlator-option
> > > > > *-posix.glusterd-uuid=4ec09b0c-6043-40f0-bc1a-5cc312d49a78 -
> > > > > -brick-port
> > > > > 49152 --xlator-option VOL-server.listen-port=49152)
> > > > > [2015-07-21 19:02:00.075574] I [MSGID: 101190]
> > > > > [event-epoll.c:627:event_dispatch_epoll_worker] 0-epoll:
> > > > > Started thread
> > > > > with index 1
> > > > > [2015-07-21 19:02:00.078905] W [MSGID: 101095]
> > > > > [xlator.c:189:xlator_dynload] 0-xlator:
> > > > > /usr/local/lib/libgfdb.so.0:
> > > > > undefined symbol: gf_sql_str2sync_t
> > > > > [2015-07-21 19:02:00.078947] E [MSGID: 101002]
> > > > > [graph.y:211:volume_type]
> > > > > 0-parser: Volume 'VOL-changetimerecorder', line 16: type
> > > > > 'features/changetimerecorder' is not valid or not found on
> > > > > this
> > > > > machine
> > > > > [2015-07-21 19:02:00.079020] E [MSGID: 101019]
> > > > > [graph.y:319:volume_end]
> > > > > 0-parser: "type" not specified for volume VOL
> > > > > -changetimerecorder
> > > > > [2015-07-21 19:02:00.079150] E [MSGID: 100026]
> > > > > [glusterfsd.c:2151:glusterfs_process_volfp] 0-: failed to
> > > > > construct the
> > > > > graph
> > > > > [2015-07-21 19:02:00.079399] W
> > > > > [glusterfsd.c:1214:cleanup_and_exit]
> > > > > (-->/usr/local/sbin/glusterfsd(mgmt_getspec_cbk+0x343)
> > > > > [0x40df64]
> > > > > -->/usr/local/sbin/glusterfsd(glusterfs_process_volfp+0x1a2)
> > > > > [0x409b58]
> > > > > -->/usr/local/sbin/glusterfsd(cleanup_and_exit+0x77)
> > > > > [0x407a6f]
> > > > > ) 0-:
> > > > > received signum (0), shutting down
> > > > I am not able to hit this though.
> > >
> > > This seems to be the case of inline functions being considerd as
> > > undefined symblols. There has been a discussion about it in the
> > > mailing list.
> > >
> > > https://www.gluster.org/pipermail/gluster-devel/2015
> > > -June/045942.html
> > it seems issue with inline functions , but why it is happening in
> > only
> > in debug build ?
>
> AFAIK, this is the reason why these undefined errors are not seen
> with
> --enable-debug option.
>
s/with --enable-debug option/without --enable-debug option. :)
> When --enable-debug is specified, as per the configure.ac script we
> doesn't include the optimization level -O2. Instead we add -O0. See
> the
> following snippet.
>
> -------------------------------------------
> if test "x$enable_debug" = "xyes"; then
> BUILD_DEBUG=yes
> CFLAGS="${CFLAGS} -g -O0 -DDEBUG"
> else
>
>
>
>
> BUILD_DEBUG=no
> CFLAGS="${CFLAGS} -g -O2"
> fi
> -------------------------------------------
>
> with -O0 optimization level, the compiler doesn't do inlining, so it
> requires extern definitions of the inline functions. It's the problem
> described at https://gcc.gnu.org/gcc-5/porting_to.html regarding
> porting changes with GCC v5.x.
>
> From gcc man page
>
> ---------------------------------------------------------------------
> --
> -O0 Reduce compilation time and make debugging produce the expected
> results. This is the default.
>
> -O2 Optimize even more. GCC performs nearly all supported
> optimizations
> that do not involve a space-speed tradeoff. As compared to -O, this
> option increases both compilation time and the performance of the
> generated code.
> ---------------------------------------------------------------------
> --
>
> So now we have two options:
>
s/two/three. :)
> [1] Use -fgnu89-inline. [Refer the other thread for more details (
> https://www.gluster.org/pipermail/gluster-devel/2015-June/045942.html
> )]
> [2] Fix the code to work with C99 inline semantics by either changing
> all inline to static inline or provide external definitions for each
> inline functions in .h file
> [3] Or fix the the optimization flags in configure.ac accordingly.
>
> Thanks,
> Anoop C S.
>
> > >
> > > Regards,
> > > Raghavendra Bhat
> > >
> > > > >
> > > > > Thanks&Regards
> > > > > Anand.N
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Gluster-devel mailing list
> > > > > Gluster-devel at gluster.org
> > > > > http://www.gluster.org/mailman/listinfo/gluster-devel
> > > > >
> > >
> > > _______________________________________________
> > > Gluster-devel mailing list
> > > Gluster-devel at gluster.org
> > > http://www.gluster.org/mailman/listinfo/gluster-devel
> >
> > _______________________________________________
> > Gluster-devel mailing list
> > Gluster-devel at gluster.org
More information about the Gluster-devel
mailing list