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

Shared Memory Object Deleted When Calling system() in QNX Environment #5574

Open
1 task done
hao47825148 opened this issue Jan 14, 2025 · 0 comments
Open
1 task done
Labels
triage Issue pending classification

Comments

@hao47825148
Copy link

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

Calling the system() function within a FastDDS-based application running on a QNX environment should execute the desired system command without interfering with FastDDS's internal mechanisms. Specifically, invoking system() should not result in the deletion or corruption of FastDDS shared memory objects.

Current behavior

When the system() function is invoked within a FastDDS-based application on a QNX environment, it unexpectedly leads to the deletion of a FastDDS shared memory object. This results in the failure of DDS operations, such as the inability of subscribers to receive published data.
The issue persists even when using native FastDDS examples(Fast-DDS-2.12.2/examples/cpp/dds/HelloWorldExampleSharedMem) with minimal modifications。
ce11f8ff4e525bba2b06e237e7bfc94

Steps to reproduce

  1. Operating System: QNX localhost 7.1.0S aarch64le

  2. FastDDS Version: 2.12.2

  3. Modify the (Fast-DDS-2.12.2/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPublisher.cpp)Code:
    ce11f8ff4e525bba2b06e237e7bfc94

  4. Compile

  5. Run the examples publisher :
    ./examples/cpp/dds/HelloWorldExampleSharedMem/bin/DDSHelloWorldExampleSharedMem publisher 100 1000

  6. Observe the Behavior : From the output logs, it can be seen that after the publisher has executed several cycles, a fastrtps_xxxxx shared memory object in /dev/shmem/ disappears.

Fast DDS version/commit

v2.12.2

Platform/Architecture

Other. Please specify in Additional context section.

Transport layer

Default configuration, UDPv4 & SHM

Additional context

No response

XML configuration file

No response

Relevant log output

Below are the logs captured during the issue reproduction:

[2025-01-14 16:51:38]  Publisher running 100 samples.
[2025-01-14 16:51:38]  total 4411
[2025-01-14 16:51:39]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:39]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:39]  nrw-r--r--   2 root      root        2122272 Jan 02 14:08 fastrtps_22ca76eb240aff92
[2025-01-14 16:51:39]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:39]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:39]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:39]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:39]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:39]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:39]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:39]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:39]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:39]  total 4411
[2025-01-14 16:51:40]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:40]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:40]  nrw-r--r--   2 root      root        2122272 Jan 02 14:08 fastrtps_22ca76eb240aff92
[2025-01-14 16:51:40]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:40]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:40]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:40]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:40]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:40]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:40]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:40]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:40]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:40]  total 4411
[2025-01-14 16:51:41]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:41]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:41]  nrw-r--r--   2 root      root        2122272 Jan 02 14:08 fastrtps_22ca76eb240aff92
[2025-01-14 16:51:41]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:41]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:41]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:41]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:41]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:41]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:41]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:41]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:41]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:41]  total 4411
[2025-01-14 16:51:42]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:42]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:42]  nrw-r--r--   2 root      root        2122272 Jan 02 14:08 fastrtps_22ca76eb240aff92
[2025-01-14 16:51:42]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:42]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:42]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:42]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:42]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:42]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:42]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:42]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:42]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:42]  total 4411
[2025-01-14 16:51:43]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:43]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:43]  nrw-r--r--   2 root      root        2122272 Jan 02 14:08 fastrtps_22ca76eb240aff92
[2025-01-14 16:51:43]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:43]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:43]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:43]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:43]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:43]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:43]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:43]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:43]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:43]  total 265
[2025-01-14 16:51:44]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:44]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:44]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:44]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:44]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:44]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:44]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:44]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:44]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:44]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:44]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:44]  total 265
[2025-01-14 16:51:45]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:45]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:45]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:45]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:45]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:45]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:45]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:45]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:45]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:45]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:45]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:45]  total 265
[2025-01-14 16:51:46]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:46]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:46]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:46]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:46]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:46]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:46]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:46]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:46]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:46]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:46]  CMD : ls -l /dev/shmem  ret:0
[2025-01-14 16:51:46]  total 265
[2025-01-14 16:51:47]  -rw-rw-r--   2 root      root             83 Jan 01 08:00 analyzer_startup_log.txt
[2025-01-14 16:51:47]  -rw-rw-rw-   2 root      root            860 Jan 01 08:00 clockdebug_log
[2025-01-14 16:51:47]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7400
[2025-01-14 16:51:47]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7410
[2025-01-14 16:51:47]  nrw-r--r--   2 root      root          40048 Jan 02 14:08 fastrtps_port7411
[2025-01-14 16:51:47]  -rw-rw-r--   2 root      root            949 Jan 01 08:00 graphics.conf
[2025-01-14 16:51:47]  -rw-r--r--   3 root      root           1180 Jan 01 08:00 initial_DSP_logs.qmdl
[2025-01-14 16:51:47]  -rw-rw-r--   2 root      root            635 Jan 01 08:00 logs.txt
[2025-01-14 16:51:47]  dr-xr-xr-x   2 root      root              0 Jan 02 14:08 slogger2
[2025-01-14 16:51:47]  -rw-r--r--   3 root      root           9175 Jan 01 08:00 tracebuffer.kev
[2025-01-14 16:51:47]  CMD : ls -l /dev/shmem  ret:0

Network traffic capture

No response

@hao47825148 hao47825148 added the triage Issue pending classification label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue pending classification
Projects
None yet
Development

No branches or pull requests

1 participant