Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrayops test crashes on windows #34

Closed
vtjnash opened this issue Oct 8, 2012 · 5 comments
Closed

arrayops test crashes on windows #34

vtjnash opened this issue Oct 8, 2012 · 5 comments
Labels

Comments

@vtjnash
Copy link
Collaborator

vtjnash commented Oct 8, 2012

On Windows, arrayops test fails:

(gdb) r runtests.jl arrayops
Starting program: c:\users\jameson\desktop\julia\usr\bin\julia-debug-basic.exe runtests.jl arrayops
[New Thread 18388.0x45fc]
[New Thread 18388.0x2d94]
     * arrayops

Program received signal SIGSEGV, Segmentation fault.
0x6847c986 in push_root (v=0xbaadf00d) at gc.c:438
438         if (gc_marked(v)) return;
(gdb) bt
#0  0x6847c986 in push_root (v=0xbaadf00d) at gc.c:438
#1  0x6847ceeb in gc_mark_all () at gc.c:598
#2  0x6847d084 in gc_mark () at gc.c:669
#3  0x6847d180 in jl_gc_collect () at gc.c:723
#4  0x6847c767 in pool_alloc (p=0x68d8b098) at gc.c:342
#5  0x6847d2a3 in allocobj (sz=16) at gc.c:785
#6  0x6846f6e5 in newobj (type=0x2590928, nfields=3) at newobj_internal.h:6
#7  0x6846fcf5 in jl_alloc_tuple_uninit (n=2) at alloc.c:239
#8  0x6846fd24 in jl_alloc_tuple (n=2) at alloc.c:247
#9  0x68441fdd in intersect_tuple (a=0x582d148, b=0x32f5968, penv=0x28d9e4, eqc=0x28dbe8, var=covariant) at jltypes.c:359
#10 0x68442e38 in jl_type_intersect (a=0x582d148, b=0x32f5968, penv=0x28d9e4, eqc=0x28dbe8, var=covariant) at jltypes.c:714
#11 0x68443e2e in jl_type_intersection_matching (a=0x582d148, b=0x32f5968, penv=0x28dee4, tvars=0x2592148) at jltypes.c:1135
#12 0x6844a896 in lookup_match (a=0x582d148, b=0x32f5968, penv=0x28dee4, tvars=0x2592148) at gf.c:850
#13 0x6844c2bb in match_method (type=0x582d148, func=0x32f5978, sig=0x32f5968, tvars=0x2592148) at gf.c:1525
#14 0x6844c3d2 in ml_matches (ml=0x32f2b40, type=0x582d148, name=0x25ebe58, lim=4) at gf.c:1557
#15 0x6844c563 in jl_matching_methods (gf=0x32f5938, type=0x582d148, lim=4) at gf.c:1606
#16 0x01f112bd in ?? ()
#17 0x68448eb7 in jl_apply (f=0x34b7ce8, args=0x28e0c4, nargs=4) at julia.h:962
#18 0x6844baea in jl_apply_generic (F=0x34b7c78, args=0x28e0c4, nargs=4) at gf.c:1339
#19 0x01f0f973 in ?? ()
#20 0x68448eb7 in jl_apply (f=0x30615d0, args=0x28e1b4, nargs=6) at julia.h:962
#21 0x6844baea in jl_apply_generic (F=0x3060ad0, args=0x28e1b4, nargs=6) at gf.c:1339
#22 0x01f06f80 in ?? ()
#23 0x01f06645 in ?? ()
#24 0x68448eb7 in jl_apply (f=0x31a3b60, args=0x28e2c4, nargs=3) at julia.h:962
#25 0x6844baea in jl_apply_generic (F=0x31a39b0, args=0x28e2c4, nargs=3) at gf.c:1339
#26 0x01f0ecab in ?? ()
#27 0x01f07447 in ?? ()
#28 0x01f06d33 in ?? ()
#29 0x01f06645 in ?? ()
#30 0x68448eb7 in jl_apply (f=0x31a3b60, args=0x28e4a4, nargs=3) at julia.h:962
#31 0x6844baea in jl_apply_generic (F=0x31a39b0, args=0x28e4a4, nargs=3) at gf.c:1339
#32 0x01f06382 in ?? ()
#33 0x68448eb7 in jl_apply (f=0x32426f8, args=0x28e698, nargs=3) at julia.h:962
#34 0x6844baea in jl_apply_generic (F=0x3242678, args=0x28e698, nargs=3) at gf.c:1339
#35 0x01f0220b in ?? ()
#36 0x68448eb7 in jl_apply (f=0x315d988, args=0x28e75c, nargs=5) at julia.h:962
#37 0x6844baea in jl_apply_generic (F=0x315d8a8, args=0x28e75c, nargs=5) at gf.c:1339
#38 0x01f00150 in ?? ()
#39 0x68448eb7 in jl_apply (f=0x347e6b8, args=0x28e828, nargs=4) at julia.h:962
#40 0x6844baea in jl_apply_generic (F=0x347e688, args=0x28e828, nargs=4) at gf.c:1339
#41 0x68448eb7 in jl_apply (f=0x347e688, args=0x28e828, nargs=4) at julia.h:962
#42 0x68449b2e in jl_type_infer (li=0x57df5c0, argtypes=0x5822060, def=0x3495da0) at gf.c:441
#43 0x6844a851 in cache_method (mt=0x349712c, type=0x5822060, method=0x347e5d8, decl=0x347e5c8, sparams=0x2592148) at gf.c:841
#44 0x6844abba in jl_mt_assoc_by_type (mt=0x349712c, tt=0x5822060, cache=1) at gf.c:922
#45 0x6844ba66 in jl_apply_generic (F=0x347e388, args=0x28ea0c, nargs=2) at gf.c:1325
#46 0x01f45e89 in ?? ()
#47 0x68448eb7 in jl_apply (f=0x4aa8f10, args=0x28eac4, nargs=3) at julia.h:962
#48 0x6844baea in jl_apply_generic (F=0x347e388, args=0x28eac4, nargs=3) at gf.c:1339
#49 0x6846e012 in jl_apply (f=0x347e388, args=0x28eac4, nargs=3) at julia.h:962
#50 0x6846e2db in do_call (f=0x347e388, args=0x5821164, nargs=3, locals=0x0, nl=0) at interpreter.c:56
#51 0x6846e63a in eval (e=0x5821fe0, locals=0x0, nl=0) at interpreter.c:125
#52 0x6846e2b2 in do_call (f=0x35426d8, args=0x5821134, nargs=2, locals=0x0, nl=0) at interpreter.c:55
#53 0x6846e63a in eval (e=0x5821fd0, locals=0x0, nl=0) at interpreter.c:125
#54 0x6846f392 in eval_body (stmts=0x58210b0, locals=0x0, nl=0, start=0) at interpreter.c:322
#55 0x6846e81a in eval (e=0x5821fb0, locals=0x0, nl=0) at interpreter.c:152
#56 0x6846e0d7 in jl_interpret_toplevel_expr (e=0x5821fb0) at interpreter.c:19
#57 0x6847a5f4 in jl_toplevel_eval_flex (e=0x5821fb0, fast=1) at toplevel.c:286
#58 0x6847a7d1 in jl_parse_eval_all (fname=0x46d5f80 "c:\\Users\\jameson\\Desktop\\julia\\test\\arrayops.jl") at toplevel.c:334
#59 0x6847a98a in jl_load (fname=0x46d5f80 "c:\\Users\\jameson\\Desktop\\julia\\test\\arrayops.jl") at toplevel.c:368
#60 0x6847a9b8 in jl_load_ (str=0x46d2420) at toplevel.c:375
#61 0x01f398a3 in ?? ()
#62 0x01f395ee in ?? ()
#63 0x68448eb7 in jl_apply (f=0x433feb0, args=0x28f454, nargs=1) at julia.h:962
#64 0x6844baea in jl_apply_generic (F=0x31a40e0, args=0x28f454, nargs=1) at gf.c:1339
#65 0x01f3dce3 in ?? ()
#66 0x6844e6fb in jl_apply (f=0x4661458, args=0x28f57c, nargs=1) at julia.h:962
#67 0x6845081b in jl_trampoline (F=0x4661458, args=0x28f57c, nargs=1) at builtins.c:676
#68 0x68448eb7 in jl_apply (f=0x4661458, args=0x28f57c, nargs=1) at julia.h:962
#69 0x6844baea in jl_apply_generic (F=0x459e178, args=0x28f57c, nargs=1) at gf.c:1339
#70 0x01f3daa8 in ?? ()
#71 0x6844e6fb in jl_apply (f=0x459e848, args=0x0, nargs=0) at julia.h:962
#72 0x6845081b in jl_trampoline (F=0x459e848, args=0x0, nargs=0) at builtins.c:676
#73 0x684799c0 in jl_apply (f=0x459e848, args=0x0, nargs=0) at julia.h:962
#74 0x6847a671 in jl_toplevel_eval_flex (e=0x459e718, fast=1) at toplevel.c:297
#75 0x6847a7d1 in jl_parse_eval_all (fname=0x45abd30 "c:\\Users\\jameson\\Desktop\\julia\\test\\runtests.jl") at toplevel.c:334
#76 0x6847a98a in jl_load (fname=0x45abd30 "c:\\Users\\jameson\\Desktop\\julia\\test\\runtests.jl") at toplevel.c:368
#77 0x6847a9b8 in jl_load_ (str=0x454de58) at toplevel.c:375
#78 0x01f398a3 in ?? ()
#79 0x01f39a86 in ?? ()
#80 0x01f395ee in ?? ()
#81 0x6844e6fb in jl_apply (f=0x433feb0, args=0x28fb08, nargs=1) at julia.h:962
#82 0x6845081b in jl_trampoline (F=0x433feb0, args=0x28fb08, nargs=1) at builtins.c:676
#83 0x68448eb7 in jl_apply (f=0x433feb0, args=0x28fb08, nargs=1) at julia.h:962
#84 0x6844baea in jl_apply_generic (F=0x31a40e0, args=0x28fb08, nargs=1) at gf.c:1339
#85 0x01f37bdc in ?? ()
#86 0x6844e6fb in jl_apply (f=0x3447770, args=0x28fd48, nargs=1) at julia.h:962
#87 0x6845081b in jl_trampoline (F=0x3447770, args=0x28fd48, nargs=1) at builtins.c:676
#88 0x68448eb7 in jl_apply (f=0x3447770, args=0x28fd48, nargs=1) at julia.h:962
#89 0x6844baea in jl_apply_generic (F=0x3447730, args=0x28fd48, nargs=1) at gf.c:1339
#90 0x01f2c49f in ?? ()
#91 0x6844e6fb in jl_apply (f=0x3ad8200, args=0x0, nargs=0) at julia.h:962
#92 0x6845081b in jl_trampoline (F=0x3ad8200, args=0x0, nargs=0) at builtins.c:676
#93 0x68448eb7 in jl_apply (f=0x3ad8200, args=0x0, nargs=0) at julia.h:962
#94 0x6844baea in jl_apply_generic (F=0x3349e00, args=0x0, nargs=0) at gf.c:1339
#95 0x004013ae in jl_apply (f=0x3349e00, args=0x0, nargs=0) at c:/Users/jameson/Desktop/julia/src/julia.h:962
#96 0x00401c04 in _fu38__jl_base_module () at repl.c:263
#97 0x6847314f in julia_trampoline (argc=2, argv=0x3a40b4, pmain=0x401ac0 <true_main>) at init.c:509
#98 0x00401d8d in main (argc=2, argv=0x3a40b4) at repl.c:304
(gdb)
@vtjnash
Copy link
Collaborator Author

vtjnash commented Oct 8, 2012

Note that the error is 0xbaadf00d, indicating uninitialized heap access

@JeffBezanson my guess is that it is caused by this line --> jl_struct_kind->type = (jl_type_t*)jl_struct_kind; jltypes.c:2244, because jl_struct_kind is not a valid jl_struct_type_t (it doesn't initialize fields or the space after it)

@vtjnash
Copy link
Collaborator Author

vtjnash commented Oct 8, 2012

Oops, I didn't see jl_compute_struct_offsets, I guess it is a valid type. However, now I'm extra confused as to why for jl_struct_kind I find that fields[0].isptr == 0 but types[0] is declared to be jl_any_type

@vtjnash
Copy link
Collaborator Author

vtjnash commented Oct 8, 2012

Rather I was talking about the wrong type: this is segfaulting while trying to GC jl_tag_kind (as a jl_struct_kind)

On windows & unix we can observe the following in libuv branch:

julia> AbstractKind.env
access to undefined reference

vs expected:

julia> AbstractKind.env
()

most of the other fields seem OK, but I can't find where they got assigned

@JeffBezanson please ping me on IRC when you get a chance

@vtjnash
Copy link
Collaborator Author

vtjnash commented Oct 8, 2012

Found it: repeat of JuliaLang#1314

@WestleyArgentum
Copy link

Nicely done! Does anyone with permissions on the repo have time to pull in the fix and make some binaries for testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants