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

make debug fail #5225

Closed
gitfoxi opened this issue Dec 23, 2013 · 21 comments
Closed

make debug fail #5225

gitfoxi opened this issue Dec 23, 2013 · 21 comments

Comments

@gitfoxi
Copy link
Contributor

gitfoxi commented Dec 23, 2013

I'm not sure whether I need to make debug to have debug symbols, but anyway, I tried it on v0.2.0 on Ubuntu 12.04 and got this:

pkg.jl
julia-debug-readline: alloc.c:701: jl_unbox_voidpointer: Assertion `jl_is_bitstype((((jl_value_t*)(v))->type))' failed.

This doesn't happen with make.

Update: Apparently you don't get debug symbols if you just make.

Update: I can make julia-debug and it even runs but at some point -- before I get to the crash I actually want to trace -- it does this:

julia-debug-basic: alloc.c:701: jl_unbox_voidpointer: Assertion `jl_is_bitstype((((jl_value_t*)(v))->type))' failed.

Which is the same thing I guess. Backtrace:

(gdb) #0  0x00007ffff68a9425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007ffff68acb8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x00007ffff68a20ee in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#3  0x00007ffff68a2192 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#4  0x00007ffff6f6fe4a in jl_unbox_voidpointer (v=0x7604000) at alloc.c:701
        __PRETTY_FUNCTION__ = "jl_unbox_voidpointer"
#5  0x00007ffff6f88ec6 in gc_mark () at gc.c:874
        p = 0x688d10
        fin = 0x7604000
        v = 0xa07c410
        __PRETTY_FUNCTION__ = "gc_mark"
        i = 0
#6  0x00007ffff6f891e3 in jl_gc_collect () at gc.c:931
        nfinal = 0
        actual_allocd = 26214560
#7  0x00007ffff6f8742f in pool_alloc (p=0x7ffff7dbe1b0) at gc.c:488
        __PRETTY_FUNCTION__ = "pool_alloc"
        v = 0x100000010
#8  0x00007ffff6f893ff in allocobj (sz=16) at gc.c:1007
No locals.
#9  0x00007ffff5218050 in julia_abstract_eval_symbol11716 () from /home/m/src/julia/usr/bin/../lib/julia/sys.so
No symbol table info available.
#10 0x00007ffff6ef8095 in jl_apply (f=0x11309d0, args=0x7fffffff87a0, nargs=3) at julia.h:1046
No locals.
#11 0x00007ffff6efc4b5 in jl_apply_generic (F=0x1130990, args=0x7fffffff87a0, nargs=3) at gf.c:1365
@JeffBezanson
Copy link
Sponsor Member

Thanks. Assertions are only enabled in debug mode. This is my fault; fix on the way.

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

Thanks for the quick fix. Could I suggest changing Travis to make debug
and also the nightly builds?

On Mon, Dec 23, 2013 at 9:27 AM, Jeff Bezanson notifications@github.comwrote:

Closed #5225 #5225 via 6abc0aehttps://github.com/JuliaLang/julia/commit/6abc0aeb1675e9d761eaeb1a6b4afd14d2e439ba
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225
.

Michael

@StefanKarpinski
Copy link
Sponsor Member

Travis should maybe use a debug build, but why should the nightlies be debug builds?

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

Because other projects using Travis checkout the nightlies and when your
project's Travis segfaults you'd ideally want to get a backtrace.

On Mon, Dec 23, 2013 at 10:16 AM, Stefan Karpinski <notifications@github.com

wrote:

Travis should maybe use a debug build, but why should the nightlies be
debug builds?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31134644
.

Michael

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

I mean, it could build both, right? So people just wanting to use nightlies
for some reason could call julia-readline while people using nightlies on
Travis could call julia-debug-basic.

On Mon, Dec 23, 2013 at 11:09 AM, Michael Fox 415fox@gmail.com wrote:

Because other projects using Travis checkout the nightlies and when your
project's Travis segfaults you'd ideally want to get a backtrace.

On Mon, Dec 23, 2013 at 10:16 AM, Stefan Karpinski <
notifications@github.com> wrote:

Travis should maybe use a debug build, but why should the nightlies be
debug builds?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31134644
.

Michael

Michael

gitfoxi pushed a commit to gitfoxi/julia that referenced this issue Dec 23, 2013
* upstream/master: (89 commits)
  fix JuliaLang#5225
  update pcre
  fix off-by-1 in isqrt. closes JuliaLang#4884
  Add more keywords to ctags regex, plus README
  annotate the types of arguments for derived trigonometric & hyperbolic functions
  fix doc for && and || and update helpdb
  only show ccall literal address warning in imaging mode. closes JuliaLang#5215
  minor update of hypot to ensure consistency of output types
  Fix JuliaLang#5217
  silence compiler warning
  hopefully more robust way of getting github URL (don't assume module name is Pkg name)
  add text/html writemime for MethodList and Method (fix JuliaLang#4952)
  update NEWS
  doc: `import M: single,name` syntax, close JuliaLang#5214
  clean up native finalizers code
  specialized abs2 for bool
  remove use of callback API in REPL
  Some error message cleanup to fix segfault when transposing sparse vector with illegal values.
  test/git*.jl: don't use `echo` to read-and-write from processes.
  test/git*.jl: don't use `echo` to read-and-write from processes.
  ...
@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

Also, people who are using nightlies are asking for trouble. They're going
to hit segfault eventually at which point it would be good if they could
run julia-debug to get a backtrace rather than have to go build from source
at that point. Really, I don't see the harm of including julia-debug even
in the stable releases just in case someone needs it.

On Mon, Dec 23, 2013 at 11:10 AM, Michael Fox 415fox@gmail.com wrote:

I mean, it could build both, right? So people just wanting to use
nightlies for some reason could call julia-readline while people using
nightlies on Travis could call julia-debug-basic.

On Mon, Dec 23, 2013 at 11:09 AM, Michael Fox 415fox@gmail.com wrote:

Because other projects using Travis checkout the nightlies and when your
project's Travis segfaults you'd ideally want to get a backtrace.

On Mon, Dec 23, 2013 at 10:16 AM, Stefan Karpinski <
notifications@github.com> wrote:

Travis should maybe use a debug build, but why should the nightlies be
debug builds?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31134644
.

Michael

Michael

Michael

@StefanKarpinski
Copy link
Sponsor Member

Oh, including it is certainly totally fine. I just worry about the inevitable performance complaints if we make a debug build the default.

@JeffBezanson
Copy link
Sponsor Member

It will significantly increase the install size. I guess it's ok for nightlies, but not in released versions. It is not normal practice to install both debug and release versions.

@StefanKarpinski
Copy link
Sponsor Member

That's a reasonable distinction.

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

But consider this: I'm a new user. I do something very unexpected during
the first hour of my first day. I kind of want to open an issue but then I
find out this involves a 5-hour build to get a backtrace. I'm like, no.

On Mon, Dec 23, 2013 at 1:32 PM, Jeff Bezanson notifications@github.comwrote:

It will significantly increase the install size. I guess it's ok for
nightlies, but not in released versions. It is not normal practice to
install both debug and release versions.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31145048
.

Michael

@johnmyleswhite
Copy link
Member

You don't need the debug build to open an issue. I never use the debug build.

@StefanKarpinski
Copy link
Sponsor Member

I think he means that you want to file an issue with a backtrace. I have to say that I think that needing a backtrace is pretty uncommon.

@johnmyleswhite
Copy link
Member

I agree. My point was that many issues get filed without backtraces. It's a little hard for me to believe that a new user arrives, finds a bug that can only be explained with reference to a backtrace, finds they don't have the debug build and then abandons Julia forever.

@JeffBezanson
Copy link
Sponsor Member

If there are steps that reproduce the problem, we can take care of the rest. Not everybody needs the debug build. I don't seem to have gimp-debug or gcc-debug installed on my system.

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

You could: aptitude search dbg

On Mon, Dec 23, 2013 at 2:05 PM, Jeff Bezanson notifications@github.comwrote:

If there are steps that reproduce the problem, we can take care of the
rest. Not everybody needs the debug build. I don't seem to have gimp-debugor
gcc-debug installed on my system.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31146715
.

Michael

@JeffBezanson
Copy link
Sponsor Member

Yes but it's not the default.

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

So we agree then? It should convenient but not default. If there's a
julia-xxx.deb then there's also a julia-xxx-dbg.deb. That way I didn't
wait four hours for my tiny Ubuntu VM to grind through Clang and OpenBLAS
when I could just apt-get julia-dbg.

On Mon, Dec 23, 2013 at 2:44 PM, Jeff Bezanson notifications@github.comwrote:

Yes but it's not the default.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31148425
.

Michael

@gitfoxi
Copy link
Contributor Author

gitfoxi commented Dec 23, 2013

That leaves the question of what to do with OSX and Windows.

OSX is easy because Mac users are accustomed to 400MB .dmgs.

For Windows I'll make an InstallShield Wizard that demands the user accept
a 20-page EULA, offers Minimal, Custom and Classic install (Default comes
with the Julia Download Manager. So does Minimal and Classic), copies 100
files to C:\SYSTEM32\, sprinkles the thousand random keys throughout the
registry, asks if you want to run Julia on startup then does anyway and
finally asks if you'd like to reboot Now or Later but just asks again if
you click Later.

On Mon, Dec 23, 2013 at 3:03 PM, Michael Fox 415fox@gmail.com wrote:

So we agree then? It should convenient but not default. If there's a
julia-xxx.deb then there's also a julia-xxx-dbg.deb. That way I didn't
wait four hours for my tiny Ubuntu VM to grind through Clang and OpenBLAS
when I could just apt-get julia-dbg.

On Mon, Dec 23, 2013 at 2:44 PM, Jeff Bezanson notifications@github.comwrote:

Yes but it's not the default.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5225#issuecomment-31148425
.

Michael

Michael

@StefanKarpinski
Copy link
Sponsor Member

Don't forget to make sure it makes a shortcut link to start Julia on your desktop.

@JeffBezanson
Copy link
Sponsor Member

And don't make the mistake of simply putting the julia shortcut in the Startup Items folder where users can easily delete it. Surely there is a more robust way to ensure that julia runs on startup.

@jiahao
Copy link
Member

jiahao commented Dec 25, 2013

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

No branches or pull requests

5 participants