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

IUP gc segfault #10570

Closed
vtjnash opened this issue Mar 19, 2015 · 7 comments
Closed

IUP gc segfault #10570

vtjnash opened this issue Mar 19, 2015 · 7 comments
Assignees
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version status:priority This should be addressed urgently

Comments

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 19, 2015

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0-dev+3828 (2015-03-15 07:08 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 6bf81b3* (3 days old master)
|__/                   |  x86_64-linux-gnu

julia> Pkg.clone("git@github.com:joa-quim/IUP.jl.git")
INFO: Cloning IUP from git@github.com:joa-quim/IUP.jl.git
INFO: Computing changes...

julia> push!(LOAD_PATH,"/home/jameson/.julia/IUP/src")
3-element Array{Union(UTF8String,ASCIIString),1}:
 "/home/jameson/julia/usr/local/share/julia/site/v0.4"
 "/home/jameson/julia/usr/share/julia/site/v0.4"      
 "/home/jameson/.julia/IUP/src"                       

julia> using IUP_CD

julia> gc()

signal (11): Segmentation fault
unknown function (ip: 1621591399)
unknown function (ip: 1621592616)
unknown function (ip: 1621590694)
unknown function (ip: 1621592616)
unknown function (ip: 1621590694)
unknown function (ip: 1621590694)
unknown function (ip: 1621592616)
unknown function (ip: 1621590694)
unknown function (ip: 1621590694)
unknown function (ip: 1621590694)
unknown function (ip: 1621597526)
unknown function (ip: 1621594102)
unknown function (ip: 1621590694)
unknown function (ip: 1621590694)
unknown function (ip: 1621592616)
unknown function (ip: 1621590694)
unknown function (ip: 1621601038)
jl_gc_collect at /home/jameson/julia/usr/bin/../lib/libjulia.so (unknown line)
gc at base.jl:159
jlcall_gc_42631 at  (unknown line)
jl_apply_generic at /home/jameson/julia/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: 1621491212)
unknown function (ip: 1621488418)
unknown function (ip: 1621563269)
jl_toplevel_eval_in at /home/jameson/julia/usr/bin/../lib/libjulia.so (unknown line)
eval_user_input at REPL.jl:54
jlcall_eval_user_input_42551 at  (unknown line)
jl_apply_generic at /home/jameson/julia/usr/bin/../lib/libjulia.so (unknown line)
anonymous at task.jl:83
unknown function (ip: 1621518049)
unknown function (ip: 0)
Segmentation fault (core dumped)

(no IUP binaries needed to reproduce, we're just testing the parsing stuff here)

@vtjnash vtjnash added kind:bug Indicates an unexpected problem or unintended behavior status:priority This should be addressed urgently kind:regression Regression in behavior compared to a previous version labels Mar 19, 2015
@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Mar 19, 2015

@carnaval / @JeffBezanson the problem is that the generational gc doesn't realize that a datatype's size is dependent on it's nfields:

e.g., we branch from here with v == IUP_CD.Array_1024_Uint8

gc.c
1627         MARK(v, bits = gc_setmark(v, jl_datatype_size(dt), GC_MARKED_NOESC));

but we allocated it from here:

jl_datatype_t *jl_new_uninitialized_datatype(size_t nfields)
{
    return (jl_datatype_t*)
        newobj((jl_value_t*)jl_datatype_type,
               NWORDS(sizeof(jl_datatype_t) - sizeof(void*) +
                      nfields*sizeof(jl_fielddesc_t)));
}

JeffBezanson added a commit that referenced this issue Mar 20, 2015
needs a test, and may not be optimal
@pao
Copy link
Member

pao commented Mar 20, 2015

Note to self to check #10249 once #10591 is fixed, in the unlikely event that this helped.

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Mar 20, 2015

Unlikely, given that this was a deterministic segfault

@pao
Copy link
Member

pao commented Mar 20, 2015

#10249 is deterministic as well (100% failure rate when gc() is run).

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Mar 20, 2015

Ah ok, I didn't quite realize that. Although this one happens on all computers, not just windows.

@tkelman
Copy link
Contributor

tkelman commented Mar 20, 2015

And just a subset of Windows machines, likely having to do with some corporate policy setting or common piece of other software installed at the same time. (maybe #10390, restrictions on large virtual memory allocation?)

@pao
Copy link
Member

pao commented Mar 22, 2015

maybe #10390, restrictions on large virtual memory allocation?

I don't think that's it, but interesting thought (though this is the wrong issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version status:priority This should be addressed urgently
Projects
None yet
Development

No branches or pull requests

4 participants