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

segfault, Julia 0.3.8, declaring Base.getfield #11117

Closed
jeff-regier opened this issue May 3, 2015 · 2 comments
Closed

segfault, Julia 0.3.8, declaring Base.getfield #11117

jeff-regier opened this issue May 3, 2015 · 2 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@jeff-regier
Copy link

The command below always produces a segfault on my system, with Julia 0.3.8.

julia> function Base.getfield(sp::Int64, n::Symbol)
                         println("called")
                     end

signal (11): Segmentation fault
jl_method_def at /home/jeff/julia/bin/../lib/julia/libjulia.so (unknown line)
unknown function (ip: 242623396)
unknown function (ip: 242689786)
jl_f_top_eval at /home/jeff/julia/bin/../lib/julia/libjulia.so (unknown line)
eval_user_input at REPL.jl:53
jlcall_eval_user_input_20177 at  (unknown line)
jl_apply_generic at /home/jeff/julia/bin/../lib/julia/libjulia.so (unknown line)
anonymous at task.jl:95
jl_handle_stack_switch at /home/jeff/julia/bin/../lib/julia/libjulia.so (unknown line)
julia_trampoline at /home/jeff/julia/bin/../lib/julia/libjulia.so (unknown line)
unknown function (ip: 4199725)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 4199781)
Segmentation fault

Here's the output of versioninfo:

julia> versioninfo(true)
Julia Version 0.3.8
Commit 79599ad (2015-04-30 23:40 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
  WORD_SIZE: 64
           Linux Mint 17 Qiana
  uname: Linux 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64
Memory: 7.796939849853516 GB (688.29296875 MB free)
Uptime: 3.108322e6 sec
Load Avg:  0.6923828125  0.3671875  0.2861328125
Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz: 
       speed         user         nice          sys         idle          irq
#1  2400 MHz   29562716 s      27611 s    2088490 s  277544480 s         43 s
#2  1600 MHz   15600446 s      12411 s    2197738 s  291470658 s         46 s
#3  2400 MHz   33970371 s      22452 s    2095048 s  273559359 s         45 s
#4  1600 MHz   14166042 s      11029 s    2183836 s  293370435 s         10 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Core2)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
Environment:
  TERM = xterm
  DEFAULTS_PATH = /usr/share/gconf/xmonad.default.path
  PATH = /home/jeff/julia/bin:/home/jeff/bin:/home/jeff/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
  MANDATORY_PATH = /usr/share/gconf/xmonad.mandatory.path
  HOME = /home/jeff
  MATHEMATICA_HOME = /usr/local/Wolfram/Mathematica/9.0
  WINDOWPATH = 8

Package Directory: /home/jeff/.julia/v0.3
13 required packages:
 - Dates                         0.3.2
 - Devectorize                   0.4.1
 - Docile                        0.4.11
 - Gadfly                        0.3.11
 - GaussianMixtures              0.0.6
 - Images                        0.4.36
 - Ipopt                         0.1.14
 - Jewel                         1.0.4
 - JuMP                          0.9.1
 - ReverseDiffSource             0.1.3
 - ReverseDiffSparse             0.2.7              master
 - SymPy                         0.2.27
 - WCSLIB                        0.1.5
53 additional packages:
 - ArrayViews                    0.6.1
 - BinDeps                       0.3.11
 - Blosc                         0.1.2
 - Calculus                      0.1.5              de7ae8b4 (dirty)
 - Celeste                       0.0.0-             master (unregistered, dirty)
 - Clustering                    0.3.3
 - Codecs                        0.1.4
 - Color                         0.4.4
 - Compat                        0.4.2
 - Compose                       0.3.11
 - Contour                       0.0.6
 - DataArrays                    0.2.13
 - DataFrames                    0.6.4
 - DataStructures                0.3.8
 - Distances                     0.2.0
 - Distributions                 0.7.1
 - DualNumbers                   0.1.3
 - FITSIO                        0.5.2
 - FactCheck                     0.2.6
 - FixedPointNumbers             0.0.7
 - GSL                           0.1.2
 - GZip                          0.2.15
 - Graphics                      0.1.0
 - Grid                          0.3.8
 - HDF5                          0.4.14
 - Hexagons                      0.0.3
 - ImmutableArrays               0.0.7
 - Iterators                     0.1.7
 - JSON                          0.4.3
 - JuliaParser                   0.6.2
 - KernelDensity                 0.1.0
 - LNR                           0.0.1
 - Lazy                          0.8.3
 - Loess                         0.0.3
 - MathProgBase                  0.3.11
 - NLopt                         0.2.1
 - NaNMath                       0.0.2
 - NumericExtensions             0.6.2
 - NumericFuns                   0.2.3
 - Optim                         0.4.1
 - PDMats                        0.3.3
 - PyCall                        0.8.0
 - Reexport                      0.0.2
 - Requires                      0.1.1
 - SHA                           0.0.4
 - SIUnits                       0.0.2
 - Showoff                       0.0.4
 - SortingAlgorithms             0.0.4
 - StatsBase                     0.6.14
 - TexExtensions                 0.0.2
 - URIParser                     0.0.5
 - WoodburyMatrices              0.0.1
 - Zlib                          0.1.8
@vtjnash
Copy link
Sponsor Member

vtjnash commented May 3, 2015

it looks like this may be fixed on master:

julia> function Base.getfield(sp::Int64, n::Symbol)
                                println("called")
                            end
ERROR: cannot define function getfield; it already has a value

julia> isgeneric(Base.getfield)
false

@pao pao added the kind:bug Indicates an unexpected problem or unintended behavior label May 3, 2015
ihnorton added a commit that referenced this issue May 6, 2015
It's croaking [here](https://github.com/JuliaLang/julia/blob/79599ada444fcc63cb08aed64b4ff6a415bb4d29/src/interpreter.c#L260).
We backported 97381df (fix for #9773) which gives the nice error message,
but didn't remove the related assert, which was removed in 2604610.
tkelman added a commit that referenced this issue May 7, 2015
@tkelman
Copy link
Contributor

tkelman commented May 7, 2015

This has been backported to release-0.3 so should be fixed in 0.3.9.

@tkelman tkelman closed this as completed May 7, 2015
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
Projects
None yet
Development

No branches or pull requests

4 participants