This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 821153 - ocaml on armv7hl: some native binaries segfault with the new arm compiler backend
ocaml on armv7hl: some native binaries segfault with the new arm compiler bac...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ocaml (Show other bugs)
17
arm Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ARMTracker
  Show dependency treegraph
 
Reported: 2012-05-12 10:21 EDT by Richard W.M. Jones
Modified: 2012-06-06 09:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-03 18:08:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-05-12 10:21:21 EDT
Description of problem:

Recently we updated the code generated for the OCaml compiler
on arm in Fedora 17:

  * Sat Apr 28 2012 Richard W.M. Jones <rjones@redhat.com> 3.12.1-3
  - New ARM backend by Benedikt Meurer, backported to OCaml 3.12.1.
    This has several advantages, including enabling natdynlink on ARM.
  - Provide updated config.guess and config.sub (from OCaml upstream tree).

Mostly this appeared to work, but virt-sysprep segfaults
(although it used to work, so I don't quite know what changed).

$ ./run gdb --args ./sysprep/virt-sysprep --help
(gdb) run
Starting program: /home/rjones/d/libguestfs/sysprep/virt-sysprep --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x402f3b70 in ?? ()
(gdb) bt
#0  0x402f3b70 in ?? ()
#1  0x0007ca44 in caml_c_call ()
#2  0x0007ca44 in caml_c_call ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Version-Release number of selected component (if applicable):

ocaml-3.12.1-3.fc17.armv7hl
libguestfs 1.17.41

How reproducible:

? 100% right now, 0% earlier.

Steps to Reproduce:
1. Compile libguestfs from git.
2. Segfaults when it runs virt-sysprep during the build.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Richard W.M. Jones 2012-05-12 10:23:05 EDT
Possibly the working version was 1.17.36.
Comment 2 Richard W.M. Jones 2012-05-12 11:51:32 EDT
(In reply to comment #1)
> Possibly the working version was 1.17.36.

Confirmed, it works with virt-sysprep 1.17.36.

There's very little difference between the two versions, but at
least I have something to work with now.
Comment 3 Richard W.M. Jones 2012-05-14 15:43:09 EDT
Here is another program that segfaults:

ocamlopt.opt -noassert -I internal -I public -I toolslib -I . -o mappings/gen_mappings.opt bigarray.cmxa str.cmxa toolslib.cmxa mappings/gen_mappings.cmx
cd mappings && ./gen_mappings.opt
/bin/sh: line 1: 17865 Segmentation fault      ./gen_mappings.opt

This is from the ocaml-camomile package, although it's
worth noting that many other programs from the same
package do work fine.
Comment 4 Richard W.M. Jones 2012-05-16 13:12:21 EDT
(In reply to comment #3)
> Here is another program that segfaults:
> 
> ocamlopt.opt -noassert -I internal -I public -I toolslib -I . -o
> mappings/gen_mappings.opt bigarray.cmxa str.cmxa toolslib.cmxa
> mappings/gen_mappings.cmx
> cd mappings && ./gen_mappings.opt
> /bin/sh: line 1: 17865 Segmentation fault      ./gen_mappings.opt
> 
> This is from the ocaml-camomile package, although it's
> worth noting that many other programs from the same
> package do work fine.

I contacted Benedikt Meurer (author of the new ARM backend)
and he was able to reproduce this problem and says he will
look into it.
Comment 5 Richard W.M. Jones 2012-05-30 13:03:37 EDT
Upstream bug:
http://caml.inria.fr/mantis/view.php?id=5623
Comment 6 Richard W.M. Jones 2012-06-03 14:45:54 EDT
Fixed upstream in revision 12548.

http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/trunk/asmcomp/arm/emit.mlp?r1=12466&r2=12548&pathrev=12548
Comment 7 Richard W.M. Jones 2012-06-03 18:08:50 EDT
Fixed in ocaml-3.12.1-9.
Comment 8 Fedora Update System 2012-06-04 04:55:53 EDT
ocaml-3.12.1-9.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ocaml-3.12.1-9.fc17
Comment 9 Fedora Update System 2012-06-06 09:14:51 EDT
ocaml-3.12.1-11.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ocaml-3.12.1-11.fc17

Note You need to log in before you can comment on or make changes to this bug.