Description of problem: I started to encounter "out of memory" errors in my test suite. Every small test case completed, but all of them together failed. As a test I tested only the biggest example from my test suite, when the segfault occurred. The project itself is a small codebase using xmlm and kaputt, with the largest input file size of 24mb. Unfortunately, the project is not yet publicly available, so i fear reprodiction will be hairy. Version-Release number of selected component: ocaml-runtime-4.01.0-24.fc21 Additional info: reporter: libreport-2.3.0 backtrace_rating: 4 cmdline: /usr/bin/ocamlrun /home/marty/work/tla/trunk/v2-tlapm/_build/src/tests.byte crash_function: sweep_slice executable: /usr/bin/ocamlrun kernel: 3.19.2-201.fc21.x86_64 runlevel: N 5 type: CCpp uid: 1000 var_log_messages: [System Logs]:\n-- Logs begin at Sat 2014-12-20 09:15:47 CET, end at Wed 2015-04-08 11:39:54 CEST. -- Truncated backtrace: Thread no. 1 (5 frames) #0 sweep_slice at major_gc.c:323 #1 caml_major_collection_slice at major_gc.c:418 #2 caml_minor_collection at minor_gc.c:280 #3 caml_interprete at interp.c:657 #4 caml_main at startup.c:437
Created attachment 1012150 [details] File: backtrace
Created attachment 1012151 [details] File: cgroup
Created attachment 1012152 [details] File: core_backtrace
Created attachment 1012153 [details] File: dso_list
Created attachment 1012154 [details] File: environ
Created attachment 1012155 [details] File: exploitable
Created attachment 1012156 [details] File: limits
Created attachment 1012157 [details] File: maps
Created attachment 1012158 [details] File: open_fds
Created attachment 1012159 [details] File: proc_pid_status
It really could be almost anything. Maybe it's really running out of memory, or perhaps there is a bug in one of the C bindings you are using. Some suggestions: (1) Sprinkle calls to `Gc.compact ()' liberally throughout the code. That should cause it to crash closer to the place where memory corruption is happening. (2) Upgrade to the OCaml packages from Rawhide [you can do this on top of existing F21 - it's what I do] and see if the bug can be reproduced. (3) Run the test programs under valgrind. We do this for libguestfs OCaml test programs, and it often uncovers real bugs in both the OCaml and C code and bindings.
Hi Richard, thanks for the input! In the meantime i've upgraded to opam's version 4.0.2 and removed the fedora packages from the system to prevent a version mixup. The big example only crashes if i also add the smaller examples - interestingly, there is no "out of memory" error message anymore. I'll see to go for options 1) and 3), and report back.
If you find bugs in the opam-installed OCaml packages, then this is *not* the place to report them.
Yes, since the problem persists in the opam version, it is not related to the fedora build. I'll mark the issue as deferred and report my findings to the ocaml development team. Thanks again for your help!