# Valgrind's memory management: out of memory:

**URL:** <https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881>\
**Category:** Uncategorized\
**Created:** [July 9, 2021, 7:48am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881 "2021-07-09T07:48:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 9, 2021, 7:48am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/1 "2021-07-09T07:48:26Z")

</div>

Hi,

I face an issue using Valgrind wherein it complains on out of memory can anyone advise any pointers to the issue.

Below are the logs for the issue.  
[free\_mem\_available.txt](https://forum.legato.io/uploads/short-url/rqDmlY7kxS4x2Lq3LsCWRam4lSx.txt) (657 Bytes)  
[valgrind\_fail\_to\_run.txt](https://forum.legato.io/uploads/short-url/mQMRMini5u612WKJVqiJGBVt4OU.txt) (5.4 KB)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 9, 2021, 9:57am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/2 "2021-07-09T09:57:11Z")

</div>

I don’t see problem with WP76 R13 with attached binary:  
[valgrind.rar](https://forum.legato.io/uploads/short-url/twtnwIEWpziYsoczHMPnV6OO5CU.rar) (3.3 MB)

1. mkdir /tmp/valgrind
2. mkdir /tmp/tmp\_lib;mkdir /tmp/tmp\_lib\_wr;
3. cp -rf /lib /tmp/tmp\_lib
4. mount -t overlay overlay /lib -o lowerdir=/lib,upperdir=/tmp/tmp\_lib,workdir=/tmp/tmp\_lib\_wr;
5. Use WINSCP to transfer all the binary to /tmp/valgrind
6. Use WINSCP to transfer ld-linux.so.3 to /lib ( cannot copy directly from /tmp/valgrind to /lib)
7. 

chmod -R 777 /tmp/valgrind  
export VALGRIND\_LIB=/tmp/valgrind

```auto

root@swi-mdm9x28-wp:/tmp/valgrind# ./valgrind --leak-check=full --show-leak-kind
s=all --verbose ./vgdb
==2961== Memcheck, a memory error detector
==2961== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2961== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==2961== Command: ./vgdb
==2961==
--2961-- Valgrind options:
--2961-- --leak-check=full
--2961-- --show-leak-kinds=all
--2961-- --verbose
--2961-- Contents of /proc/version:
--2961-- Linux version 3.18.131 (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 PREEMPT Tue May 21 06:09:42 UTC 2019
--2961--
--2961-- Arch and hwcaps: ARM, LittleEndian, ARMv7-neon-vfp
--2961-- Page sizes: currently 4096, max supported 4096
--2961-- Valgrind library directory: /tmp/valgrind
--2961-- Reading syms from /tmp/valgrind/vgdb
--2961-- Reading syms from /lib/ld-2.27.so
--2961-- Reading syms from /tmp/valgrind/memcheck-arm-linux
--2961-- object doesn't have a dynamic symbol table
--2961-- Scheduler: using generic scheduler lock implementation.
--2961-- Reading suppressions file: /tmp/valgrind/default.supp
==2961== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-2961-by-root-on-???
==2961== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-2961-by-root-on-???
==2961== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-2961-by-root-on-???
==2961==
==2961== TO CONTROL THIS PROCESS USING vgdb (which you probably
==2961== don't want to do, unless you know exactly what you're doing,
==2961== or are doing some strange experiment):
==2961== /tmp/valgrind/../../bin/vgdb --pid=2961 ...command...
==2961==
==2961== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==2961== /path/to/gdb ./vgdb
==2961== and then give GDB the following command
==2961== target remote | /tmp/valgrind/../../bin/vgdb --pid=2961
==2961== --pid is optional if only one valgrind process is running
==2961==
--2961-- REDIR: 0x401a781 (ld-linux.so.3:strlen) redirected to 0x5805721c (???)
--2961-- REDIR: 0x401b300 (ld-linux.so.3:memcpy) redirected to 0x58057248 (???)
--2961-- REDIR: 0x401a071 (ld-linux.so.3:strcmp) redirected to 0x58057354 (???)
--2961-- Reading syms from /tmp/valgrind/vgpreload_core-arm-linux.so
--2961-- Reading syms from /lib/libpthread-2.27.so
--2961-- Considering /lib/libpthread-2.27.so ..
--2961-- .. CRC mismatch (computed 35a2dcd2 wanted 1371a2a7)
--2961-- object doesn't have a symbol table
--2961-- Reading EXIDX entries: 83 available
==2961== Warning: whilst reading EXIDX: Implausible EXIDX last entry size 4294967199; using 1 instead.
--2961-- Reading EXIDX entries: 69 attempted, 69 successful
--2961-- Reading syms from /lib/libc-2.27.so
--2961-- Considering /lib/libc-2.27.so ..
--2961-- .. CRC mismatch (computed a90d284b wanted b733a7cc)
--2961-- object doesn't have a symbol table
--2961-- Reading EXIDX entries: 729 available
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2961== Warning: whilst reading EXIDX: Implausible EXIDX last entry size 4294964239; using 1 instead.
--2961-- Reading EXIDX entries: 530 attempted, 424 successful
==2961== Conditional jump or move depends on uninitialised value(s)
==2961== at 0x454E5000: strlen (in /lib/libc-2.27.so)
==2961==
==2961== Use of uninitialised value of size 4
==2961== at 0x454E483C: strcpy (in /lib/libc-2.27.so)
==2961==
Using vgdb standalone implies to give -D or -l or a COMMAND
args error. Try `vgdb --help` for more information
==2961==
==2961== HEAP SUMMARY:
==2961== in use at exit: 0 bytes in 0 blocks
==2961== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==2961==
==2961== All heap blocks were freed -- no leaks are possible
==2961==
==2961== Use --track-origins=yes to see where uninitialised values come from
==2961== ERROR SUMMARY: 12 errors from 2 contexts (suppressed: 3 from 3)
==2961==
==2961== 1 errors in context 1 of 2:
==2961== Conditional jump or move depends on uninitialised value(s)
==2961== at 0x454E5000: strlen (in /lib/libc-2.27.so)
==2961==
==2961==
==2961== 11 errors in context 2 of 2:
==2961== Use of uninitialised value of size 4
==2961== at 0x454E483C: strcpy (in /lib/libc-2.27.so)
==2961==
--2961--
--2961-- used_suppression: 3 dl-hack3-cond-1 /tmp/valgrind/default.supp:1236
==2961==
==2961== ERROR SUMMARY: 12 errors from 2 contexts (suppressed: 3 from 3)

```

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 9, 2021, 10:14am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/3 "2021-07-09T10:14:38Z")

</div>

@jyijyi,

The issue is seen in R16 let me check on R16 and come back to you.

Thanks & Regards,

Pankaj Sant

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 9, 2021, 10:19am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/4 "2021-07-09T10:19:43Z")

</div>

@jyijyi  
For the valgrind did you collect it from the /tmp/work directory of the linux source? for R16 I believe I will have to build it with R16 source right?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 9, 2021, 10:26am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/5 "2021-07-09T10:26:03Z")

</div>

please see here:

> [@How to use Valgrind on WP76 to investigate memory leaks](https://forum.legato.io/t/how-to-use-valgrind-on-wp76-to-investigate-memory-leaks/5217/2):
>
> You can try the procedure below on WP76 R13.3: download the yocto source code open ./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc and add the following line: IMAGE\_INSTALL\_append = " valgrind" make the yocto image there will be error to make the yocto.cwe as it is too big. Instead we need to transfer the binary to module’s RAM area on module, type the following: mkdir /tmp/valgrind on PC: scp ./build\_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/valgrind/3.13.…

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 15, 2021, 2:54am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/6 "2021-07-15T02:54:11Z")

</div>

@jyijyi ,

Following the process we are seeing segfault and oom killer. attached are the dmesg logs.

[dmesg\_oom.dat](https://forum.legato.io/uploads/short-url/5v4gqgIaYZ6ZkoB7DYiAiPjsclE.dat) (114.7 KB)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 15, 2021, 2:58am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/7 "2021-07-15T02:58:46Z")

</div>

How about my binary?

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 15, 2021, 3:07am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/8 "2021-07-15T03:07:36Z")

</div>

@jyijyi,

your binary is with R13 the firmware in the device is R16 so tested with R16.

Can you share a binary for R16 and will test it on the device.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 15, 2021, 3:10am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/9 "2021-07-15T03:10:31Z")

</div>

It can still be used in r16 as it is compiled by ARM version.  
Please see below:

```auto
root@swi-mdm9x28-wp:/tmp/valgrind# ./valgrind --leak-check=full --show-leak-kind
s=all --verbose ./vgdb
==2684== Memcheck, a memory error detector
==2684== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2684== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==2684== Command: ./vgdb
==2684==
--2684-- Valgrind options:
--2684-- --leak-check=full
--2684-- --show-leak-kinds=all
--2684-- --verbose
--2684-- Contents of /proc/version:
--2684-- Linux version 3.18.140 (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 PREEMPT Tue Jun 16 11:08:34 UTC 2020
--2684--
--2684-- Arch and hwcaps: ARM, LittleEndian, ARMv7-neon-vfp
--2684-- Page sizes: currently 4096, max supported 4096
--2684-- Valgrind library directory: /tmp/valgrind
--2684-- Reading syms from /tmp/valgrind/vgdb
--2684-- Reading syms from /lib/ld-2.27.so
--2684-- Reading syms from /tmp/valgrind/memcheck-arm-linux
--2684-- object doesn't have a dynamic symbol table
--2684-- Scheduler: using generic scheduler lock implementation.
--2684-- Reading suppressions file: /tmp/valgrind/default.supp
==2684== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-2684-by-root-on-???
==2684== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-2684-by-root-on-???
==2684== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-2684-by-root-on-???
==2684==
==2684== TO CONTROL THIS PROCESS USING vgdb (which you probably
==2684== don't want to do, unless you know exactly what you're doing,
==2684== or are doing some strange experiment):
==2684== /tmp/valgrind/../../bin/vgdb --pid=2684 ...command...
==2684==
==2684== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==2684== /path/to/gdb ./vgdb
==2684== and then give GDB the following command
==2684== target remote | /tmp/valgrind/../../bin/vgdb --pid=2684
==2684== --pid is optional if only one valgrind process is running
==2684==
--2684-- REDIR: 0x401a781 (ld-linux.so.3:strlen) redirected to 0x5805721c (???)
--2684-- REDIR: 0x401b300 (ld-linux.so.3:memcpy) redirected to 0x58057248 (???)
--2684-- REDIR: 0x401a071 (ld-linux.so.3:strcmp) redirected to 0x58057354 (???)
--2684-- Reading syms from /tmp/valgrind/vgpreload_core-arm-linux.so
--2684-- Reading syms from /lib/libpthread-2.27.so
--2684-- Considering /lib/libpthread-2.27.so ..
--2684-- .. CRC mismatch (computed 826e4e35 wanted 1371a2a7)
--2684-- object doesn't have a symbol table
--2684-- Reading EXIDX entries: 83 available
==2684== Warning: whilst reading EXIDX: Implausible EXIDX last entry size 4294967199; using 1 instead.
--2684-- Reading EXIDX entries: 69 attempted, 69 successful
--2684-- Reading syms from /lib/libc-2.27.so
--2684-- Considering /lib/libc-2.27.so ..
--2684-- .. CRC mismatch (computed 7749cb3b wanted dfbb36a5)
--2684-- object doesn't have a symbol table
--2684-- Reading EXIDX entries: 726 available
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryExtract: bytecode can't be represented
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10
==2684== Warning: whilst reading EXIDX: Implausible EXIDX last entry size 4294964239; using 1 instead.
--2684-- Reading EXIDX entries: 527 attempted, 421 successful
==2684== Conditional jump or move depends on uninitialised value(s)
==2684== at 0x48E0B00: strlen (in /lib/libc-2.27.so)
==2684==
==2684== Use of uninitialised value of size 4
==2684== at 0x48E033C: strcpy (in /lib/libc-2.27.so)
==2684==
Using vgdb standalone implies to give -D or -l or a COMMAND
args error. Try `vgdb --help` for more information
==2684==
==2684== HEAP SUMMARY:
==2684== in use at exit: 0 bytes in 0 blocks
==2684== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==2684==
==2684== All heap blocks were freed -- no leaks are possible
==2684==
==2684== Use --track-origins=yes to see where uninitialised values come from
==2684== ERROR SUMMARY: 12 errors from 2 contexts (suppressed: 3 from 3)
==2684==
==2684== 1 errors in context 1 of 2:
==2684== Conditional jump or move depends on uninitialised value(s)
==2684== at 0x48E0B00: strlen (in /lib/libc-2.27.so)
==2684==
==2684==
==2684== 11 errors in context 2 of 2:
==2684== Use of uninitialised value of size 4
==2684== at 0x48E033C: strcpy (in /lib/libc-2.27.so)
==2684==
--2684--
--2684-- used_suppression: 3 dl-hack3-cond-1 /tmp/valgrind/default.supp:1236
==2684==
==2684== ERROR SUMMARY: 12 errors from 2 contexts (suppressed: 3 from 3)
root@swi-mdm9x28-wp:/tmp/valgrind# legato version
19.11.2_4ad011d85a76309438be40fc19e7153a
root@swi-mdm9x28-wp:/tmp/valgrind# cm info
Device: WP7609
IMEI: 359782080100399
IMEISV: E
FSN: WA803370010610
Firmware Version: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
Bootloader Version: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
MCU Version: 002.015
PRI Part Number (PN): 9908102
PRI Revision: 001.000
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.095_000
SKU: 1103843
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 130 Unexpected: 242

```

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 29, 2021, 4:46am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/10 "2021-07-29T04:46:47Z")

</div>

Facing another issue with Valgrind for libc debug info:

~/valgrind# ./valgrind --leak-check=full --show-leak-kinds=all --num-callers=50 --verbose ~/leak  
==17927== Memcheck, a memory error detector  
==17927== Copyright (C) 2002-2017, and GNU GPL’d, by Julian Seward et al.  
==17927== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info  
==17927== Command: /home/root/leak  
==17927==  
–17927-- Valgrind options:  
–17927-- --leak-check=full  
–17927-- --show-leak-kinds=all  
–17927-- --num-callers=50  
–17927-- --verbose  
–17927-- Contents of /proc/version:  
–17927-- Linux version 3.18.140 (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 PREEMPT Sat Dec 5 14:03:13 UTC 2020  
–17927–  
–17927-- Arch and hwcaps: ARM, LittleEndian, ARMv7-neon-vfp  
–17927-- Page sizes: currently 4096, max supported 4096  
–17927-- Valgrind library directory: /home/root/valgrind  
–17927-- Reading syms from /home/root/leak  
–17927-- Reading syms from /lib/ld-2.27.so  
–17927-- Considering /lib/ld-2.27.so …  
–17927-- … CRC mismatch (computed 56338906 wanted d11732f3)  
–17927-- object doesn’t have a symbol table  
–17927-- Reading EXIDX entries: 27 available  
==17927== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10  
==17927== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10  
–17927-- Reading EXIDX entries: 17 attempted, 15 successful

valgrind: Fatal error at startup: a function redirection  
valgrind: which is mandatory for this platform-tool combination  
valgrind: cannot be set up. Details of the redirection are:  
valgrind:  
valgrind: A must-be-redirected function  
valgrind: whose name matches the pattern: strcmp  
valgrind: in an object with soname matching: ld-linux.so.3  
valgrind: was not found whilst processing  
valgrind: symbols from the object with soname: ld-linux.so.3  
valgrind:  
valgrind: Possible fixes: (1, short term): install glibc’s debuginfo  
valgrind: package on this machine. (2, longer term): ask the packagers  
valgrind: for your Linux distribution to please in future ship a non-  
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)  
valgrind: that exports the above-named function using the standard  
valgrind: calling conventions for this platform. The package you need  
valgrind: to install for fix (1) is called  
valgrind:  
valgrind: On Debian, Ubuntu: libc6-dbg  
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo  
valgrind:  
valgrind: Note that if you are debugging a 32 bit process on a  
valgrind: 64 bit system, you will need a corresponding 32 bit debuginfo  
valgrind: package (e.g. libc6-dbg:i386).  
valgrind:  
valgrind: Cannot continue – exiting now. Sorry.

how can we get the requested package from yocto build?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 29, 2021, 5:49am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/11 "2021-07-29T05:49:20Z")

</div>

Did you use WINSCP to transfer ld-linux.so.3 to /lib ???

> [@How to use Valgrind on WP76 to investigate memory leaks](https://forum.legato.io/t/how-to-use-valgrind-on-wp76-to-investigate-memory-leaks/5217/18):
>
> root@swi-mdm9x28-wp:/tmp/valgrind# ls callgrind\_annotate cg\_diff valgrind vgdb callgrind\_control cg\_merge valgrind-di-server cg\_annotate ms\_print valgrind-listener root@swi-mdm9x28-wp:/tmp/valgrind# ./valgrind ./aa valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory root@swi-mdm9x28-wp:/tmp/valgrind# export VALGRIND\_LIB=/tmp/valgrind root@swi-mdm9x28-wp:/tmp/valgrind# ./valgrind ./aa ==3054== Memc…

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 29, 2021, 6:01am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/12 "2021-07-29T06:01:44Z")

</div>

Yes I think there is a reboot which has caused this issue.

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [July 29, 2021, 6:06am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/13 "2021-07-29T06:06:09Z")

</div>

@jyijyi ,

btw how can we free more memory suppose we want around 100MB to be available, as per release notes apprx 70-75MB is freely available. what if we need additional 20-25 MB?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 29, 2021, 6:16am UTC](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/14 "2021-07-29T06:16:54Z")

</div>

But it says it has problem with ld-linux.so.3

```auto

valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strcmp
valgrind: in an object with soname matching: ld-linux.so.3
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.3
valgrind:

```

you can use those modules which support AT!PARTITION to resize the partition.
