>Synopsis: Writing to a file descriptor of a mmap'ed file are not visible in >memory. >Category: kernel >Environment: VirtualBox System : OpenBSD 6.6 Details : OpenBSD 6.6 (GENERIC) #353: Sat Oct 12 10:45:56 MDT 2019 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
Architecture: OpenBSD.amd64 Machine : amd64 >Description: I discovered this problem while testing libmdbx (an embedded key-value database) on OpenBSD. libmdbx works properly on Windows, Linux, Darwin, FreeBSD, NetBSD, Solaris (OpenIndiana) and DragonFly, but fails on OpenBSD. After researching the problem I found the reason - on OpenBSD a writing to the file descriptor of a mmap'ed file are not (always and/or immediately) visible in the corresponding mmap'ed memory region. libmdbx maps whole DB to the memory and supports several modes to modify the data, but problems occur only when the data is updated by writing to the file descriptor. Corresponding libmdbx issue = https://github.com/leo-yuriev/libmdbx/issues/67 >How-To-Repeat: git clone https://github.com/leo-yuriev/libmdbx.git pkg_add gmake cd libmdbx make mdbx_test ./mdbx_test --mode=-writemap --hill I did not attach hardware information, since I tested only inside VirtualBox. Regards, Leonid.
