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