Hi John,

My comments inline.  See lines with JK.

John

From: John Reiser <jrei...@bitwagon.com>
Sent: Thursday, January 30, 2020 4:29 PM
To: valgrind-users@lists.sourceforge.net
Subject: Re: [Valgrind-users] Valgrind Internal Error: Valgrind received a 
signal 11 (SIGSEGV) - exiting

> I am receiving a valgrind Internal error upon startup of a multi-threaded 
> application.  It appears to be related to the option track_origins as I was 
> not seeing the issue without the track_origins option.  I am using the 
> following valgrind options:  --trace-children=yesand --track-origins=yes.

Please tell us the following essential information:
0. You claim "a multi-threaded application" yet valgrind says "Command: 
/bin/touch ...". Explain. [Is it implemented via busybox?]
JK - The application is a TR-69PA... which runs 4 threads interfacing to Dbus.  
During startup, it does a "system" call that runs /bin/touch.  The vast bulk of 
the program is written in C.  It does run in an embedded Linux environment on a 
router... and busybox is used for a number of the normal linux commands such as 
ps, ls, etc.

1. Confirm that the machine architecture is 32-bit ARM. (The string 
"memcheck-arm-linux" appears in the output.)
JK - This is a Linux architecture 32-bit ARM.
We use the toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-1.0.14_eabi.tar.xz.

2. What is the make and model of the machine? Is it a virtual machine, or real 
hardware?
JK - Real hardware.

3. How much physical RAM? How much swap space? (The string "out_of_memory" 
appears in the output.)
JK - [    0.000000] Memory: 495376K/507904K available (5078K kernel code, 420K 
rwdata, 1704K rodata, 208K init, 328K bss, 12528K reserved, 0K highmem)
Not sure how to get swap space.

4. Was valgrind essentially the only process running?
JK - Definitely not.  The TR069 consists of a whole family of CCSP processes 
that communicate to each other via DBUS.  The TR069PA was however the only 
process running via valgrind.

5. How many threads?
JK - 4 threads per CCSP process, including the one running valgrind.

6. Run without --trace-children=yes, then copy+paste here the HEAP SUMMARY and 
LEAK SUMMARY paragraphs.
JK - I will have to get back to you on this one.  Won't be until Monday.

7. What is the approximate allocation profile? A zillion little blocks, or a 
few very large blocks, etc?
JK - All sizes... some very small, and some very large.  Control structures are 
small ones, while some objects transferred across the DBUS are quite large, 
containing arrays of objects/parameters.  Note that the overall application is 
a router... it has a lot of other processes running.  I would be hard pressed 
to characterize overall usage of memory.

8. Which linux distribution and version?
JK - This is embedded Linux version 3.14.77.  Here is info displayed at boot 
time:
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.77 (jknight@gotrocks) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.04 r35193) ) #1 SMP PREEMPT Mon Dec 23 12:54:41 
PST 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[    0.000000] Machine model: Qualcomm Technologies, Inc. IPQ40xx/AP-DK07.1-C1
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 8 pages/cpu @dfbc7000 s8448 r8192 d16128 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 125952
[    0.000000] Kernel command line: init=/sbin/init rootfstype=ubifs 
ubi.mtd=alt_rootfs root=ubi0:ubifs rootwait rw clk_ignore_unused
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 495376K/507904K available (5078K kernel code, 420K 
rwdata, 1704K rodata, 208K init, 328K bss, 12528K reserved, 0K highmem)

9. Run "readelf --segments the_executable" and copy+paste here the output.
JK -
jknight@gotrocks:~/projects/nodes_dev_tb_tr69/skyfall_v2_tr181/nfsroot/rootfs/usr/sbin/tr069$
 readelf --segments CcspTr069PaSsp

Elf file type is EXEC (Executable file)
Entry point 0x19780
There are 7 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  EXIDX          0x0e0c38 0x000f0c38 0x000f0c38 0x012f8 0x012f8 R   0x4
  PHDR           0x000034 0x00010034 0x00010034 0x000e0 0x000e0 R E 0x4
  INTERP         0x000114 0x00010114 0x00010114 0x00014 0x00014 R   0x1
      [Requesting program interpreter: /lib/ld-uClibc.so.0]
  LOAD           0x000000 0x00010000 0x00010000 0xe1f34 0xe1f34 R E 0x10000
  LOAD           0x0e2000 0x00102000 0x00102000 0x01368 0x03ef0 RW  0x10000
  DYNAMIC        0x0e2008 0x00102008 0x00102008 0x00188 0x00188 RW  0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x10

Section to Segment mapping:
  Segment Sections...
   00     .ARM.exidx
   01
   02     .interp
   03     .interp .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn 
.rel.plt .init .plt .text .fini .rodata .ARM.extab .ARM.exidx .eh_frame
   04     .init_array .fini_array .dynamic .got .data .bss
   05     .dynamic
   06

10. When the internal error happens (or shortly before), what does "ps -l" say 
about the process?
JK - This is somewhat difficult to get as the error occurs as the system 
auto-boots and I am generally not even logged into the console yet.  I will try 
to get this probably on Monday and get back to you.

I hope this helps.  I will get back to you on Monday for the two items I could 
not answer today.

John

_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net<mailto:Valgrind-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/valgrind-users<https://lists.sourceforge.net/lists/listinfo/valgrind-users>
__________________________________________________________________ Confidential 
This e-mail and any files transmitted with it are the property of Belkin 
International, Inc. and/or its affiliates, are confidential, and are intended 
solely for the use of the individual or entity to whom this e-mail is 
addressed. If you are not one of the named recipients or otherwise have reason 
to believe that you have received this e-mail in error, please notify the 
sender and delete this message immediately from your computer. Any other use, 
retention, dissemination, forwarding, printing or copying of this e-mail is 
strictly prohibited. Pour la version fran?aise: 
http://www.belkin.com/email-notice/French.html F?r die deutsche ?bersetzung: 
http://www.belkin.com/email-notice/German.html 
__________________________________________________________________
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to