Bug 844746

Summary: ocaml-ocamlnet-3.5.1-1.fc18 fails to build on ppc64
Product: [Fedora] Fedora Reporter: David Aquilina <dwa>
Component: ocaml-ocamlnetAssignee: Richard W.M. Jones <rjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: fedora-ocaml-list, flanagan, hannsj_uhl, menantea, rjones
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: ocaml-ocamlnet-4.1.2-1.fc26 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-20 15:10:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1051573    
Attachments:
Description Flags
build.log none

Description David Aquilina 2012-07-31 15:42:32 UTC
Description of problem:

ocaml-ocamlnet-3.5.1-1.fc18 fails to build on power: 

https://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=638076

I believe this is the relevant section of the build log (full log will be attached): 

ocamlfind ocamlc -g  -I ../../src/netsys -I +compiler-libs -package "pcre bigarray unix"  -c  netmappings_other.ml
test ! -d mappings || tools/unimap_to_ocaml/unimap_to_ocaml \
	-o netmappings_jp.pmap -pmap mappings/jis*.*map
tools/unimap_to_ocaml/unimap_to_ocaml \
	-o netmappings_jp.ml netmappings_jp.pmap
Reading netmappings_jp.pmap
Processing jis0212
   (Heavy conflicts: 132 of 8192)
Processing jis0208
   (Heavy conflicts: 182 of 8192)
Processing jis0201
   (Heavy conflicts: 0 of 256)
ocamlfind ocamlc -g  -I ../../src/netsys -I +compiler-libs -package "pcre bigarray unix"  -c  netmappings_jp.ml
ocamlc.opt got signal and exited
rm nethtml_scanner.ml
make[1]: *** [netmappings_jp.cmo] Error 2
make[1]: Leaving directory `/builddir/build/BUILD/ocamlnet-3.5.1/src/netstring'
make: *** [all] Error 2

Comment 1 David Aquilina 2012-07-31 15:43:18 UTC
Created attachment 601543 [details]
build.log

Comment 2 Richard W.M. Jones 2012-07-31 15:54:49 UTC
Be interesting to see what "signal" it got.  If it segfaulted,
what's the stack trace?

Comment 3 Fedora End Of Life 2013-04-03 17:23:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 5 Fedora End Of Life 2015-01-09 17:17:25 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-02-17 14:22:46 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Menanteau Guy 2016-04-13 09:53:10 UTC
I reopen this problem as ocaml-ocamlnet never built on ppc64/ppc64le.

I tested ocaml-ocamlnet-4.0.4-4.fc24 on ppc64le and got following errors:
make[1]: Entering directory '/builddir/build/BUILD/ocamlnet-4.0.4/src/netunidata'
ocamlfind ocamldep   *.ml *.mli >depend || { rm -f depend; exit 1; }
../../Makefile.rules:191: recipe for target 'depend' failed
make[1]: Leaving directory '/builddir/build/BUILD/ocamlnet-4.0.4/src/netunidata'

These two commands trigger a problem:
ocamlfind ocamldep netmappings_jp.ml
ocamlfind ocamldep netmappings_kr.ml

The end of strace ocamlfind ocamldep netmappings_jp.ml gives:
rt_sigaction(SIGINT, {SIG_IGN, [], 0}, {0x10077c10, [], 0}, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x3fff9e873e00) = 11981
waitpid(11981, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], 0) = 11981
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=11981, si_uid=0, si_status=SIGSEGV, si_utime=1, si_stime=0} ---
rt_sigaction(SIGINT, {0x10077c10, [], 0}, {SIG_IGN, [], 0}, 8) = 0
write(1, "ocamldep.opt got signal and exit"..., 35ocamldep.opt got signal and exited
) = 35
exit_group(2)                           = ?
+++ exited with 2 +++

and we have also a SEGFAULT signaled
[150440.087157] ocamldep.opt[11981]: unhandled signal 11 at 00003fffeb9effe0 nip 00000000100a6cd0 lr 00000000100acdbc code 30002

In the core I can see:
Core was generated by `ocamldep.opt netmappings_jp.ml '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000010069624 in camlHashtbl__replace_1118 ()



Using gdb with ocamldep.opt netmappings_jp.ml gives:
Program received signal SIGSEGV, Segmentation fault.
0x0000000010069624 in camlChar__chr_1010 ()

(gdb) backtrace
#0  0x0000000010069624 in camlChar__chr_1010 ()
#1  0x000000001001fb88 in camlLexer__char_for_decimal_code_1094 ()
#2  0x0000000010020da8 in camlLexer____ocaml_lex_string_rec_1160 ()
#3  0x00000000100211e4 in camlLexer__string_1159 ()
#4  0x0000000010020ddc in camlLexer____ocaml_lex_string_rec_1160 ()
#5  0x00000000100211e4 in camlLexer__string_1159 ()
#6  0x0000000010020ddc in camlLexer____ocaml_lex_string_rec_1160 ()
...

#52372 0x0000000010020ddd in camlLexer____ocaml_lex_string_rec_1160 ()
#52373 0x00000000100211e5 in camlLexer__string_1159 ()
#52374 0x0000000010020ddd in camlLexer____ocaml_lex_string_rec_1160 ()
#52375 0x00000000100211e5 in camlLexer__string_1159 ()
#52376 0x00000000100227bd in camlLexer____ocaml_lex_token_rec_1156 ()
#52377 0x0000000010023939 in camlLexer__token_1155 ()
#52378 0x0000000010021e45 in camlLexer____ocaml_lex_token_rec_1156 ()
#52379 0x0000000010023939 in camlLexer__token_1155 ()
#52380 0x00000000100239cd in camlLexer__token_with_comments_1224 ()
#52381 0x000000001001f211 in camlLexer__loop_1252 ()
#52382 0x0000000010023a6d in camlLexer__token_1237 ()
#52383 0x000000001006e6b1 in camlParsing__loop_1076 ()
#52384 0x000000001006ef8d in camlParsing__yyparse_1071 ()
#52385 0x000000001004432d in camlParser__use_file_3544 ()
#52386 0x000000001000610d in caml_apply2 ()
#52387 0x000000001001e6f5 in camlParse__wrap_1012 ()
#52388 0x0000000010006d09 in camlOcamldep__parse_use_file_as_impl_1252 ()
#52389 0x0000000010011f35 in camlPparse__file_1077 ()
#52390 0x000000001000868d in camlOcamldep__read_parse_and_extract_1239 ()
#52391 0x0000000010008765 in camlOcamldep__ml_file_dependencies_1250 ()
#52392 0x0000000010008fb1 in camlOcamldep__file_dependencies_as_1274 ()
#52393 0x0000000010009045 in camlOcamldep__file_dependencies_1278 ()
#52394 0x0000000010090ba1 in camlArg__parse_argv_dynamic_1078 ()
#52395 0x0000000010090e05 in camlArg__parse_1140 ()
#52396 0x000000001000a021 in camlOcamldep__entry ()
#52397 0x0000000010002a65 in caml_program ()
#52398 0x00000000100bdb51 in caml_start_program ()
#52399 0x00000000100be2c4 in caml_main (argv=0x3fffb7a31000) at startup.c:191
#52400 0x00000000100020fc in main (argc=<optimized out>, argv=<optimized out>)
    at main.c:54

Comment 8 Richard W.M. Jones 2016-04-13 11:57:19 UTC
Can you try raising the stack limit.  The default on ppc64 is
far too low to run OCaml programs.  Example:

http://pkgs.fedoraproject.org/cgit/rpms/ocaml.git/tree/ocaml.spec#n217

Comment 9 Menanteau Guy 2016-04-13 12:57:26 UTC
You got it.
I added changes in ocaml-ocamlnet.spec to raise stack limit in the same way it is done in ocaml.spec and ppc64/ppc64le builds are successful now.

http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3298369

Comment 10 Richard W.M. Jones 2016-11-20 15:10:33 UTC
This is fixed in Rawhide / OCaml 4.04.  Also the raised
stack limits no longer seem to be necessary.