Skip to content

DDS can't publish data successfully when create a child process in QNX 8.0 platform #6321

@linjinyua

Description

@linjinyua

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

using fork() and execve() to create child process and execute, after this operation, the parent process which running fastdds, publish data, the subscriber can receive data.

Current behavior

using fork() and execve() to create child process and execute, after this operation, the parent process which running fastdds, publish data, the subscriber can not receive data, and the fastdds-spy-tool also not receive data.

Steps to reproduce

  1. one process publish data, one process subscribe data, data publish/subscribe is normally.
    2.using fork() and execve() to create child process in publish process, like as below:
    void test_reqPublisherApp::run()
    {
    int pid = fork();
    if(pid == 0)
    {
    char *argv[] = { "ls", "-l", NULL };
    char *envp[] = { NULL };
    if (execve("/bin/ls", argv, envp) == -1) {
    perror("execve");
    }
    }
    else
    {
    while (!is_stopped())
    {
    if (publish())
    {
    std::cout << "Sample '" << std::to_string(++samples_sent_) << "' SENT" << std::endl;
    }
    // Wait for period or stop event
    std::unique_lockstd::mutex period_lock(mutex_);
    cv_.wait_for(period_lock, std::chrono::milliseconds(period_ms_), this
    {
    return is_stopped();
    });
    }
    }
    }
  2. after step2, the parent process publish data successfully and the subscriber can receive a period of time, but after this time, the subscriber can receive data and the fastdds-spy-tool also not receive data.

Fast DDS version/commit

tag: 3.2.3

Platform/Architecture

Other. Please specify in Additional context section.

Transport layer

Default configuration, UDPv4 & SHM

Additional context

QNX 8.0 platform

XML configuration file

Relevant log output

Network traffic capture

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageIssue pending classification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions