Fix rmw_fastrtps SHM crash on Windows with secured large messages (Issue #561) - #605
Open
Aaravanand00 wants to merge 1 commit into
Open
Fix rmw_fastrtps SHM crash on Windows with secured large messages (Issue #561)#605Aaravanand00 wants to merge 1 commit into
Aaravanand00 wants to merge 1 commit into
Conversation
On Windows, FastDDS uses Shared Memory (SHM) transport by default for intra-host communication. When DDS-Security is enabled, the security overhead can cause the SHM segment to overflow when sending large messages (e.g. UnboundedSequences), resulting in an Access Violation crash (exit code 0xC0000005) in the publisher process. Fix by supplying a FastDDS XML profile (fastdds_no_shm.xml) that disables SHM and forces UDPv4 with enlarged send/receive buffers. The profile is injected via FASTRTPS_DEFAULT_PROFILES_FILE only on WIN32 and only for rmw_fastrtps_cpp / rmw_fastrtps_dynamic_cpp, so there is zero behavioural change on Linux or macOS. Fixes ros2#561 Signed-off-by: Aaravanand <aaravanand@gmail.com>
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
Author
|
Hi @fujitatomoya looking into issue #561 the publisher was crashing on Windows (exit code 0xC0000005) because FastDDS's default Shared Memory transport overflows when handling large encrypted messages. Fixed it by injecting a FastDDS XML profile that switches to UDP transport only applies on Windows, no tests skipped, Linux/macOS completely unaffected. Please let me know if any changes was needed.... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Windows, FastDDS uses Shared Memory (SHM) transport by default for intra-host communication. When DDS-Security is enabled, the security overhead causes the SHM segment to overflow when sending large messages (e.g.
UnboundedSequences), resulting in an Access Violation crash (0xC0000005) in the publisher process. Since the publisher crashes, the subscriber waits indefinitely and the test times out.This PR fixes the crash by supplying a FastDDS XML profile (
fastdds_no_shm.xml) that disables SHM and forces UDPv4 transport with enlarged send/receive buffers (1 MB) to accommodate the security-layer overhead on large messages.Key changes :-
test_security_files/fastdds_no_shm.xml: FastDDS profile that disables built-in SHM and uses only UDPv4 transport.test_secure_publisher_subscriber.py.in: InjectsFASTRTPS_DEFAULT_PROFILES_FILEenv var forrmw_fastrtps_cpp/rmw_fastrtps_dynamic_cppprocesses.CMakeLists.txt: Computes the native path to the XML profile onWIN32; set to empty string on Linux/macOS so there is zero behavioural change on non-Windows platforms.Fixes #561
Is this user-facing behavior change?
No. This is a test infrastructure fix. The actual security tests remain unchanged no tests are skipped or removed.
Did you use Generative AI?
Yes, Ai Agent was used to assist in root cause analysis and implementation.
Additional Information
The fix applies only when
WIN32is defined at CMake configure time, so Linux and macOS CI is completely unaffected.