8000 C++ client: `::mmap()` gets called with length 0 · Issue #499 · aeron-io/aeron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
C++ client: ::mmap() gets called with length 0 #499
Closed
@denizevrenci

Description

@denizevrenci

In C++ client implementation, the constructor of MemoryMappedFile calls ::fstat() to get the size of the CnC file. I get a return value of 0 so the function does not fail. However, file size obtained from here is also 0 if I start the driver while the Aeron directory does not exist and start the clients immediately (under 0.1 s) after that. If I wait for 1 s before starting the clients, the probability drops; however, I still occasionally get the resulting exception.

When I checked the call stack, previously Aeron::mapCncFile() gets called. Here the function waits until MemoryMappedFile::getFileSize() returns a non-negative value. However, it does not wait to get a positive filesize.

Is this expected behaviour? In that case, what do I need to do to ensure I do not get an exception without an arbitrary wait period between Aeron driver and client startup?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0