OCaml Multicore - February 2022
Welcome to the February 2022 Multicore OCaml monthly report! As with previous updates, these have been compiled by me, @ctk21, @kayceesrk and @shakthimaan.
Progress towards a stable OCaml 5.0.0 release have been moving forward at full steam, with most of the multicore OCaml work now happening directly within the main ocaml/ocaml repository. As a number of deprecations have happened in OCaml 5.0+trunk, it can be a little tricky in the immediate term to get a working development environment. You may find these resources helpful:
- There is a multicore monorepo which is a 'fast clone and dune build' with a number of ecosystem libraries. (thanks @patricoferris)
- There is an alpha-opam-repository which contains work-in-progress packages. If a package you maintain is in there, now would be a good time to start releasing it to the mainline opam-repository. Remember that while we can propose changes, only the community maintainers of the relevant projects can do the actual release, so your help with making OCaml 5.0-compatible releases of your projects would be very much appreciated. (thanks @kit-ty-kate)
For mainline development, the compiler development newsletter has an overview of what's been happening in the compiler. From a multicore perspective:
- the ARM64 PR has been merged, so your shiny Mac M1s will now work
- we continue to work on the post-Multicore merge tasks for an upcoming 5.0.0+trunk release. The documentation efforts on the OCaml memory model, runtime system, and STW synchronization have also started.
- The eio project is actively being developed which now includes UDP support with Eio's networking interface. There has been robust discussion on several aspects of eio which is all influencing the next iteration of its design (thank you to everyone!). For those of you who do not wish to participate in public discussion, feel free to get in touch with me or @kayceesrk for a private discussion, particularly if you have a large OCaml codebase and opinions on concurrency. We'll summarise all these discussions as best we can over the coming months.
Sandmark-nightlyandSandmarkhave a custom variant support feature to build trunk, developer branches, or a specific commit to assess any performance regressions. The backend tooling with UI enhancements continue to drive thecurrent-benchproject forward.
As always, the Multicore OCaml updates are listed first, which are then followed by the ecosystem tooling updates. Finally, the sandmark, sandmark-nightly and current-bench project tasks are mentioned for your reference.
Multicore OCaml
Open
Discussion
-
ocaml-multicore/ocaml-multicore#750 Discussing the design of Lazy under Multicore
A continuing design discussion of Lazy under Multicore OCaml that involves sequential Lazy, concurrency problems, duplicated computations, and memory safety.
-
ocaml/ocaml#10960 Audit
stdlibfor mutable stateAn issue tracker to audit stdlib for mutable state, as the OCaml 5.00 stdlib implementation should be both memory and thread-safe.
-
ocaml/ocaml#11013 Meta-issue for OCaml 5.0 release goals
An issue tracker that contains a checklist for branching OCaml 5.0.
-
ocaml/ocaml#11073 Code comprehension: why don't STW sections keep
all_domains_lockthe whole time?A discussion on the mutual-exclusion mechanism in STW sections where race conditions on new domains are checked using a condition variable
all_domains_cond.
Build
-
ocaml/ocaml#10940 configure: C11 atomic support required for 5.00.0
The
_Atomickeyword was introduced in GCC 4.9 and hense RHEL 7 and its derivatives cannot build OCaml 5.0.0. RHEL 7 does not reach EOL until 2024. This issue tracks the changes required to add support for C11_Atomic. -
ocaml/ocaml#10989 Download GNU parallel directly from git
The
tools/ci/appveyor/appveyor_build.shhas been updated to download GNU parallel with Git. -
ocaml/ocaml#10991 Use
zstdfor CI artifacts upload and downloadThe upload and download time of CI artifacts are improved with the use of
zstdcompression. -
ocaml/ocaml#11007 Ship and install META files
A PR to keep up-to-date META files for the compiler libraries (
stdlib,compiler-libs,threads,unix,str,anddynlink) and to install them alongside the compiler.
Bug
-
ocaml/ocaml#10773
[4.14] Type [> Cycle ]is not compatible withtype [> Cycle ]A
Type [> ``Cycle ]not compatible error reported when compilingcapnp-rpc.1.2.1with the 4.14 branch. -
ocaml/ocaml#10868 Fix off-by-1 bug when initializing frame hashtables
A PR for
runtime/frame_descriptors.cthat fixes on off-by-1 bug when initializing frame hashtables. -
ocaml/ocaml#11040
ThreadSanitizerissuesAn issue tracker that contains list of
ThreadSanitizerruns fromtests/parallelexecution for troubleshooting race conditions. -
ocaml/ocaml#11061
dumpobjtool crashesA segmentation fault from
tools/dumpobjon a bytecode program has been reported.
Enhancement
-
ocaml/ocaml#10925 Rename symbol for
Caml_statetocaml_stateThe
Caml_statemacro will be renamed tocaml_stateto avoid a name collision, but the change will not be backported to 4.14. -
ocaml/ocaml#10967 Add temp_dir function to create a temporary directory
The addition of
Filename.temp_dirinstdlibis required by the Tezos project to allow importing HTTP tar snapshots. -
ocaml/ocaml#10971 Means of limiting how much memory is being reserved by the runtime, so that Valgrind and AFL can be used
The suggestion is to set
max_domainsfromOCAMLRUNPARAMto provide a good balance between usability and complexity in the implementation. -
ocaml/ocaml#11054 Respect user provided maximum stack space value, and fix debug run of
tmp/stack_space.mltestA PR that honors
OCAMLRUNPARAM=1for the initial stack size, and ensures thattmc/stack_space.mlapplies stack restriction during the running stage. -
ocaml/ocaml#11057 Implement quality treatment for asynchronous actions in multicore
The
caml_process_pendingbehaviour has been reimplemented, and there are code improvements to the asynchronous actions in the Multicore runtime.
Documentation
-
ocaml/ocaml#10992 OCaml multicore memory model and C (runtime, FFI, VM)
A draft documentation on the OCaml Multicore memory model and the use of the
Fieldmacro. -
ocaml/ocaml#11058
runtime/HACKING.adoc: tips on debugging the runtimeThe
HACKING.adochas been updated with information on the runtime system, and a newruntime/HACKING.adocfile has been created on how to troubleshoot the same. -
ocaml/ocaml#11072 domain.c: document the STW synchronization code
A draft documentation on the STW synchronization code in
domain.c.
Testing
-
ocaml/ocaml#10953
ocamltest/summarize.awknot properly reporting abort failures on testsuite runsThe serializer needs to be thoroughly tested using
ocamltest. The recommendation now is to use the strict minimum of code from the standard library and the OCaml runtime to implement ocamltest. -
ocaml/ocaml#10980 GitHub Actions / ocamltest / testsuite / OCaml 5
An issue tracker that contains a list of action items related to ocamltest and OCaml 5.
-
ocaml/ocaml#11016
lib-dynlink-private/test.mlfailing on the debug runtimeAn assertion failure from
lib-dynlink-private/test.mlhas been found in thetest_cow_repeatedsegment during the tests. -
ocaml/ocaml#11055 runtime: introduce
Debug_uninit_tmcinmisc.hAn assertion check in
runtime/memory.cwith the introduction ofDebug_uninit_tmcinmisc.h. -
ocaml/ocaml#11065 Restore basic functionality to the bytecode debugger
A draft PR to handle backtraces in the presence of fibers to restore the basic functionality in the bytecode debugger.
Performance
-
ocaml/ocaml#10964 Ring-buffer based runtime tracing (
eventring)Eventring is a runtime tracing system designed for continuous monitoring of OCaml applications. There is not much difference with this PR when running Sandmark's sequential benchmarks as illustrated below:

-
ocaml/ocaml#11062 Bytecode compiler emits too many calls to
caml_ensure_stack_capacity, causing a slowdownThe bytecode compiler emits calls to
caml_ensure_stack_capacitythat causes a performance regression in Sandmark benchmarks. The following illustration compares the byte code results between 4.13.1 and 5.0.0 (February 24, 2022).

Closed
Build
-
ocaml/ocaml#10760 Use GNU parallel for the CI testsuite runs
Use
make parallelintools/ci/actions/runner.shto speed-up CI test runs. -
ocaml/ocaml#10875 Use mmap(MAP_STACK|...) for fibre stacks on OpenBSD
An option to allocate stacks with
mmap(MAP_STACK)instead ofmalloc. This is available using a configure--enable-mmap-map-stackoption. There is not much difference between trunk or with mmap on/off on Linux as shown below:

-
ocaml/ocaml#10893 Remove configuration options
--disable-force-safe-stringandDEFAULT_STRING=unsafeA PR that removes the deprecated
--disable-force-safe-stringandDEFAULT_STRING=unsafecompiler options. -
ocaml/ocaml#10962 Ignore compatible
--disableoptions in configureThe definitions of
NO_NAKED_POINTERSinm.handNAKED_POINTERS=falseinMakefile.config.inare retained for compatibility, and the error for the--disableoption in the configure script is ignored. -
ocaml/ocaml#11037 Assorted fixes found while restarting the Jenkins CI
The PR contains configure tweaks, updates to Jenkins scripts, test suite fixes, and updates to the runtime system based on observations in the Jenkins CI.
-
ocaml/ocaml#11049 Normalize the version number of the compiler
The compiler version number is now
5.0.0. -
ocaml/ocaml#11063 Fix the opam file after #11049
The
ocaml-variants.opamfile has been updated to use version5.0.0+trunk.
Fix
-
ocaml/ocaml#10973 Remove unused
gc_regs_slotin domain_stateThe
gc_regs_slotis superseded bygc_regs_bucket, and the same is thus removed. -
ocaml/ocaml#10994 [minor] fix multicore merge error in
minor_gc.c:reallloc_generic_tableThe
realloc_generic_tableinruntime/minor_gc.chas been restored with the correct parameters. -
ocaml/ocaml#11002 Do not use
Begin_roots/End_rootsin runtimeThe
Begin_rootsandEnd_rootsare not to be used in the runtime, and a deprecation warning has been added to these macros. -
ocaml/ocaml#11014 Cut polling of pending signals vector in bytecode interpreter
The polling using
caml_check_pending_signalsis removed in the bytecode interpreter. Also,caml_check_pending_interruptis removed in favour ofcaml_check_gc_interrupt. -
ocaml/ocaml#11039 Reintroduce
caml_final_do_calls_exnThe
runtime/finalise.ccode has been updated based on the review of asynchronous action handling in Multicore, andcaml_final_do_calls_exnhas been reintroduced. -
ocaml/ocaml#11046 minor bugfix in caml_reallocate_minor_heap
A fix in the "decommit" logic of
caml_reallocate_minor_heap, and the current minor heap layout has been documented. -
ocaml/ocaml#11051 Fix leftover TODO in
runtime/startup_byt.cThe
Fatal error during unlock: Operation not permittederror is now fixed inruntime/startup_byt.c. -
ocaml/ocaml#11053 Make
Hd_vala relaxed atomic loadThe PR provides a fix for ThreadSanitizer issues.
Hd_valis no longer an lvalue, and is moved to a relaxed atomic.
Documentation
-
ocaml/ocaml#11008 Document and refactor the gc-stats code
The GC module provides two kinds of runtime statistics,
Heap StatsandAllocation Stats, and the same has been documented inruntime/caml/gc_stats.h. -
ocaml/ocaml#11038 Atomic: update documentation and add institution
The
CamlInternalAtomicis removed since atomics are now primitive, and documentation has been updated. -
ocaml/ocaml#11059 Documentation improvements for native stack switching functions
Additional comments have been added in
fiber.hfor the native code specification ofocaml_runstack,caml_perform,caml_reperform, andcaml_resume. The data structures,struct stack_infoandstruct stack_handler, have also been documented.
Testing
-
ocaml/ocaml#10930 Downstream patch changes for removed
StreamandPervasiveslibrary PR#10896The recommended patch changes for Sandmark dependencies that are used to run parallel benchmarks for 5.00.0+trunk have been updated.
-
ocaml/ocaml#11004 Memory model tests
A new
testsuite/tests/memory-modelsub-directory has been created for testing the memory model. -
ocaml/ocaml#11033 Fix test
callback/test_signalhandler.mlThe
.mlifiles intestsuite/tests/callbackhave been cleaned up, andunix_killnow checks for signals. Amykillfunction that does not allocate has been added to the test.
Enhancement
-
ocaml/ocaml#10462 Add [@poll error] attribute
The PR proposes an attribute to accompany the safepoints PR, which will help developers of libraries having atomic sections to do so in a less error prone way.
-
ocaml/ocaml#10950 Allocate domain state using
mallocinstead ofmmapThe
mmapcalls are replaced bymallocto simplifyCaml_statemanagement. -
ocaml/ocaml#10965 Thread safety for all runtime hooks
The thread-safety of hooks and the restoration of the GC timing hooks in Multicore have been merged.
-
ocaml/ocaml#10966 Simplifications/cleanups/clarifications for Multicore review
caml_modifyhas been documented, the APIs for signals/actions have been simplified, and dead code has been removed. -
ocaml/ocaml#10974
domain.c: Use an atomic counter for domain unique IDsThe use of a fixed
Max_domainssetting is removed to dynamically configure the same during program execution. -
ocaml/ocaml#10977 Make
<caml/sync.h>more abstract and refactor implementation of sync.cThe POSIX implementation of mutexes and condition variables in
<caml/sync.h>have been moved tosync_posix.h. The<caml/sync.h>declares only the high-level, platform-agnostic mutex and condition variable operations. -
ocaml/ocaml#10988 Provide a default definition of
cpu_relaxA default definition of
cpu_relaxhas been added toruntime/caml/platform.h. -
ocaml/ocaml#11003 Adjust
mmapalignment of minor heap spaceThe alignment for
mmapin the minor heap space has been adjusted to usecaml_sys_pagesize. -
ocaml/ocaml#11010 Alternative approach to using
strerror_rfor reentrant error string conversionThe
strerror_ris used for reentrant error string conversion. Also, acaml_plat_fatal_errorerror reporting function has been added toruntime/platform.c. -
ocaml/ocaml#11023 Careful minor heap clear in DEBUG
The
Debug_free_minoris used to clear the minor heap at the end of a minor collection, and the transition fromDebug_free_minortoDebug_uninit_minoris checked when usingAlloc_small. -
ocaml/ocaml#11031 With frame-pointers, exception handlers should restore RBP
On AMD64, the exception handlers should restore the
rbpregister when using frame-pointers. -
ocaml/ocaml#11056 Minor improvements to "named values" handling
The result of
caml_named_value("Unix.Unix_error")is cached, and the "djb2" hash function is used for the table of named values. Also, locking has been added tocaml_iterate_named_values.
Cleanup
-
ocaml/ocaml#10966 Simplifications/cleanups/clarifications from multicore review
The
caml_modifyis now documented, and a few public API have been made private. The APIs for signals have been simplified, and dead code has been removed. -
ocaml/ocaml#11001 Header cleanup:
mlvalues.hincludedomain_state.honce & minimise cross-header includesThe
domain_state.hnow includesmlvalues.honce, and the PR minimises cross-inclusion between headers. -
ocaml/ocaml#11019 Remove unncessary
Current_threadrestore incaml_thread_enter_blocking_sectionThe
caml_thread_enter_blocking_sectionfunction inotherlibs/systhreads/st_stubs.chas been updated to remove the unnecessary use ofCurrent_thread. -
ocaml/ocaml#11041 Minor cleanups in effect.ml
The PR remove code duplication in
Effect.Shallow. It also removesObj.magicand includes optimization toShallow.fiber.
Performance
-
ocaml/ocaml#10930 Downstream patch changes for removed
StreamandPervasiveslibrary PR#10896The removal of
StreamandPervasiveslibrary required patch updates to Sandmark dependency packages. -
ocaml/ocaml#10949 Atomic operations on arrays
A new
Atomic.Arraymodule contains the atomic operations on arrays, namely, atomic read, write, exchange, compare and set, and fetch and add. A program that spawns four threads and performs 10,000 fetch-and-adds in an atomic array of integers was benchmarked. The performance of random write accesses is illustrated in the following figure: -
ocaml/ocaml#11000 Fix a minor regression from #10462
The
check_local_inlineis added tolambda/translattribute.mlto fix a minor regression related to safepoints. -
ocaml/ocaml#11047 gc stats: properly orphan allocation stats
The
orphan statsare stored in a globalstructure alloc_statsingc_stats.c, which is protected by a lock. On domain termination, the stats of the current domain are added toorphan stats.
ARM64
-
ocaml/ocaml#10943 Introduce atomic loads in Cmm and Mach IRs
The
Patomic_loadprimitive is now enhanced to ease support for other architectures. This is required for the ARM64 support. -
ocaml/ocaml#10972 ARM64 multicore support
The PR for ARM64 Multicore OCaml has been merged. The
arm64.Sfile has been updated, and the coverage tests fortestsuite/tests/effectsandtestsuite/tests/callbackrun fine.
Ecosystem
Eio
Open
-
ocaml-multicore/eio#190 Update to
cmdliner.1.1.0A draft PR to update to
cmdline.1.1.0with changes tolib_eio_linux/tests/eurcp.ml. -
ocaml-multicore/eio#196 Consider renaming
Fibre.forkThe
Fibre.forkname is not related toUnix.fork, and it does not copy the calling environment. It needs to be renamed. Suggestions includecreate,start, orspawn. -
ocaml-multicore/eio#205 Prepare release
The sources now depend on
uring.0.3andCHANGES.mdfile has been updated to prepare for a release.
Completed
Build
-
ocaml-multicore/eio#167 Remove pin-depends on uring
The
pin-dependssection ineio_linux.opamfile has been removed. -
ocaml-multicore/eio#182 Add a dependency on OCaml
An explicit dependency mentioning
ocaml (>= 4.12.0)has been added to thedune-projectandeio.opamfiles.
Fix
-
ocaml-multicore/eio#173
Buf_read.seqnow checks the stream hasn't moved onThe error detection for using a sequence twice, or when performing other parsing operations first has been added.
-
ocaml-multicore/eio#174 Remove "broken" state from promises
A promise is now simply unresolved or resolved.
Promise.awaitdoes not raise exceptions, andPromise.break,Promise.broken, andawait_resulthave been removed. -
ocaml-multicore/eio#176 Prevent Switch and Cancel from being mutated from other domains
A cancellation context across domains is not permitted, and cancellation functions are allowed to assume that they are running in their own domain.
-
ocaml-multicore/eio#187 WSL: Unix.Unix_error on "Hello, World" example
A
Unix.Unix_errorreported by @leviroth (Levi Roth) when running a "Hello, World" example on Windows 11. The PR#203 provides a fix for the same. -
ocaml-multicore/eio#195 Rename Fibre to Fiber
The upstream naming of
Fiberis used in the sources, and the old name is marked as deprecated. -
ocaml-multicore/eio#201
Effect.effis nowEffect.tin trunkThe upstream change in trunk from
Effect.efftoEffect.thas been incorporated into Eio with compatibility for 4.12+domains. -
ocaml-multicore/eio#203 Switch to
luvbackend if uring can't be usedA
fallbackargument has been added to check ifio_uringis available on the system. Otherwise, theluvbackend is used.
Enhancement
-
ocaml-multicore/eio#155 Add
Eio_unix.FDThe
FDmodule has been added tolib_eio/unix/eio_unix.mlto be used with theLuv.0.5.11asynchronous I/O library. -
ocaml-multicore/eio#165 Add
secure_randomdevice to stdenvA Random module has been added to
lib_eio_luv/eio_luv.ml, andlib_eio/eio.mlincludes asecure_randomdevice to stdenv. -
ocaml-multicore/eio#166 Simplify Flow interface
The
readandwriteclasses have been removed, and we instead usesourceandsinkfor everything. Also,Flow.read_into src bufhas been renamed toFlow.read src buf. -
ocaml-multicore/eio#168 Move low-level backend functions to submodules
The Eio abstraction provides top-level functions, and hence the low-level backend functions have been moved to submodules.
-
ocaml-multicore/eio#169 Make
Eio.Stdjust provide aliases to EioThe PR allows you to directly refer to
Eio.Promise.t, andEio.Stdprovides aliases to Eio. -
ocaml-multicore/eio#171 UDP interface
An initial implementation of
UDPsupport to Eio's networking interface. Atests/test_network.mdfile has also been added to test working with UDP and endpoints. -
ocaml-multicore/eio#175 Add
Buf_read.parse_exnThe
lib_eio/buf_read.mlfile now includes aparse_exnfunction that converts parser errors into friendly message. -
ocaml-multicore/eio#177 Replace
Ipaddr.classifywithIpaddr.foldThe
Ipaddr.foldis used instead ofIpaddr.classifyto match the style ofstdlib. -
ocaml-multicore/eio#178 Rename
Sink.writetoSink.copyThe
Sink.writefunction has been renamed toSink.copyto match the actual functionality. -
ocaml-multicore/eio#181 Move ctf to eio
The
Ctfmodule has been moved inside Eio as its API could change quite often. -
ocaml-multicore/eio#188 Add
Eio_unix.sleepA
Eio_unix.sleepfunction has been added as a replacement forLwt_unix.sleepto not treat time as a capability. -
ocaml-multicore/eio#192 Tidy up forking API
The
Cancel.cancelhas been optimised, andfork_promisereports the result against the promise. -
ocaml-multicore/eio#198 Add
Eio_unix.FD.as_socketWe now wrap a Unix FD as an Eio socket, which is useful for working with existing libraries that provide a
Unix.file_descror when receiving FDs from socket activation. -
ocaml-multicore/eio#199 Update to new uring API to get FD passing
The
lib_eio_linux/eio_linux.mlfile has been updated to use the newuring API, and a FD passing test has been added. -
ocaml-multicore/eio#200 Eio_linux: cope with lack of fixed chunks
A failure request to allocate a fixed buffer now logs a warning. The
with_chunkfunction takes ann_blocksargument, andfreeis now calledfree_fixed.
Documentation
-
ocaml-multicore/eio#170 Document how to implement Eio objects yourself
A
Provider Interfacessection has been added to theREADME.mdfile that documents how to define your own resources. -
ocaml-multicore/eio#172 Clean up Eio odoc
The
Hookis inlined withSwitch, and most modules now have documentation with an example. -
ocaml-multicore/eio#179 Update odoc for
eio_main,eio_luvandeio_linuxThe odoc documentation has been updated for
eio_main,eio_luv, andeio_linuxfiles. -
ocaml-multicore/eio#180 Update README
Additional notes on
Object Capabilitieshave been added in theREADME.mdfile along with the current status of the Eio project. -
ocaml-multicore/eio#183 Publish odoc on release
The
dune-projectfile has been updated with the link to the odoc documentation web page for Eio. -
ocaml-multicore/eio#185 Link to generated odoc from README
The links to the generated odoc from the
README.mdfile have been explicitly linked for quick reference. -
ocaml-multicore/eio#186 Minor documentation fixes
The
README.mdandlib_eio/eio.mlidocumentation have been updated with minor fixes. -
ocaml-multicore/eio#194 Remove confusing use of the word "object"
The word
objecthas been removed from theCapabilitiessection in the README.md file in order to avoid any confusion with OCaml objects (polymorphic records). -
ocaml-multicore/eio#197 Add more documentation
The documentation on
Cancellationhas been updated with more low-level details.
Testing
-
ocaml-multicore/eio#184 Tests: use local directory for test socket
opam-repo-ciuses a read-only/tmpdirectory, and hence we switch to using a local directory for testing socket. -
ocaml-multicore/eio#189 Add an example
Eio_nullbackendA skeleton Eio backend with no actual effects has been added as an example. It is inefficient and not thread-safe, but, exists for demonstration purpose only.
-
ocaml-multicore/eio#191 Suppress cmdliner deprecation warning
A
-deprecatedflag is added tolib_eio_linux/tests/eurcp.mlto suppress cmdliner warnings when testing. -
ocaml-multicore/eio#202 Fix typo in tests
The
lib_eio/eio_linux/tests/fd_passing.mdfile has been updated to run uring tests withEIO_BACKEND=luv. -
ocaml-multicore/eio#204 Disable Linux mdx test on non-linux platforms
Using the
enabled_ifconstruct fromdune.2.9the Linux MDX tests are now run only when the system is forlinux.
Tezos
Open
-
ocaml-multicore/tezos#25 Merge updates -- disable failing tests temporarily
The temporary disabling of failing tests, and a merge update for upstream changes.
-
ocaml-multicore/tezos#27 Status of build on 5.0.0+trunk
An issue tracker for the list of failing builds required to build Tezos on 5.0.0+trunk.
Closed
-
ocaml-multicore/tezos-opam-repository#9 sync
A merge that updates the repository with upstream changes up to January 24, 2022 for the
4.12.0+domainsbranch. -
A synchronization of upstream changes to
4.12.0+domainsbranch.
domainslib
Open
-
ocaml-multicore/domainslib#65 Fix build on trunk
A patch in Domainslib for the renaming of
Effect.eff -> Effect.tchange has been provided. The CI has now been updated to build for5.0.0+trunkas well. -
ocaml-multicore/domainslib#66
Domainslib.0.4.1build failure withOCaml 5.0.0+trunkAn
Unbound type constructer efferror occurs when buildingDomainslib.0.4.1in Sandmark for OCaml 5.0.0+trunk.
Completed
-
ocaml-multicore/domainslib#64 Changes from opam-repository
The
domainslib.opamfile has been updated to useOCaml (>= "5.0"), anddune (>= "1.8").
ocaml-uring
Closed
Updates
-
ocaml-multicore/ocaml-uring#46 Update to
liburing 2.1The sources have been updated to use
liburing.2.1, andlib/uring/uring_stubs.cnow invokesio_uring_submit(ring). -
ocaml-multicore/ocaml-uring#49 Add
sendmsgandrecvmsgThe PR adds
sendmsg(2)andrecvmsg(2)calls to the uring library, and defines a moduleMsghdr. -
ocaml-multicore/ocaml-uring#50
Cmdliner.1.1.0The
Cmdlinerversion has been updated to 1.1.0 and to use the latest API for the tests. -
ocaml-multicore/ocaml-uring#52 Allow sending and receiving FDs using SCM_RIGHTS
The target address in
send_msgis optional, and we can now send and receive FDs with SCM_RIGHTS. -
ocaml-multicore/ocaml-uring#53 Don't allocate a fixed buffer by default
The user needs to use
set_fixed_bufferto allocate a fixed size buffer to avoid hitting a resource limit and locking memory.
Documentation
-
ocaml-multicore/ocaml-uring#47 Prepare release
The
CHANGES.mdfile has been updated with new features and changes for a release. -
ocaml-multicore/ocaml-uring#48 Link to API docs
The
README.mdhas been updated with link to the API documentation. -
ocaml-multicore/ocaml-uring#54 Prepare release
The
CHANGES.mdfile has been updated with new and breaking changes to prepare for a release.
retro-httpaf-bench
Open
-
ocaml-multicore/retro-httpaf-bench#19 cohttp-eio: add cohttp-eio based benchmark
A
cohttp_eiobenchmark has been added with updates to the benchmarking scripts. -
ocaml-multicore/retro-httpaf-bench#21 Simpler hyper server
An implementation of a simple hyper server that uses Tokio's multi-threaded scheduler.
-
ocaml-multicore/retro-httpaf-bench#22 Add version bound for shuttle
The
shuttle.0.3.1version is explicitly specified in order to keep the benchmarks running, even if there are breaking changes in future shuttle releases.
Completed
-
ocaml-multicore/retro-httpaf-bench#20 Update to
Eio0.1The Dockerfile has been updated to use
Eio0.1.
Sundries
Open
-
ocaml-multicore/eventlog-tools#6 Update
eventlog-toolsfor MulticoreA work-in-progress to update
eventlog-toolsfor Multicore OCaml. -
ocaml-multicore/tezos#24 Test suite failure
An ongoing fix for the
Alcotest_engine__Core.Make(P) (M)error when running the tests. -
ocaml-multicore/effects-examples#26 Port to OCaml 5.00
The Rename Effect.{eff=>t} PR is required to port the
Effectsexamples to run with OCaml 5.0, without the dedicated effects syntax.
Closed
-
ocaml-multicore/eventlog-tools#5 Update
consts.mlto work with OCaml 4.13The
force_minor/memprofsources have been included inlib/consts.mlto build eventlog-tools for OCaml 4.13.1. -
ocaml-multicore/lockfree#9 Update
cpu_relaxto new locationThe
Domain.Sync.cpu_relaxhas been updated withcpu_relaxinsrc/backoff.mlto build with OCaml 5.0.0. -
ocaml-multicore/lockfree#10 Remove unused dependencies from opam file
The
kcaspackage is not a dependency oflockfree, andocamlfindandocamlbuildare not needed any more. These three dependencies have been removed from thelockfree.opamfile. -
ocaml-multicore/kcas#11 Update
cpu_relaxto new locationThe PR updates
Domain.Sync.cpu_relaxinsrc/backoff.mlso that it can compile with OCaml 5.0.0.
Benchmarking
Sandmark
Open
-
ocaml-bench/sandmark#274 Custom Variant Support
The configuration to build developer branches in Sandmark for a specific branch, configure options, runtime parameters, a name for the variant, dependency package override, package removal list, and an expiry date until which the Sandmark nightly runs should occur is almost complete. The sample JSON configuration file is as follows:
[ { "url" : "https://github.com/ocaml-multicore/ocaml-multicore/archive/parallel_minor_gc.tar.gz", "configure" : "-q", "runparams" : "v=0x400", "name": "5.00+trunk+kc+pr23423", "expiry": "YYYY-MM-DD"}, ...] -
ocaml-bench/sandmark#279 Update notebooks/ To 5.00.0+trunk
The Jupyter notebooks in the notebooks/ folder need to be updated to use the 5.0.0+trunk, by default.
-
ocaml-bench/sandmark#280 Upstream 5.00.0+trunk dependency packages
A number of Sandmark dependency package patches have been upstreamed to the respective maintainers or to the OPAM repository. A few more patches remain to be submitted upstream.
-
ocaml-bench/sandmark#282 Analyse Bytecode Performance
The Sandmark benchmarks produce native code, by default, and we would like to run the byte code version of the benchmarks to identify any regression between 4.13 or 4.14 with 5.0.0+trunk.
-
ocaml-bench/sandmark#285 Evaluate merging parallel run_config.json files
A request to combine
multicore_parallel_run_config.jsonandmulticore_parallel_navajo_run_config.jsoninto one JSON file, so that we add new benchmarks to one place instead of two (or more). -
ocaml-bench/sandmark#286 Update
check_urland validate URL in custom.json filesThe
check_urltarget in the Makefile needs to check if a URL is present for each and every entry in thecustom.jsonfile, and that the URL actually exists.
Closed
Build
-
ocaml-bench/sandmark#270 Update to 5.00.0+domains
The dependencies and benchmarks to run 5.00.0+domains variant have been updated to build in Sandmark.
-
ocaml-bench/sandmark#276 Re-add 5.00.0+trunk with CI failure:ignore option
The .drone.yml CI is updated to ignore a failed build for 5.00.0+trunk, so that we can continue to merge changes as long as 5.00.0+stable Sandmark builds fine.
-
ocaml-bench/sandmark#278 Updated run_all scripts and 5.00.0+stable to February 3, 2022 commit
The
run_allscripts have been updated to useSYS_DUNE_HACK, and the 5.00.0+stable variant has been updated to the February 3, 2022ocaml/ocamlcommit. -
ocaml-bench/sandmark#295 Clean OCaml dependencies/packages fully after a build
The
ocaml-base-compilerandocamldependency packages folder need to be cleaned correctly, as they are used in subsequent sandmark-nightly runs.
Enhancement
-
ocaml-bench/sandmark#271 Parameterize ocaml-variants information as Docker environment variables
The following variables have been parameterized in the Sandmark Makefile to be used as environment variables to support the
Custom Variant Supportfeature request:SANDMARK_DUNE_VERSION SANDMARK_URL SANDMARK_REMOVE_PACKAGES SANDMARK_OVERRIDE_PACKAGES -
ocaml-bench/sandmark#283 Add Custom Variant Support feature
An initial support for the Custom Variant Support feature that allows you to specify
url,tag,config_json,name,expiry,environment,configure, andrunparamsin a custom.json file has been merged to run with sandmark-nightly. -
ocaml-bench/sandmark#284 Use specific name in .orun.summary.bench output
The
namespecified in a custom.json file is now used in theorun.summary.benchresults file. -
ocaml-bench/sandmark#287 Use separate custom variant JSON files per server
Two separate
custom_navajo.jsonandcustom_turing.jsonfiles have been created for sandmark-nightly execution runs. -
ocaml-bench/sandmark#291 Custom script log output to results directory
The build and execution logs are now stored along with the benchmark results for easy access in the UI.
-
ocaml-bench/sandmark#293 Allow raw GitHub JSON configuration input for custom variant
You can now use a
CUSTOM_FILEenvironment variable to pass a remote file as an input configuration to the Custom Support Variant feature request.
Documentation
-
ocaml-bench/sandmark#268 Update README CI Build status to main branch
The CI
Build Statusfor themainbranch in Sandmark has been updated to point to the main branch. -
ocaml-bench/sandmark#277 Sync and update README from master branch
The README changes from the Sandmark master branch have been synced up with the main branch, as we will soon switch to using the main branch as the default branch in Sandmark.
Sundries
-
ocaml-bench/sandmark#281 Sandmark.ocamllabs.io shows error instead of parallel benchmarks
The production server has been deployed with the latest nightly scripts, and the web application that fixes the display of the parallel benchmarks.
-
ocaml-bench/sandmark#289 Use CPU 5 in run_config.json for consistency
The
oruncommand now uses CPU 5 to be consistent with the other wrappers. This is not an issue with the CI runs. -
ocaml-bench/sandmark#292 Use Task run in parallel benchmarks
The
domainslib.0.4.1package has been updated in Sandmark, and theparallel_forandawaitcalls are now wrapped inTask.run. -
ocaml-bench/sandmark#296 Use a single
Task.runin parallel benchmarksA fix where the
Task.poolinside the iter function was blocking indefinitely. Now theLU_decomposition_multicore.exeparallel benchmark runs correctly.
Sandmark-nightly
Open
-
ocaml-bench/sandmark-nightly#21 Add 5.0 variants
The sandmark-nightly scripts now run 5.0 variants, but, the pausetimes with
ocaml/ocamlneeds to be updated. -
ocaml-bench/sandmark-nightly#42 Alert notification for Sandmark nightly runs
A daily status summary of the nightly runs should be sent to a deployment of
ocaml-matrixserver. -
ocaml-bench/sandmark-nightly#45 Refactor sandmark-nightly
A list of changes that are required to clean up the sandmark-nightly repository, and move the scripts to Sandmark. Thus, sandmark-nightly will just store the data results, and sandmark will have the code.
-
ocaml-bench/sandmark-nightly#48 Numbered list is misaligned in the home page
The list indentation is incorrect in the home page and it needs to be fixed.
-
ocaml-bench/sandmark-nightly#49 Add Sandmark info to sandmark-nightly
A PR that shows the commit version and branch of Sandmark used in the sandmark-nightly in the UI.
Closed
-
ocaml-bench/sandmark-nightly#27 Include the baseline variant information in the normalised graphs
The normalised graph now includes the information of the baseline variant used for comparison.
-
ocaml-bench/sandmark-nightly#34 Parallel benchmarks should be run on
ocaml/ocaml#trunkThe CI parallel benchmarks execution runs have been switched to run for
ocaml/ocaml#trunk. -
ocaml-bench/sandmark-nightly#37 Sequential results comparison is broken
The inclusion of the meta header first line is the .bench output is now handled in the UI.
-
ocaml-bench/sandmark-nightly#40 The information in the landing page is out of date
The landing page now displays both
stableandtrunkvariants correctly. -
ocaml-bench/sandmark-nightly#50 Simple fix for index page to display text properly
The trailing whitespaces and list indentation have been fixed.
current-bench
Open
End Users
-
ocurrent/current-bench#306 WIP ocaml compiler benchmarks
A high-level issue tracker for building
ocaml/ocamlcompiler benchmarks, and necessary tooling with current-bench. -
ocurrent/current-bench#311 Raspberry Pi long term support
The Raspberry Pi is now added to the
current-benchcluster, and you can add an entry for the same toenvironments/production.confas shown below:{ "repositories": [ { "name": "mirage/irmin", "worker": "rpi4b", "image": "ocaml/opam:debian-11-ocaml-4.12" }A way to handle the fan noise during intensive Irmin benchmarks on the Raspberry Pi is needed.
Enhancement
-
ocurrent/current-bench#312 Time scheduling
A benchmark is run on a new commit, or on the default branch, or for a PR. We need to add support to schedule jobs on a timely basis.
-
ocurrent/current-bench#314 Retro-benchmark new repositories
A feature request to be able to run benchmark results on older commits for a newer current-bench deployment.
Frontend
-
ocurrent/current-bench#313 Record commits messages
The commit first-line description needs to be shown along with the commit hash in the UI.
-
ocurrent/current-bench#317 Frontend rewrite
The frontend uses Rescript, and the current plotting library has its limitations. An open issue to discuss rewriting the frontend.
-
ocurrent/current-bench#322 Adjust units on comparison commit values tool
The
adjustfunction is now called on both the benchmark and the comparison values to show the same units. -
ocurrent/current-bench#323 Allow clicking on the legend to show/hide plot lines and use more columns
The legend now uses more columns when clicking on the show/hide plot in the UI as shown below:

-
ocurrent/current-bench#324 Disabled worker / docker image
The frontend automatically selects the first "environment" (worker + Docker image) and the system may contain disabled ones. The environment list needs to be filtered for the active entries only.
-
ocurrent/current-bench#326 frontend: Fix bug with using same x-axis for all metrics
The PR fixes the change to use the correct meta-data for all the commits, for every metric in the x-axis.
Testing
-
ocurrent/current-bench#316 Real-life testing
current-bench requires both functional and integration tests for checking on failure conditions and to validate the backend pipeline.
-
ocurrent/current-bench#318 Cobench user library
A validation test interface, when adding new benchmarks, is needed to check that the expected JSON output from the
make benchoutput conforms to the latest schema.
Monitoring
-
ocurrent/current-bench#290 Add optional field to JSON
A request to add an optional field in the JSON object whose values can be printed verbatim in the log.
-
ocurrent/current-bench#298 Production logs and warnings
The filtering of the logs based on a component in the pipeline will be useful for troubleshooting and debugging production issues.
-
ocurrent/current-bench#319 Github bot messages
Similar to code coverage reports, it will be nice to produce detailed performance regressions results on GitHub PRs.
Closed
Build
-
ocurrent/current-bench#282 Docker compose for stack deploy
A
docker-compose.yamlfile can now build the backend pipeline and frontend stack for deployment. -
ocurrent/current-bench#301 Worker support for raspberry ARM: add new argument to specify arch
The architecture argument has been added to the
run_commandfunction to allow the use of Raspberry Pi ARM as a worker. -
ocurrent/current-bench#305 Update
ocamlformatversion to0.20.1The
ocamlformatversion has been updated from0.19.0to0.20.1.
Enhancement
-
ocurrent/current-bench#289 Fix URL missing pull number
The URL should contain the PR number when redirecting to add the worker or Docker image.
-
ocurrent/current-bench#292 Return better HTTP error codes for API requests
The client requests now receive correct HTTP error codes for exception handling.
Frontend
-
ocurrent/current-bench#293 Make log links noticeable by removing log ID from link text
A link to view the build and execution logs is now provided in the UI, instead of the log UUIDs.

-
ocurrent/current-bench#299 Fix GitHub status update: wait for benchmark to terminate
The GitHub status of the application should show a green "pass" state only after the successful execution of the benchmarks.
-
ocurrent/current-bench#308 frontend: Fix incorrect GraphQL query for default benchmark
The default benchmark now has a name instead of NULL to satisfy PostgreSQL's UNIQUE constraint.
-
ocurrent/current-bench#309 Make it easier to go back to "home page" from error view
A side bar has been added to the error view for easier navigation.
-
ocurrent/ocurrent#309 Show line numbers and allow jumping to specific lines in job logs
A URL like http://localhost:8080/job/2022-02-09/115753-docker-build-71c777#L11-L15 would highlight lines 11 to 15 and scroll the page to line 11 as illustrated below:

-
ocurrent/current-bench#320 Show all commits for all metrics and highlight failed metrics
The metrics that do not have a value for the latest commit are considered failed commits, but, all the metrics are shown in the UI. The graphs are also made full width and aligned vertically as shown below:

-
ocurrent/current-bench#325 Display old commit benchmarks warning irrespective of build status
The UI now shows the old commit benchmarks warnings.
Testing
-
ocurrent/current-bench#294 Add unit tests
A
pipeline/testsfolder has been created with unit tests, and you can run them from thepipeline/directory as follows:$ dune runtest $ dune exec tests/test.exe -
ocurrent/current-bench#307 Add coverage using bisect_ppx
The Makefile now includes a
coveragetarget that usesbisect_ppx, and generates a HTML coverage report.
Sundries
-
ocurrent/current-bench#281 Document how to add workers
The
HACKING.mdfile has been updated with information on how to add new workers to the cluster, and configuration of remote workers to run the benchmarks. -
ocurrent/current-bench#295 Fix benchmark name unique constraint
PostgreSQL does not consider NULL values to be equal and hence the conflict on UNIQUE constraint for the benchmark name does not get triggered. This creates duplicate rows in the database, and this PR provides fixes at the application and the database level.
-
ocurrent/current-bench#296 Capture line numbers of where metrics appear in the logs
The line numbers of the metrics from the logs are now captured in the database.
-
ocurrent/current-bench#303 Run DB migrations on pipeline start
The database migrations are now run prior to starting the application, which were earlier defined in a
maketarget. -
ocurrent/current-bench#304 Update deprecated Term functions
The
cmdliner.1.1.0package has been updated along with changes to remove the use of the deprecatedTermfunctions.
Our special thanks to all the OCaml users, developers and contributors in the community for their valuable time and continued support to the project.
Acronyms
- AFL: American Fuzzy Lop
- AMD: Advanced Micro Devices
- API: Application Programming Interface
- ARM: Advanced RISC Machines
- AWK: Aho Weinberger Kernighan
- BSD: Berkeley Software Distribution
- CI: Continuous Integration
- CTF: Common Trace Format
- DB: Database
- EOL: End Of Life
- FD: File Descriptor
- FFI: Foreign Function Interface
- GC: Garbage Collector
- GNU: GNU's Not Unix
- HTTP: Hypertext Transfer Protocol
- IO: Input/Output
- IR: Intermediate Representation
- JSON: JavaScript Object Notation
- MD: Markdown
- OPAM: OCaml Package Manager
- POSIX: Portable Operating System Interface
- PR: Pull Request
- RHEL: Red Hat Enterprise Linux
- STW: Stop The World
- UDP: User Datagram Protocol
- UI: User Interface
- URL: Uniform Resource Locator
- UUID: Universally Unique Identifier
- VM: Virtual Machine
- WSL: Windows Subsystem for Linux