You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Charles-François Natali <cf...@gmail.com> on 2021/06/23 17:24:21 UTC

Re: [jira] [Comment Edited] (MESOS-10224) [test] CSIVersion/StorageLocalResourceProviderTest.OperationUpdate fails.

The last option is fine, i.e. checking that we don't reach past the end of
the file.

Weakening this check is fine since... It's not correct anymore.

On Wed, 23 Jun 2021, 17:52 Saad Ur Rahman (Jira), <ji...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/MESOS-10224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17367775#comment-17367775
> ]
>
> Saad Ur Rahman edited comment on MESOS-10224 at 6/23/21, 4:51 PM:
> ------------------------------------------------------------------
>
> [~cf.natali], I am finally getting around to patching the issue here.
>
> My understanding of the routine is that it parses the linker library to
> generate a vector of library names and paths. It does this by casting
> memory blocks into structs to give them parsable structure.
>
> The failing conditional on line _#227_ is because of the droppings Ubuntu
> leaves at the end of the file. The data pointer should point to the end of
> the file to indicate complete parsing. The following conditional on line
> _#235_ ensures NUL termination.
>
> The solutions I can think of are to adjust for the end of data
> specifically for Ubuntu (if we can) by setting:
> {code:java}
> data = buffer->size();
> {code}
> Or we can do this if the data pointer is not at the end:
> {code:java}
> if ((size_t)(data - buffer->data()) < buffer->size())
> {code}
> Another thing we can is let it slide if the data pointer is less than or
> equal to the buffer size on line _#227_:
> {code:java}
> if ((size_t)(data - buffer->data()) > buffer->size()) {
>   return Error("Invalid format");
> }
> {code}
> What are your thoughts? All of the above are quick adjustments but they
> weaken the original checks.
>
>
> was (Author: surahman):
> [~cf.natali], I am finally getting around to patching the issue here.
>
> My understanding of the routine is that it parses the linker library to
> generate a vector of library names and paths. It does this by casting
> memory blocks into structs to give them parsable structure.
>
> The failing conditional on line _#227_ is because of the droppings Ubuntu
> leaves at the end of the file. The data pointer should point to the end of
> the file to indicate complete parsing. The following conditional on line
> _#235_ ensures NUL termination.
>
> The solutions I can think of are to adjust for the end of data
> specifically for Ubuntu (if we can) by setting:
> {code:java}
> data = buffer->size();
> {code}
> Or we can do this if the data pointer is not at the end:
> {code:java}
> if ((size_t)(data - buffer->data()) < buffer->size())
> {code}
> Another thing we can is let it slide if the data pointer is strictly less
> than the buffer size on line _#227_:
> {code:java}
> if ((size_t)(data - buffer->data()) > buffer->size()) {
>   return Error("Invalid format");
> }
> {code}
> What are your thoughts? All of the above are quick adjustments.
>
> > [test] CSIVersion/StorageLocalResourceProviderTest.OperationUpdate fails.
> > -------------------------------------------------------------------------
> >
> >                 Key: MESOS-10224
> >                 URL: https://issues.apache.org/jira/browse/MESOS-10224
> >             Project: Mesos
> >          Issue Type: Bug
> >          Components: test
> >    Affects Versions: 1.11.0
> >            Reporter: Saad Ur Rahman
> >            Priority: Major
> >         Attachments: ld.so.cache
> >
> >
> > *OS:* Ubuntu 21.04
> > *Command:*
> > {code:java}
> > make -j 6 V=0 check{code}
> > Fails during the build and test suite run on two different machines with
> the same OS.
> > {code:java}
> > 3: [       OK ] CSIVersion/StorageLocalResourceProviderTest.Update/v0
> (479 ms)
> > 3: [----------] 14 tests from
> CSIVersion/StorageLocalResourceProviderTest (27011 ms total)
> > 3:
> > 3: [----------] Global test environment tear-down
> > 3: [==========] 575 tests from 178 test cases ran. (202572 ms total)
> > 3: [  PASSED  ] 573 tests.
> > 3: [  FAILED  ] 2 tests, listed below:
> > 3: [  FAILED  ] LdcacheTest.Parse
> > 3: [  FAILED  ]
> CSIVersion/StorageLocalResourceProviderTest.OperationUpdate/v0, where
> GetParam() = "v0"
> > 3:
> > 3:  2 FAILED TESTS
> > 3:   YOU HAVE 34 DISABLED TESTS
> > 3:
> > 3:
> > 3:
> > 3: [FAIL]: 4 shard(s) have failed tests
> > 3/3 Test #3: MesosTests .......................***Failed  1173.43 sec
> > {code}
> > Are there any pre-requisites required to get the build/tests to pass? I
> am trying to get all the tests to pass to make sure my build environment is
> setup correctly for development.
>
>
>
> --
> This message was sent by Atlassian Jira
> (v8.3.4#803005)
>