[erlang-questions] valgrind and OTP 20 on osx

Sverker Eriksson sverker.eriksson@REDACTED
Fri Sep 15 13:37:04 CEST 2017


To increase your chance of success, I suggest you configure with 
--disable-hipe.

I don't know if I have ever run beam on valgrind on osx, so I don't know 
that to expect.

It looks like it has trouble just spawning a thread.


/Sverker, Erlang/OTP


On 09/15/2017 11:50 AM, Benoit Chesneau wrote:
> Hi all I followed the installation steps on the INSTALL page to build with valgrind support:
> http://erlang.org/doc/installation_guide/INSTALL.html
>
> but when I’m running cerl, I get the following error. Any idea what could be the issue?
>
> - benoit
>
>   2017-09-15 11:44:52 ⌚  Benoits-iMac in ~/local/src/otp_src_20.0
> ○ → ./bin/cerl -valgrind -pa ~/<redacted>/_build/default/lib/*/ebin
>
>>
> ==59047==
> ==59047== Syscall param msg->desc.port.name points to uninitialised byte(s)
> ==59047==    at 0x1008EC34A: mach_msg_trap (in /usr/lib/system/libsystem_kernel.dylib)
> ==59047==    by 0x1008EB796: mach_msg (in /usr/lib/system/libsystem_kernel.dylib)
> ==59047==    by 0x1008E5485: task_set_special_port (in /usr/lib/system/libsystem_kernel.dylib)
> ==59047==    by 0x100A8110E: _os_trace_create_debug_control_port (in /usr/lib/system/libsystem_trace.dylib)
> ==59047==    by 0x100A81458: _libtrace_init (in /usr/lib/system/libsystem_trace.dylib)
> ==59047==    by 0x1005A09DF: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
> ==59047==    by 0x1004F2A1A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==59047==    by 0x1004F2C1D: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==59047==    by 0x1004EE4A9: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
> ==59047==    by 0x1004EE440: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
> ==59047==    by 0x1004ED523: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
> ==59047==    by 0x1004ED5B8: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
> ==59047==  Address 0x104d63abc is on thread 1's stack
> ==59047==  in frame #2, created by task_set_special_port (???:)
> ==59047==
> ==59047== Warning: set address range perms: large range [0x10c64b000, 0x14c64b000) (noaccess)
> ==59047== Thread 2:
> ==59047== Invalid read of size 4
> ==59047==    at 0x100A49899: _pthread_body (in /usr/lib/system/libsystem_pthread.dylib)
> ==59047==    by 0x100A49886: _pthread_start (in /usr/lib/system/libsystem_pthread.dylib)
> ==59047==    by 0x100A4908C: thread_start (in /usr/lib/system/libsystem_pthread.dylib)
> ==59047==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
> ==59047==
> ==59047==
> ==59047== Process terminating with default action of signal 11 (SIGSEGV)
> ==59047==  Access not within mapped region at address 0x18
> ==59047==    at 0x100A49899: _pthread_body (in /usr/lib/system/libsystem_pthread.dylib)
> ==59047==    by 0x100A49886: _pthread_start (in /usr/lib/system/libsystem_pthread.dylib)
> ==59047==    by 0x100A4908C: thread_start (in /usr/lib/system/libsystem_pthread.dylib)
> ==59047==  If you believe this happened as a result of a stack
> ==59047==  overflow in your program's main thread (unlikely but
> ==59047==  possible), you can try to increase the size of the
> ==59047==  main thread stack using the --main-stacksize= flag.
> ==59047==  The main thread stack size used in this run was 8388608.
> --59047:0:schedule VG_(sema_down): read returned -4
> ==59047==
> ==59047== HEAP SUMMARY:
> ==59047==     in use at exit: 1,708,783 bytes in 821 blocks
> ==59047==   total heap usage: 1,747 allocs, 926 frees, 2,874,463 bytes allocated
> ==59047==
> ==59047== LEAK SUMMARY:
> ==59047==    definitely lost: 0 bytes in 0 blocks
> ==59047==    indirectly lost: 0 bytes in 0 blocks
> ==59047==      possibly lost: 410,126 bytes in 181 blocks
> ==59047==    still reachable: 74,145 bytes in 325 blocks
> ==59047==         suppressed: 1,224,512 bytes in 315 blocks
> ==59047== Rerun with --leak-check=full to see details of leaked memory
> ==59047==
> ==59047== For counts of detected and suppressed errors, rerun with: -v
> ==59047== Use --track-origins=yes to see where uninitialised values come from
> ==59047== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 25 from 4)
> Segmentation fault: 11
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions





More information about the erlang-questions mailing list