[ovs-dev] Clang compilation broken on master (ecd4a8f)
Ben Pfaff
blp at ovn.org
Mon Mar 23 19:32:30 UTC 2020
On Mon, Mar 23, 2020 at 12:23:10PM -0700, William Tu wrote:
> On Mon, Mar 23, 2020 at 11:55 AM William Tu <u9012063 at gmail.com> wrote:
> >
> > On Mon, Mar 23, 2020 at 11:33 AM Dave Tucker <datucker at redhat.com> wrote:
> > >
> > > Hi all!
> > >
> > > Current master branch is failing to compile under clang.
> > > The problem was introduced in this commit (applied 4 hours ago).
> > > https://github.com/openvswitch/ovs/commit/ecd4a8fcdff2ebf35cdb36355167d34e99df6dd5
> > >
> > > lib/vlog.c:618:12: error: reading variable 'log_fd' requires holding mutex
> > > 'log_file_mutex' [-Werror,-Wthread-safety-analysis]
> > > return log_fd;
> > > ^
> > >
> > > Based on the error I'd suggest reverting the patch and reworking it to
> > > safely acquire/release log_file_mutex.
> > >
>
> Hi Dave,
>
> I'm thinking about how to skip this lock(log_file_mutex), since this is already
> in SIGSEGV signal handling and afterward it coredump.
You can mark vlog_get_fd() as OVS_REQUIRES(log_file_mutex) and then the
caller OVS_NO_THREAD_SAFETY_ANALYSIS.
More information about the dev
mailing list