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

fun with valgrind #782

Closed
nolta opened this issue Apr 30, 2012 · 2 comments
Closed

fun with valgrind #782

nolta opened this issue Apr 30, 2012 · 2 comments

Comments

@nolta
Copy link
Member

nolta commented Apr 30, 2012

$ valgrind --track-origins=yes ./julia-debug-basic 
==11493== Memcheck, a memory error detector
==11493== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==11493== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==11493== Command: ./julia-debug-basic
==11493== 
               _
   _       _ _(_)_     |
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  A fresh approach to technical computing
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.0.0+84825444.r1cb6
 _/ |\__'_|_|_|\__'_|  |  Commit 1cb6f21927 (2012-04-30 18:16:30)
|__/                   |

julia> x=[1,2,3]
==11493== Conditional jump or move depends on uninitialised value(s)
==11493==    at 0x54E4797: jl_matching_methods (gf.c:1490)
==11493==    by 0x41DE6A9: ???
==11493==    by 0x54E70BD: jl_apply (julia.h:783)
==11493==    by 0x54EA5A3: jl_trampoline (builtins.c:883)
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41DD328: ???
==11493==    by 0x54E70BD: jl_apply (julia.h:783)
==11493==    by 0x54EA5A3: jl_trampoline (builtins.c:883)
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41C92B0: ???
==11493==  Uninitialised value was created by a heap allocation
==11493==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==11493==    by 0x552EF6A: add_page (gc.c:284)
==11493==    by 0x552F060: pool_alloc (gc.c:310)
==11493==    by 0x552FD48: allocobj (gc.c:711)
==11493==    by 0x5521A1D: newobj (newobj_internal.h:6)
==11493==    by 0x5521C28: jl_new_struct_uninit (alloc.c:97)
==11493==    by 0x552BA64: jl_deserialize_value (dump.c:676)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B3F7: jl_deserialize_value (dump.c:594)
==11493== 
==11493== Conditional jump or move depends on uninitialised value(s)
==11493==    at 0x54E47B7: jl_matching_methods (gf.c:1492)
==11493==    by 0x41DE6A9: ???
==11493==    by 0x54E70BD: jl_apply (julia.h:783)
==11493==    by 0x54EA5A3: jl_trampoline (builtins.c:883)
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41DD328: ???
==11493==    by 0x54E70BD: jl_apply (julia.h:783)
==11493==    by 0x54EA5A3: jl_trampoline (builtins.c:883)
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41C92B0: ???
==11493==  Uninitialised value was created by a heap allocation
==11493==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==11493==    by 0x552EF6A: add_page (gc.c:284)
==11493==    by 0x552F060: pool_alloc (gc.c:310)
==11493==    by 0x552FD48: allocobj (gc.c:711)
==11493==    by 0x5521A1D: newobj (newobj_internal.h:6)
==11493==    by 0x5521C28: jl_new_struct_uninit (alloc.c:97)
==11493==    by 0x552BA64: jl_deserialize_value (dump.c:676)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B3F7: jl_deserialize_value (dump.c:594)
==11493== 
==11493== Conditional jump or move depends on uninitialised value(s)
==11493==    at 0x54E4797: jl_matching_methods (gf.c:1490)
==11493==    by 0x41DE6A9: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41DD328: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41C92B0: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41C873F: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==  Uninitialised value was created by a heap allocation
==11493==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==11493==    by 0x552EF6A: add_page (gc.c:284)
==11493==    by 0x552F060: pool_alloc (gc.c:310)
==11493==    by 0x552FD48: allocobj (gc.c:711)
==11493==    by 0x5521A1D: newobj (newobj_internal.h:6)
==11493==    by 0x5521C28: jl_new_struct_uninit (alloc.c:97)
==11493==    by 0x552BA64: jl_deserialize_value (dump.c:676)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B3F7: jl_deserialize_value (dump.c:594)
==11493== 
==11493== Conditional jump or move depends on uninitialised value(s)
==11493==    at 0x54E47B7: jl_matching_methods (gf.c:1492)
==11493==    by 0x41DE6A9: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41DD328: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41C92B0: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==    by 0x54E3AB1: jl_apply_generic (gf.c:1232)
==11493==    by 0x41C873F: ???
==11493==    by 0x54DFF88: jl_apply (julia.h:783)
==11493==  Uninitialised value was created by a heap allocation
==11493==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==11493==    by 0x552EF6A: add_page (gc.c:284)
==11493==    by 0x552F060: pool_alloc (gc.c:310)
==11493==    by 0x552FD48: allocobj (gc.c:711)
==11493==    by 0x5521A1D: newobj (newobj_internal.h:6)
==11493==    by 0x5521C28: jl_new_struct_uninit (alloc.c:97)
==11493==    by 0x552BA64: jl_deserialize_value (dump.c:676)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B1BA: jl_deserialize_value (dump.c:561)
==11493==    by 0x552B3F7: jl_deserialize_value (dump.c:594)
==11493== 
3-element Int64 Array:
 1
 2
 3

julia> y=[1,2,3]
3-element Int64 Array:
 1
 2
 3

julia> z=[1,,^H
==11493== Syscall param msync(start) points to unaddressable byte(s)
==11493==    at 0x52480BD: ??? (syscall-template.S:82)
==11493==    by 0x5C1839E: msync_validate (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C184CB: validate_mem (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C18608: access_mem (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C162C8: dwarf_get (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C16595: _ULx86_64_access_reg (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C15E39: _ULx86_64_get_reg (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C1A722: apply_reg_state (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C1AD8E: _ULx86_64_dwarf_find_save_locs (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C17A07: _ULx86_64_dwarf_step (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C16755: _ULx86_64_step (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5526B4F: build_backtrace (task.c:453)
==11493==  Address 0x7feffe000 is not stack'd, malloc'd or (recently) free'd
==11493== 
==11493== Syscall param msync(start) points to uninitialised byte(s)
==11493==    at 0x52480BD: ??? (syscall-template.S:82)
==11493==    by 0x5C1839E: msync_validate (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C184CB: validate_mem (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C18608: access_mem (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C18AE0: dwarf_get (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C1A97B: apply_reg_state (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C1AD8E: _ULx86_64_dwarf_find_save_locs (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C17A07: _ULx86_64_dwarf_step (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5C16755: _ULx86_64_step (in /home/nolta/julia/usr/lib/libjulia-debug.so)
==11493==    by 0x5526B4F: build_backtrace (task.c:453)
==11493==    by 0x5526C00: jl_raise (task.c:476)
==11493==    by 0x54E73F9: jl_errorf (builtins.c:39)
==11493==  Address 0x7fefff000 is on thread 1's stack
==11493==  Uninitialised value was created by a stack allocation
==11493==    at 0x5526A8F: build_backtrace (task.c:443)
==11493== 
syntax error: unexpected ,

julia> 
==11493== Conditional jump or move depends on uninitialised value(s)
==11493==    at 0x9C3500A: gotoblas_affinity_quit (in /home/nolta/julia/usr/lib/libopenblas.so)
==11493==    by 0x9C33002: gotoblas_quit (in /home/nolta/julia/usr/lib/libopenblas.so)
==11493==    by 0x98D607E: ??? (in /home/nolta/julia/usr/lib/libopenblas.so)
==11493==    by 0xB147510: ??? (in /home/nolta/julia/usr/lib/libopenblas.so)
==11493==    by 0x67CF261: exit (exit.c:78)
==11493==    by 0x67B4C53: (below main) (libc-start.c:258)
==11493==  Uninitialised value was created by a stack allocation
==11493==    at 0x98C20B0: ??? (in /home/nolta/julia/usr/lib/libopenblas.so)
==11493== 
==11493== 
==11493== HEAP SUMMARY:
==11493==     in use at exit: 39,978,367 bytes in 80,937 blocks
==11493==   total heap usage: 1,996,982 allocs, 1,916,045 frees, 633,349,589 bytes allocated
==11493== 
==11493== LEAK SUMMARY:
==11493==    definitely lost: 9,121 bytes in 6 blocks
==11493==    indirectly lost: 393,219 bytes in 3 blocks
==11493==      possibly lost: 32,507,095 bytes in 76,131 blocks
==11493==    still reachable: 7,068,932 bytes in 4,797 blocks
==11493==         suppressed: 0 bytes in 0 blocks
==11493== Rerun with --leak-check=full to see details of leaked memory
==11493== 
==11493== For counts of detected and suppressed errors, rerun with: -v
==11493== ERROR SUMMARY: 14 errors from 7 contexts (suppressed: 28 from 7)
@JeffBezanson
Copy link
Member

Fixed our part. The others are blas and libunwind and don't really worry me.

@nolta
Copy link
Member Author

nolta commented May 1, 2012

Awesome!

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

2 participants