Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004832OCamlOCaml otherlibspublic2009-07-03 19:232014-09-26 17:42
Assigned To 
PlatformOSOS Version
Product Version3.11.0 
Target Version4.02.2+devFixed in Version 
Summary0004832: Filling bigarrays may block out runtime
DescriptionThough bigarray data lives on the C-heap, the bigarray fill function does not release the OCaml-lock when overwriting it. This may block out the runtime from handling signals or executing other threads. If a large bigarray is memory-mapped, this can lead to many seconds of unresponsiveness.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
doligez (administrator)
2011-05-31 16:05

There is a trade-off between the cost of releasing the lock (which can be too high for small bigarrays) and the latency when not releasing it (which can be too high for large bigarrays).
We should probably release the lock only when the bigarray is bigger than some threshold.
mottl (reporter)
2011-05-31 18:49

Besides taking the size into account for determining when to release the lock, we should also check whether the bigarray was memory-mapped, in which case the lock should also be released, I think.
mottl (reporter)
2013-06-11 18:20

Btw., this issue also affects the "blit" bigarray function, but apparently no others besides "fill".
mottl (reporter)
2014-01-30 19:29

I have just submitted a pull request for a patch solving this issue to the "official" Github repository here: [^]

- Issue History
Date Modified Username Field Change
2009-07-03 19:23 mottl New Issue
2011-05-31 16:05 doligez Note Added: 0005941
2011-05-31 16:05 doligez Status new => acknowledged
2011-05-31 18:49 mottl Note Added: 0005947
2012-06-21 20:16 frisch Category OCaml general => OCaml otherlibs
2012-07-11 14:24 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-17 14:33 doligez Target Version 4.00.1+dev => 4.00.2+dev
2013-06-11 18:20 mottl Note Added: 0009457
2013-07-09 17:29 doligez Target Version 4.00.2+dev => 4.01.0+dev
2013-07-22 13:01 frisch Target Version 4.01.0+dev => 4.02.0+dev
2014-01-30 19:29 mottl Note Added: 0010868
2014-08-18 20:12 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-26 17:42 doligez Target Version undecided => 4.02.2+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker