Bug 1209830

Summary: [abrt] ocaml-runtime: sweep_slice(): ocamlrun killed by SIGSEGV
Product: [Fedora] Fedora Reporter: lambda.xy.x
Component: ocamlAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: c.david86, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/d4646afd20f7e315cadb0e19bc13d9e5b8fd579d
Whiteboard: abrt_hash:0d5cb82853308ad04f40e764caf6a92fff85c4cb
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-08 14:09:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status none

Description lambda.xy.x 2015-04-08 09:52:27 UTC
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

Comment 1 lambda.xy.x 2015-04-08 09:52:30 UTC
Created attachment 1012150 [details]
File: backtrace

Comment 2 lambda.xy.x 2015-04-08 09:52:31 UTC
Created attachment 1012151 [details]
File: cgroup

Comment 3 lambda.xy.x 2015-04-08 09:52:32 UTC
Created attachment 1012152 [details]
File: core_backtrace

Comment 4 lambda.xy.x 2015-04-08 09:52:33 UTC
Created attachment 1012153 [details]
File: dso_list

Comment 5 lambda.xy.x 2015-04-08 09:52:34 UTC
Created attachment 1012154 [details]
File: environ

Comment 6 lambda.xy.x 2015-04-08 09:52:35 UTC
Created attachment 1012155 [details]
File: exploitable

Comment 7 lambda.xy.x 2015-04-08 09:52:36 UTC
Created attachment 1012156 [details]
File: limits

Comment 8 lambda.xy.x 2015-04-08 09:52:37 UTC
Created attachment 1012157 [details]
File: maps

Comment 9 lambda.xy.x 2015-04-08 09:52:38 UTC
Created attachment 1012158 [details]
File: open_fds

Comment 10 lambda.xy.x 2015-04-08 09:52:39 UTC
Created attachment 1012159 [details]
File: proc_pid_status

Comment 11 Richard W.M. Jones 2015-04-08 11:14:52 UTC
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.

Comment 12 lambda.xy.x 2015-04-08 12:37:11 UTC
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.

Comment 13 Richard W.M. Jones 2015-04-08 13:40:56 UTC
If you find bugs in the opam-installed OCaml packages, then this is *not*
the place to report them.

Comment 14 lambda.xy.x 2015-04-08 14:09:10 UTC
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!