Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iox #59 memory abstraction modularization roudi fixes #61

Conversation

marthtz
Copy link
Contributor

@marthtz marthtz commented Mar 12, 2020

No description provided.

marthtz added 6 commits March 6, 2020 12:08
Signed-off-by: Hintz Martin (CC-AD/ESW1) <martin.hintz@de.bosch.com>
Signed-off-by: Hintz Martin (CC-AD/ESW1) <martin.hintz@de.bosch.com>
Signed-off-by: Hintz Martin (CC-AD/ESW1) <martin.hintz@de.bosch.com>
Signed-off-by: Hintz Martin (CC-AD/ESW1) <martin.hintz@de.bosch.com>
Signed-off-by: Hintz Martin (CC-AD/ESW1) <martin.hintz@de.bosch.com>
Signed-off-by: Hintz Martin (CC-AD/ESW1) <martin.hintz@de.bosch.com>
@mossmaurice mossmaurice requested review from elBoberido, budrus and elfenpiff and removed request for elBoberido and budrus March 12, 2020 08:53
@mossmaurice mossmaurice added the enhancement New feature label Mar 12, 2020
Signed-off-by: Hoinkis Simon (CC-AD/ESW1) <simon.hoinkis2@de.bosch.com>
mossmaurice
mossmaurice previously approved these changes Mar 12, 2020
Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most of the changes in iceoryx_utils/test/moduletests/test_relative_pointer.cpp are due to merge errors

@elfenpiff @MatthiasKillat can you please check

…nter.cpp

Signed-off-by: Kraus Mathias (CC-AD/ESW1) <mathias.kraus2@de.bosch.com>
elBoberido
elBoberido previously approved these changes Mar 12, 2020
@elBoberido
Copy link
Member

@elfenpiff please check the windows build ... btw, when do we get our CI ;)

@Karsten1987
Copy link
Contributor

btw, when do we get our CI ;)

Have you considered setting up GitHub Actions for it? Given that Iceoryx easily compiles with colcon, we could technically also set up the ROS2 Action CI for it.

@elBoberido
Copy link
Member

btw, when do we get our CI ;)

Have you considered setting up GitHub Actions for it? Given that Iceoryx easily compiles with colcon, we could technically also set up the ROS2 Action CI for it.

@mossmaurice already has taken some steps for CI, I just don`t know how far we are. But running all the ROS2 test with iceoryx is definitely appealing

budrus
budrus previously approved these changes Mar 13, 2020
@dkroenke dkroenke self-requested a review March 14, 2020 16:47
@dkroenke
Copy link
Member

I checked on Raspberry Pi4 and there 5 testcases failing, will take a deeper look on that on monday.

@dkroenke
Copy link
Member

I checked on Raspberry Pi4 and there 5 testcases failing, will take a deeper look on that on monday.

ok i checked the examples and they are at least running. For following up i created a new issue: #63

dkroenke
dkroenke previously approved these changes Mar 17, 2020
Copy link
Member

@dkroenke dkroenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing but this is adressed here: #63

Copy link
Contributor

@elfenpiff elfenpiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue states a problem with the relative ptr on 32-bit #63. This could mean that the examples are just running by accident. I would not merge this pull request until it is clarified if this is the case or till every unit test is running

@elfenpiff
Copy link
Contributor

elfenpiff commented Mar 17, 2020

Operating system:
Gentoo Linux 5.5.8 (arm 64bit)

Compiler version:
GCC 9.2.0

The following tests are failing in utils_moduletests:
AtomicRelocatablePointer_test.memoryRelocation by signal SIGBUS (Misaligned address error)
ObjectPool_test.parameter_construct by signal SIGSEGV (Address boundary error)

relativeptrtests/0.ConstrTests
/home/larry/iceoryx/iceoryx_utils/test/moduletests/test_relative_pointer.cpp:127 : Failure
Expected equality of these values:
rp.getId()
Which is: 2
1
/home/larry/iceoryx/iceoryx_utils/test/moduletests/test_relative_pointer.cpp:143 : Failure
Expected equality of these values:
rp.getId()
Which is: 2
1
/home/larry/iceoryx/iceoryx_utils/test/moduletests/test_relative_pointer.cpp:152 : Failure
Expected equality of these values:
rp.getId()
Which is: 2
1

relativeptrtests/1.ConstrTests

  • same is above
    relativeptrtests/2.ConstrTests
  • same is above

The following tests are failing in posh_moduletests:
[ RUN ] PosixShmMemoryProvider_Test.CreateMemory
Reserving 1024 bytes in the shared memory [/FuManchu]
fish: “./posh_moduletests” terminated by signal SIGBUS (Misaligned address error)

@elfenpiff
Copy link
Contributor

elfenpiff commented Mar 17, 2020

Operating system:
Gentoo Linux 5.5.9 (x86_64)

Compiler version:
GCC 9.2.0

The following tests are failing in utils_moduletests:
relativeptrtests/0.ConstrTests
/home/elchris/Development/marthtz-iceoryx/iceoryx_utils/test/moduletests/test_relative_pointer.cpp:127: Failure
Expected equality of these values:
rp.getId()
Which is: 2
1
/home/elchris/Development/marthtz-iceoryx/iceoryx_utils/test/moduletests/test_relative_pointer.cpp:143: Failure
Expected equality of these values:
rp.getId()
Which is: 2
1
/home/elchris/Development/marthtz-iceoryx/iceoryx_utils/test/moduletests/test_relative_pointer.cpp:152: Failure
Expected equality of these values:
rp.getId()
Which is: 2
1

relativeptrtests/1.ConstrTests

  • same is above
    relativeptrtests/2.ConstrTests
  • same is above

The following tests are failing in posh_moduletests:
/home/elchris/Development/marthtz-iceoryx/iceoryx_posh/test/moduletests/test_mq_interface.cpp:121: Failure
Actual function call count doesn't match EXPECT_CALL(*time_MOCK::mock, clock_gettime(_, _))...
Expected: to be called twice
Actual: called once - unsatisfied and active
[ FAILED ] CMqInterface_test.MqInterfaceCreator_TimedReceive

/home/elchris/Development/marthtz-iceoryx/iceoryx_posh/test/moduletests/test_mq_interface.cpp:121: Failure
Actual function call count doesn't match EXPECT_CALL(*time_MOCK::mock, clock_gettime(_, _))...
Expected: to be called twice
Actual: called once - unsatisfied and active
[ FAILED ] CMqInterface_test.MqBase_TimedReceive

/home/elchris/Development/marthtz-iceoryx/iceoryx_posh/test/moduletests/test_mq_interface.cpp:121: Failure
Actual function call count doesn't match EXPECT_CALL(*time_MOCK::mock, clock_gettime(_, _))...
Expected: to be called twice
Actual: called once - unsatisfied and active
[ FAILED ] CMqInterface_test.MqInterfaceUser_TimedReceive

@MatthiasKillat
Copy link
Contributor

As for the relative pointer tests in relativeptrtests/0.ConstrTests you are seemingly missing an important fix in pointer_repository.hpp line 62 and 79:
m_info[id].endPtr = reinterpret_cast<ptr_t>(reinterpret_cast<uint64_t>(ptr) + size);
has to be changed to
m_info[id].endPtr = reinterpret_cast<ptr_t>(reinterpret_cast<uint64_t>(ptr) + size - 1);

Then this issue should not occur (we already have this on develop).

@MatthiasKillat
Copy link
Contributor

MatthiasKillat commented Mar 18, 2020

AtomicRelocatablePointer_test.memoryRelocation by signal SIGBUS (Misaligned address error)

is interesting and I cannot reproduce it. I suggest disabling this test for now as the capability that is tested here (relocation of a memory segment by copy) is not used currently.
I suspect it has something to do with the fact that the memory segment copied by memcpy contains structures which are therefore indirectly copied as well. However, this memcpy does not automatically satisfy the alignment restrictions of the objects which leads to the error on use.
This would be interesting insofar as it shows that arbitrary relocation (which we are not performing in iceoryx) is not possible in general. It is probably sufficient to copy in a way that the first structure stored in the memory segment is correctly aligned which will ensure that all others are correctly aligned as well (since they were before the copy).

I will take a look at this issue in more detail but until then disabling the test is recommended.

@elBoberido
Copy link
Member

elBoberido commented Mar 18, 2020

As for the relative pointer tests in relativeptrtests/0.ConstrTests you are seemingly missing an important fix in pointer_repository.hpp line 62 and 79:
m_info[id].endPtr = reinterpret_cast<ptr_t>(reinterpret_cast<uint64_t>(ptr) + size);
has to be changed to
m_info[id].endPtr = reinterpret_cast<ptr_t>(reinterpret_cast<uint64_t>(ptr) + size - 1);

Then this issue should not occur (we already have this on develop).

It's already there, but I reverted to much from the test. This is fixed now.

@elBoberido
Copy link
Member

AtomicRelocatablePointer_test.memoryRelocation by signal SIGBUS (Misaligned address error)

is interesting and I cannot reproduce it. I suggest disabling this test for now as the capability that is tested here (relocation of a memory segment by copy) is not used currently.
I suspect it has something to do with the fact that the memory segment copied by memcpy contains structures which are therefore indirectly copied as well. However, this memcpy does not automatically satisfy the alignment restrictions of the objects which leads to the error on use.
This would be interesting insofar as it shows that arbitrary relocation (which we are not performing in iceoryx) is not possible in general. It is probably sufficient to copy in a way that the first structure stored in the memory segment is correctly aligned which will ensure that all others are correctly aligned as well (since they were before the copy).

I will take a look at this issue in more detail but until then disabling the test is recommended.

I think I have a solution for this as well

@elBoberido elBoberido dismissed stale reviews from dkroenke, budrus, MatthiasKillat, and themself via 5b7c251 March 18, 2020 09:28
Signed-off-by: Kraus Mathias (CC-AD/ESW1) <mathias.kraus2@de.bosch.com>
@elBoberido elBoberido force-pushed the iox-#59-memory-abstraction-modularization-roudi-fixes branch from 5b7c251 to 5575436 Compare March 18, 2020 12:15
elBoberido and others added 2 commits March 18, 2020 19:12
…test from 4GB to 2GB

Signed-off-by: Kraus Mathias (CC-AD/ESW1) <mathias.kraus2@de.bosch.com>
Signed-off-by: Christian Eltzschig <christian.eltzschig2@de.bosch.com>
@elBoberido elBoberido requested a review from elfenpiff March 19, 2020 11:35
@mossmaurice mossmaurice merged commit 2648bf6 into eclipse-iceoryx:master Mar 19, 2020
@mossmaurice mossmaurice linked an issue Mar 24, 2020 that may be closed by this pull request
@marthtz marthtz deleted the iox-#59-memory-abstraction-modularization-roudi-fixes branch December 18, 2020 15:48
shankar-in pushed a commit to nihalchari/iceoryx that referenced this pull request Dec 23, 2020
…fix/AOS-13323-carma-gcc-9.3-buildable to develop

* commit '04494a54b1f9b5a5a4066d83691ff375265633e2':
  AOS-13323 remove ctors noexcept, remark
  AOS-13323 remove ctors noexcept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

string with fixed but compile-time configurable capacity
8 participants