[ovs-dev] [PATCH] Build: shared libraries and versioning

Scott Mann sdmnix at gmail.com
Thu Oct 23 02:54:44 UTC 2014


On Wed, Oct 22, 2014 at 8:41 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Wed, Oct 22, 2014 at 08:23:13PM -0600, Scott Mann wrote:
> > On Wed, Oct 22, 2014 at 7:29 PM, Ben Pfaff <blp at nicira.com> wrote:
> >
> > > On Wed, Oct 22, 2014 at 04:53:28PM -0700, Gurucharan Shetty wrote:
> > > > > I seem to recall that there was a related bug a while back when we
> > > > > added the existing shared library support.  I spent some time
> looking
> > > > > through the mailing list and the Git history, though, and I
> couldn't
> > > > > find it.
> > > > Do you mean this one?
> > > > commit 6a92c6f079f7f19c6a46d167af16ff600d3023d0
> > > > Author: Gurucharan Shetty <gshetty at nicira.com>
> > > > Date:   Thu Jul 17 18:15:17 2014 -0700
> > > >
> > > >     ovsdb: Don't add ovsdb-server.c to libovsdb.
> > > >
> > > >     Without this change, with shared libraries, VLOG
> > > >     constructor for ovsdb-server would get called twice corrupting
> > > >     the 'vlog_modules' list causing an infinite loop.
> > > >
> > > >     Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
> > > >     Reported-by: Gur Stavi <gstavi at mrv.com>
> > > >     Acked-by: Ben Pfaff <blp at nicira.com
> > >
> > > Yes.  Thank you for finding it!
> > >
> > > If this has recurred, then it's probably the same kind of problem, and
> > > probably a similar fix is appropriate.  Scott, do you have a more
> > > specific report, so we can look for the source of it?
> > >
> >
> > What I observed was that each module's struct got pushed into the list,
> > followed by test runs which would push another copy into the list, which
> > would then clobber the list.
>
> What program exhibited the failures?  Which tests?
>

In the patch I've submitted:
If you back out the change in the constructor that checks for multiple
entries in the list, but keep the changes that build shared objects, then
you should be able to cause the failure with:

./test/ovs-test test-odp parse-keys

If you run "make check," you will get ~188 failed tests with the same
problem.

In fact, you should be able to cause the problem just by changing:

LT_INIT([disable-shared])

to

LT_INIT

in configure.ac

-- 
-Scott



More information about the dev mailing list