Skip to content

samples/net/sockets/socketpair does not run as expected #52360

@rymaj

Description

@rymaj

Describe the bug
I tried to run samples/net/socket/socketpair, and got the folllowing issue first,

*** Booting Zephyr OS build zephyr-v3.2.0-585-ge80a0c35e666  ***
Alpha: socketpair: 1 <=> 0
Bravo: socketpair: 3 <=> 2
socketpair failed: 23
Alpha closed fd 0
Bravo closed fd 2

Then I figure out I need to increase the default CONFIG_POSIX_MAX_FDS from 4 to 8 for 3 socket pairs (should this change be covered in socketpair/prj.conf ?)

Even I add this setting, I saw this issue, seems the poll mechanism was broken?

*** Booting Zephyr OS build zephyr-v3.2.0-585-ge80a0c35e666  ***
Alpha: socketpair: 1 <=> 0
Bravo: socketpair: 3 <=> 2
Charlie: socketpair: 5 <=> 4
fd: 1: read 5 bytes
fd: 1: read 5 bytes
fd: 1: read 5 bytes
fd: 1: read 0 bytes
fd: 1: read 0 bytes
fd: 1: read 0 bytes
<keep looping>
fd: 1: read 0 bytes
fd: 1: read 0 bytes
fd: 1: read 0 bytes
fd: 1: read 0 bytes

Please also mention any information which could help others to understand
the problem you're facing:

  • What target platform are you using?
  • What have you tried to diagnose or workaround this issue?
  • Is this a regression? If yes, have you been able to "git bisect" it to a
    specific commit?
  • ...

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=board_xyz
  3. make
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper)

Logs and console output
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (```) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used

Additional context
Add any other context that could be relevant to your issue, such as pin setting,
target configuration, ...

Metadata

Metadata

Assignees

Labels

area: POSIXPOSIX API Libraryarea: SamplesSamplesbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions