ocaml-opam / opam-publish

A tool to ease contributions to opam repositories
https://opam.ocaml.org
Other
40 stars 21 forks source link

Segmentation fault #40

Closed rleonid closed 8 years ago

rleonid commented 8 years ago

In running opam publish submit ./ocephes.0.8.1/ I've run into a segfault. Running the opam-publish command directly in lldb (I've only tested on osx) I get the following stack trace:

* thread #1: tid = 0x818e5b, 0x000000010017c77c opam-publish`camlGithub_j__read_pull_85589 + 2684, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x31fd)
  * frame #0: 0x000000010017c77c opam-publish`camlGithub_j__read_pull_85589 + 2684
    frame #1: 0x00000001001d072d opam-publish`camlYojson____ocaml_lex_read_list_rev_rec_6511 + 221
    frame #2: 0x00000001001b7eae opam-publish`camlAg_oj_run__read_list_1792 + 62
    frame #3: 0x00000001001ab4a9 opam-publish`camlGithub_core__fun_17973 + 9
    frame #4: 0x00000001001aa604 opam-publish`camlGithub_core__fun_16517 + 212
    frame #5: 0x0000000100295b26 opam-publish`camlLwt__fun_32562 + 86
    frame #6: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #7: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #8: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #9: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #10: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #11: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #12: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #13: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #14: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #15: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #16: 0x00000001002975f7 opam-publish`camlLwt__run_waiters_rec_1372 + 119
    frame #17: 0x00000001002975c9 opam-publish`camlLwt__run_waiters_rec_1372 + 73
    frame #18: 0x00000001002978dc opam-publish`camlLwt__safe_run_waiters_1432 + 44
    frame #19: 0x0000000100294cad opam-publish`camlLwt_sequence__loop_1257 + 45
    frame #20: 0x0000000100294cad opam-publish`camlLwt_sequence__loop_1257 + 45
    frame #21: 0x00000001002a91d1 opam-publish`camlList__iter_1258 + 33
    frame #22: 0x0000000100274f88 opam-publish`camlLwt_engine__fun_2643 + 632
    frame #23: 0x0000000100276998 opam-publish`camlLwt_main__run_1324 + 136
    frame #24: 0x0000000100009dbf opam-publish`camlOpam_publish__pull_request_5565 + 399
    frame #25: 0x000000010000a22b opam-publish`camlOpam_publish__add_metadata_5674 + 555
    frame #26: 0x000000010000b2df opam-publish`camlOpam_publish__submit_8500 + 111
    frame #27: 0x00000001000fbb5d opam-publish`camlCmdliner__fun_36746 + 13
    frame #28: 0x0000000100101d5c opam-publish`camlCmdliner__eval_term_33714 + 780
    frame #29: 0x00000001001022a7 opam-publish`camlCmdliner__eval_choice_34756 + 727
    frame #30: 0x000000010000c569 opam-publish`camlOpam_publish__entry + 4569
    frame #31: 0x0000000100001e29 opam-publish`caml_program + 4057
    frame #32: 0x0000000100322448 opam-publish`caml_start_program + 92
    frame #33: 0x00000001003058e8 opam-publish`caml_main + 488
    frame #34: 0x000000010030593c opam-publish`main + 12

opam switch is 4.03.0. opam publish version is 0.3.1. Let me know if there's any other information I can provide.

rleonid commented 8 years ago

Unable to replicated with 4.02.3.

dsheets commented 8 years ago

Is this 4.03.0 vanilla or 4.03.0+flambda? mjambon/atdgen#45 may be relevant.

rleonid commented 8 years ago

Vanilla 4.03.0

rleonid commented 8 years ago

Still experiencing this problem with latest attempt to publish the same library.

whitequark commented 8 years ago

I have the same issue here, with slightly different backtrace:

#0  0x000000000057f158 in camlGithub_j__read_pull_85589 () at lib/github_j.ml:17706
#1  0x00000000005d23fd in camlYojson____ocaml_lex_read_list_rev_rec_6511 () at read.mll:587
#2  0x00000000005ba28e in camlAg_oj_run__read_list_1792 () at read.mll:1069
#3  0x00000000005ad899 in camlGithub_core__fun_17973 () at lib/github_core.ml:1149
#4  0x00000000005ac9f4 in camlGithub_core__fun_16517 () at lib/github_core.ml:721
#5  0x0000000000695186 in camlLwt__fun_32562 () at src/core/lwt.ml:653
#6  0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#7  0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#8  0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#9  0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#10 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#11 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#12 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#13 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#14 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#15 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#16 0x0000000000696c57 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:201
#17 0x0000000000696c29 in camlLwt__run_waiters_rec_1372 () at src/core/lwt.ml:206
#18 0x0000000000696f3c in camlLwt__safe_run_waiters_1432 () at src/core/lwt.ml:299
#19 0x000000000069431d in camlLwt_sequence__loop_1257 () at src/core/lwt_sequence.ml:149
#20 0x000000000069431d in camlLwt_sequence__loop_1257 () at src/core/lwt_sequence.ml:149
#21 0x00000000006a85c1 in camlList__iter_1258 () at list.ml:77
#22 0x0000000000674af8 in camlLwt_engine__fun_2643 () at src/unix/lwt_engine.ml:325
#23 0x00000000006764f8 in camlLwt_main__run_1324 () at src/unix/lwt_main.ml:41
#24 0x000000000040f38f in camlOpam_publish__pull_request_5565 ()
#25 0x000000000040f7fb in camlOpam_publish__add_metadata_5674 ()
#26 0x00000000004108af in camlOpam_publish__submit_8500 ()
#27 0x000000000050012d in camlCmdliner__fun_36746 ()
#28 0x000000000050632c in camlCmdliner__eval_term_33714 ()
#29 0x0000000000506877 in camlCmdliner__eval_choice_34756 ()
#30 0x0000000000411b39 in camlOpam_publish__entry ()
#31 0x0000000000407419 in caml_program ()
#32 0x0000000000716afe in caml_start_program ()
#33 0x0000000000716e6d in caml_main ()
#34 0x000000000040632c in main ()

This is Debian 64-bit, with the following packages installed:

# Installed packages for 4.03.0:
atd                           1.1.2  Parser for the ATD data format description 
atdgen                        1.9.0  Generates efficient JSON serializers, deser
base-bigarray                  base  Bigarray library distributed with the OCaml
base-bytes                     base  Bytes library distributed with the OCaml co
base-threads                   base  Threads library distributed with the OCaml 
base-unix                      base  Unix library distributed with the OCaml com
base64                        2.0.0  Base64 encoding and decoding library
biniou                        1.0.9  Binary data format designed for speed, safe
camlp4                       4.03+1  Camlp4 is a system for writing extensible p
camomile                      0.8.5  A comprehensive Unicode library
cmdliner                      0.9.8  Declarative definition of command line inte
cohttp                       0.20.2  HTTP(S) library for Lwt, Async and Mirage
conduit                      0.12.0  Network connection library for TCP and SSL
conf-m4                           1  Virtual package relying on m4
conf-ncurses                      1  Virtual package relying on ncurses
conf-openssl                      1  Virtual package relying on an OpenSSL syste
conf-perl                         1  Virtual package relying on perl
conf-pkg-config                 1.0  Virtual package relying on pkg-config insta
conf-which                        1  Virtual package relying on which
cppo                          1.3.2  Equivalent of the C preprocessor for OCaml 
cstruct                       2.0.0  access C structures via a camlp4 extension
cudf                            0.7  CUDF library (part of the Mancoosi tools)
dbm                             1.0  Binding to the NDBM/GDBM Unix "databases"
depext                        0.9.1  Query and install external dependencies of 
dose                     3.2.2+opam  Dose library (part of Mancoosi tools)
easy-format                   1.2.0  High-level and functional interface to the 
extlib                        1.7.0  A complete yet small extension for OCaml st
fieldslib                 113.24.00  Syntax extension to define first class valu
fileutils                     0.4.4  Library to provide pure OCaml functions to 
github                        1.0.0  GitHub APIv3 client bindings
ipaddr                        2.7.0  IP (and MAC) address representation library
jsonm                         0.9.1  Non-blocking streaming JSON codec for OCaml
lambda-term                    1.10  Terminal manipulation library for OCaml
lwt                           2.5.2  A cooperative threads library for OCaml
magic-mime                    1.0.0  Convert file extensions to MIME types
menhir                     20160303  LR(1) parser generator
oasis                         0.4.6  Architecture for building OCaml libraries a
ocaml-data-notation          0.0.11  Store data using OCaml notation
ocamlbuild                    0.9.2  OCamlbuild is a build system with builtin r
ocamlfind                     1.6.2  A library manager for OCaml
ocamlgraph                    1.8.5  A generic graph library for OCaml
ocamlify                      0.0.1  Include files in OCaml code
ocamlmod                      0.0.8  Generate OCaml modules from source files
ocplib-endian                   0.8  Optimised functions to read and write int16
opam-lib                      1.2.2  The OPAM library
ounit                         2.0.0  Unit testing framework loosely based on HUn
ppx_core             113.33.01+4.03  Standard library for ppx rewriters
ppx_deriving                    3.3  Type-driven code generation for OCaml >=4.0
ppx_driver           113.33.01+4.03  Feature-full driver for OCaml AST transform
ppx_fields_conv      113.33.00+4.03  Generation of accessor and iteration functi
ppx_optcomp          113.33.00+4.03  Optional compilation for OCaml
ppx_sexp_conv        113.33.01+4.03  Generation of S-expression conversion funct
ppx_tools                    4.03.0  Tools for authors of ppx rewriters and othe
ppx_type_conv        113.33.01+4.03  Support Library for type-driven code genera
publish                       0.3.1  A tool to ease contributions to opam reposi
re                            1.5.0  RE is a regular expression library for OCam
react                         1.2.0  Declarative events and signals for OCaml
result                          1.2  Compatibility Result module
sexplib              113.33.00+4.03  Library for serializing OCaml values to and
ssl                           0.5.2  Bindings for OpenSSL
stringext                     1.4.2  Extra string functions for OCaml
type_conv                 113.00.02  Library for building type-driven syntax ext
uri                           1.9.2  RFC3986 URI/URL parsing library
utop                         1.19.2  Universal toplevel for OCaml
uutf                          0.9.4  Non-blocking streaming Unicode codec for OC
yojson                        1.3.2  Yojson is an optimized parsing and printing
zed                             1.4  Abstract engine for text edition in OCaml
whitequark commented 8 years ago

Fixed after updating atdgen so I think this can be closed.

AltGr commented 8 years ago

Ok, thanks!