There must be a bug in my program (filedescriptor leaking), however the error I obtained in this case seems quite uninformative. Perhaps the problem should be caught before, with a gentler error message.
((exn
("key's index out of range" (8192 8192 (Should_be_between_0_and 8191))
/home/oci/.opam/4.02.3/build/core_kernel.113.33.01/_build/src/bounded_int_table.ml:176:4))
(backtrace
("Raised at file \"src/error.ml\", line 7, characters 20-30"
"Called from file \"src/bounded_int_table.ml\", line 225, characters 8-23"
"Called from file \"src/fd_by_descr.ml\", line 34, characters 8-47"
"Called from file \"src/raw_scheduler.ml\", line 146, characters 2-38"
"Called from file \"src/deferred1.ml\", line 14, characters 63-68"
"Called from file \"src/job_queue.ml\", line 160, characters 6-47" ""))
There must be a bug in my program (filedescriptor leaking), however the error I obtained in this case seems quite uninformative. Perhaps the problem should be caught before, with a gentler error message.