Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 821153 - ocaml on armv7hl: some native binaries segfault with the new arm compiler backend
Summary: ocaml on armv7hl: some native binaries segfault with the new arm compiler bac...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ocaml
Version: 17
Hardware: arm
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2012-05-12 14:21 UTC by Richard W.M. Jones
Modified: 2012-06-06 13:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-03 22:08:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-05-12 14:21:21 UTC
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> 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 14:23:05 UTC
Possibly the working version was 1.17.36.

Comment 2 Richard W.M. Jones 2012-05-12 15:51:32 UTC
(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 19:43:09 UTC
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 17:12:21 UTC
(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 17:03:37 UTC
Upstream bug:
http://caml.inria.fr/mantis/view.php?id=5623

Comment 6 Richard W.M. Jones 2012-06-03 18:45:54 UTC
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 22:08:50 UTC
Fixed in ocaml-3.12.1-9.

Comment 8 Fedora Update System 2012-06-04 08:55:53 UTC
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 13:14:51 UTC
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.