Re: [Valgrind-users] valgrind usage in arm board

2023-09-29 Thread John Reiser
On 9/28/23 20:55, ramakanth varala wrote: I gathered all info at this place https://pastebin.com/1sekb62v Looking at the previous messages of the thread in [Valgrind-users] mailing list, I don't see any information about the context in which you are working.

Re: [Valgrind-users] valgrind usage in arm board

2023-09-27 Thread John Reiser
On 9/26/23 23:15, ramakanth varala wrote: valgrind:  A must-be-redirected function valgrind:  whose name matches the pattern:  index valgrind:  in an object with soname matching:   ld-linux.so.3 *valgrind:  was not found whilst processing* *valgrind:  symbols from the object with soname:

Re: [Valgrind-users] Help

2023-09-07 Thread John Reiser
==17348== Warning: invalid file descriptor 1024 in syscall close() Your exe is probably trying to ensure all file descriptors are closed. You should probably use getrlimit() to query the upper limit rather than assume anything. Exes under Valgrind have a slighly lower limit because Valgrind

Re: [Valgrind-users] Does Valgrind support AMD Ryzen 5 5600X processors

2023-07-19 Thread John Reiser
I am trying to find which of my systems will run valgrind, I know it will not run on my AMD FX-8370� and AMD FX-4350 systems. Does any one know if it should run on my AMD Ryzen 5 5600X (see failure below) ? I have access to an Intel core 7 laptop (Haswell), would I stand a better chance with

Re: [Valgrind-users] valgrind gets fatal signal when particular syscall is made by an executable

2023-07-02 Thread John Reiser
On a machine that has an old linux kernel, when valgrind 3.21.0 runs an executable that contains a call to syscall 378 - valgrind fails after being killed by a fatal signal. The kernel on the machine is 3.10.0 x86_64 (the system is based on RedHad 5, I think), libc 2.17, and the executable

Re: [Valgrind-users] unhandled instruction bytes for vmovdqu64

2023-06-29 Thread John Reiser
Running valgrind on GnuCOBOL errors out with vex amd64->IR: unhandled instruction bytes: 0x62 0xF1 0xFE 0x8 0x6F 0x7 0x48 0xC7 0x5 0x6F vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0 vex amd64->IR:   VEX=0 VEX.L=0 VEX.n=0x0 ESC=NONE vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0

Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?

2023-06-25 Thread John Reiser
Upgrade valgrind *TODAY*.  The current version is valgrind-3.21.0. On a RaspberryPi model 3 in 32-bit mode (armhf) running Debian 11 (bullseye), then "apt-get install valgrind" installs valgrind-3.16.1 which is much better than the valgrind-3.7.0 which complained "not implemented" for the "pac"

Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?

2023-06-24 Thread John Reiser
I am using Debian on RaspberryPi and everything is from the official apt package manager. Hardware architecture: armv7l GNU/Linux OS version:Raspbian GNU/Linux 11 (bullseye) Libmicrohttpd: stable, 0.9.72-2 armhf Valgrind: valgrind-3.7.0 Upgrade valgrind

Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?

2023-06-23 Thread John Reiser
... each time a client makes a [HTTP] request, Valgrind complains "Error accepting connection: Function not implemented" and my program fails to handle the request as a result. Which versions of each of these pieces are you running: Libmicrohttpd, valgrind, hardware architecture, OS? Please

Re: [Valgrind-users] tool=cachegrind always reports LL misses, even if the cache is bigger than the used memory

2023-04-25 Thread John Reiser
I would think that, regardless of cache size, the *first* access to a line causes a miss. The PowerPC and relatives have an instruction which force-allocates (if necessary) AND zeroes an entire cache line, so in some ways the "first" access is a Write which succeeds with no miss.

Re: [Valgrind-users] about a stack fill option (as for malloc-fill and free-fill)

2023-03-28 Thread John Reiser
 Could it be possible to add an option like --heap-up-fill --heap-down-fill (like for stack with malloc), that fills heap memory with a specified values (when entering a function and leave a function)? tl;dr 2 See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2723r0.html

Re: [Valgrind-users] Compilation fails on ARM

2023-02-28 Thread John Reiser
On 2/28/2023, Leon Pollak wrote: I recall my previous mail about cross-compilation. When i did exactly what is recommended, I managed to cross-compile. The unexpected issue appeared when I run wvalgrind myappw: FATAL: kernel too old My kernel is 2.6.37 and seemed to be ok. Is it final or can I

Re: [Valgrind-users] Compilation fails on ARM

2023-02-28 Thread John Reiser
On 2/28/2023, Leon Pollak wrote: I recall my previous mail about cross-compilation. When i did exactly what is recommended, I managed to cross-compile. The unexpected issue appeared when I run wvalgrind myappw: FATAL: kernel too old My kernel is 2.6.37 and seemed to be ok. Is it final or can I

Re: [Valgrind-users] Need Help

2023-02-16 Thread John Reiser
$ cat foo.s .byte 0x66,0xF,0x3A,0x22 .byte 0,0,0,0 # # For x86_64 on x86_64 # $ gcc --version gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4) $ gcc -c foo.s $ file foo.o foo.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), stripped $ gdb foo.o GNU gdb (GDB) Fedora 12.1-2.fc36 (gdb) x/i 0

Re: [Valgrind-users] Cache conflict detection support in cachegrind

2023-01-29 Thread John Reiser
On 2023-01-29, Paul Floyd wrote: My recommendations for this are: 1/ PMU/PMC (performance monitoring unit/counter) event counting tools (perf record on Linux, pmcstat on FreeBSD, Oracle Studio collect on Solaris, don't know for macOS). These can record events such as cache misses with the

Re: [Valgrind-users] Timer delete

2022-11-11 Thread John Reiser
On 11/11/22 13:23, Domenico Panella wrote: Operating System: Slackware 15.0 (Current) Kernel Version: 5.19.17 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz A small example: #include [[snip horrible formatting]] It's a bug (or implementation

Re: [Valgrind-users] bug report: bugzilla refused to accept this saying it contains spam. But it doesn't.

2022-09-22 Thread John Reiser
I think valgrind experienced a division by zero. readdwarf.c:   if (op_code >= info.li_opcode_base) { op_code -= info.li_opcode_base; Word adv = (op_code / info.li_line_range)    <--- line 831    * info.li_min_insn_length; Int advAddr =

Re: [Valgrind-users] Suggestion for the documentation of --error-exitcode

2022-09-12 Thread John Reiser
On 9/12/22 10:04, David Anderson wrote: Thhe html documentation http://www.valgrind.org/docs/manual/index.html explains what --error-exitcode=9 does in case valgrind notes an error. [[snip]] It says nothing explicitly about what exit code is returned if valgrind does not find an error.

Re: [Valgrind-users] unable to read core generated by valgrind in gdb / aarch64

2022-09-12 Thread John Reiser
OK, but why would that break core files only with valgrind? Because when ran directly, the core files work perfectly fine. [Rhetorical] Why are there bugs? [Practical] The operating system itself is the writer of ordinary core files, which contain process state: register values, copies of

Re: [Valgrind-users] unable to read core generated by valgrind in gdb / aarch64

2022-09-09 Thread John Reiser
[[Aggressive snipping, but relevant details preserved.]] No threading is used. Postgres is multi-process, and uses shared memory for the shared cache (through shm_open etc.). Multi-process plus shm_open() IS THREADING! Not pthreads, but multiple execution contexts that read and write the

Re: [Valgrind-users] unable to read core generated by valgrind in gdb / aarch64

2022-09-08 Thread John Reiser
1. Describe the environment completely. Also: Any kind of threading (pthreads, or shm_open, or mmap(,,,MAP_SHARED,,)) must be mentioned explicitly. Multiple execution contexts which access the same address space instance are a significant complicating factor. If threading is involved, then

Re: [Valgrind-users] unable to read core generated by valgrind in gdb / aarch64

2022-09-03 Thread John Reiser
Any ideas what I might be doing wrong? Or how do I load the core file? Why does use of valgrind cause programmers to forget general debugging technique? 1. Describe the environment completely. The report does not say which compilers and compiler versions were used, or if the compiler commands

Re: [Valgrind-users] simple c program. How does the memory size calculated in Valgrind

2022-09-03 Thread John Reiser
==123254== HEAP SUMMARY: ==123254==     in use at exit: 0 bytes in 0 blocks ==123254==   total heap usage: 6 allocs, 6 frees, 2,084 bytes allocated "2,084 bytes allocated" is the sum of all 6 arguments that were passed to malloc(), calloc() [possibly by calling malloc()], realloc() [at least

Re: [Valgrind-users] Valgrind trace Memory Addresses while running?

2022-08-05 Thread John Reiser
if we can get a list of all the physical addresses the program used, in the order the program accessed them, and whether read/write. For any real world application the size of the log would be overwhelmingly huge ... (unless you only want unique addresses). Of course this is the purpose

Re: [Valgrind-users] memcheck is getting SIGKILLed before leak report is output

2022-08-05 Thread John Reiser
Is there anything that can be done with memcheck to make it consume less memory? No. Well, you can use the command-line argument "--num-callers=" to reduce the length of tracebacks that are stored in the "red zones" just before and after an allocated block. This might help enough if you

Re: [Valgrind-users] memcheck is getting SIGKILLed before leak report is output

2022-08-05 Thread John Reiser
Does heaptrack also show the 'still reachable' types of leaks that memcheck does? Heaptrack intercepts malloc+free+etc, then logs the parameters, result, and traceback; but otherwise lets the progcess-original malloc+free+etc do the work. Heaptrack does not notice, and does not care, what you

Re: [Valgrind-users] memcheck is getting SIGKILLed before leak report is output

2022-08-05 Thread John Reiser
When running memcheck on a massive monolith embedded executable (237MB stripped, 1.8GiB unstripped), after I stop the executable under valgrind I see the “HEAP SUMMARY” but then valgrind dies before any leak reports are printed. If finding memory leaks is the only goal (for instance, if you

Re: [Valgrind-users] Memcheck Support For Per-Thread Caching

2022-07-25 Thread John Reiser
Does memcheck include support for per-thread caching (now enabled by default in glibc)? Memcheck intercepts all calls on allocation and free-ing subroutines (malloc, free, calloc, realloc, memalign, posix_memalign, brk, sbrk, mmap, ...) and totally replaces each one with code that is internal

Re: [Valgrind-users] Possible to suppress low block count loss records?

2022-07-13 Thread John Reiser
We are trying to track down a suspected place in our code that keeps accumulating memory in a ‘still reachable’. When I turn on still reachable and run my process for a few hours and then stop the process to get the valgrind reports there are over 2.7 million loss records which are mostly

Re: [Valgrind-users] Valgrind crash on Texas Instrument AM3352 (armv7le) and QNX

2022-07-11 Thread John Reiser
I have 2 different boards running QNX 6.5 and mounting the exact same file system. One board is based on an NXP iMX53 SoC and the other one on a Texas Instrument AM3352. Since both SoC share the same instruction set (Cortex A8 - amv7le), they can run the same binaries. However, whereas

Re: [Valgrind-users] armhf: illegal hardware instruction

2022-06-29 Thread John Reiser
Program received signal SIGILL, Illegal instruction. vgPlain_am_startup (sp_at_startup=3204445696) at m_aspacemgr/aspacemgr-linux.c:1626 1626 init_nsegment(); (gdb) x/i $pc => 0x58071090 : vmov.i32d16, #0 ; 0x As a reminder I do not have neon on this machine: Features

Re: [Valgrind-users] armhf: illegal hardware instruction

2022-06-29 Thread John Reiser
I did not make up those strace logs in my head, all I am trying to do is Debian bug triaging. Turns out I did a pretty bad job at it: 1. The original Debian bug report seems to be PEBCAK, and I'll close the bug as wontfix ASAP, 2. I was not paying attention to the gcc version I was using.

Re: [Valgrind-users] armhf: illegal hardware instruction

2022-06-28 Thread John Reiser
$ export RPI_MODEL=3 $ export DEBIAN_RELEASE=bullseye $ wgethttps://raspi.debian.net/daily/raspi_${RPI_MODEL}_${DEBIAN_RELEASE}.img.xz That gives arm64, not armhf (32-bit). Choosing https://raspi.debian.net/tested/20220121_raspi_2_bullseye.img.xz and running5.10.0-15-armmp #1 SMP Debian

Re: [Valgrind-users] armhf: illegal hardware instruction

2022-06-28 Thread John Reiser
$ export RPI_MODEL=3 $ export DEBIAN_RELEASE=bullseye $ wgethttps://raspi.debian.net/daily/raspi_${RPI_MODEL}_${DEBIAN_RELEASE}.img.xz That gives arm64, not armhf (32-bit). ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net

Re: [Valgrind-users] armhf: illegal hardware instruction

2022-06-28 Thread John Reiser
track down Debian issue https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=928224 which is 3 years old: - Installed libc6 version: libc6-dgb:armhf 2.28-8 valgrind /bin/true ==12463== Memcheck, a memory error detector ==12463== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.

Re: [Valgrind-users] armhf: illegal hardware instruction

2022-06-28 Thread John Reiser
On 6/28/22, Mathieu Malaterre wrote: % strace ./memcheck/memcheck-arm-linux execve("./memcheck/memcheck-arm-linux", ["./memcheck/memcheck-arm-linux"], 0xbe962730 /* 19 vars */) = 0 --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x58072020} --- +++ killed by SIGILL +++ zsh: illegal

Re: [Valgrind-users] Cross compilation issue for Android

2022-06-27 Thread John Reiser
On 6/27/22, $rik@nth wrote: Things got resolved after moving to older ndk where it supports gcc. Please state exactly which older version worked for you. This will help other valgrind developers now, and encourage maintainers to enhance future support so that the underlying problem gets fixed.

Re: [Valgrind-users] Cross compilation issue for Android

2022-06-26 Thread John Reiser
Upon moving to next. It landed into another issue. seems it is not easy to cross compile the valgrind to Android as they mentioned https://valgrind.org/docs/manual/dist.readme-android.html Should i need to contact valgrind developers

Re: [Valgrind-users] Question: bug in user code, valgrind or glibc?

2022-05-21 Thread John Reiser
This looks like https://bugs.kde.org/show_bug.cgi?id=434764 iconv_open causes ld.so v2.28+ to use optimised strncmp Which was recently (but after 3.19.0) fixed by merging this commit: commit 947388eb043ea1c44b37df94046e1eee790ad776 Author: Mike Crowe AuthorDate: Mon Sep 9 14:16:16 2019

Re: [Valgrind-users] Question: bug in user code, valgrind or glibc?

2022-05-21 Thread John Reiser
This indicates that 'strncmp' should be re-directed from ld-linux-x86-64.so.2: That was done already in valgrind-3.19.0. The user problem was reported against: - ==4295== Memcheck, a memory error detector ==4295== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==4295==

Re: [Valgrind-users] Question: bug in user code, valgrind or glibc?

2022-05-21 Thread John Reiser
I sent a log of redirect information to both Paul and John since the log was too large was mailing list. I wonder what would be the preferred public sharing site for such a purpose these days. The preferred way is to create a bug report, attach the large file to the bug report, then post

Re: [Valgrind-users] Question: bug in user code, valgrind or glibc?

2022-05-20 Thread John Reiser
(Wait, I see  "279:13.65 GECKO(392456) ==392459==    by 0x488D2D3: dlopen@@GLIBC_2.2.5 (dlopen.c:87)" Version 2.2.5 is not the same as the version reported for glibc. Hmm? ) The "@@GLIBC_2.2.5" is the linking symbol version assigned by glibc. This effectively is an ABI version, and the ABI for

Re: [Valgrind-users] Question about Valgrind tool in Intel new platform

2022-04-21 Thread John Reiser
On 4/20/22 05:18, Yang Zhong wrote: The AMX is the NEW feature in Intel new platform and from host, we can find below cpu flags: amx_bf16, amx_tile, amx_int8 The SPEC can be found in:

Re: [Valgrind-users] Memory leak not detected

2022-01-06 Thread John Reiser
I think I found the problem. It seems valgrind doesn't detect memory leaks related to mmap. Why is this the case? A memory leak is a block that is allocated by malloc/calloc/realloc/reallocarray, not yet free()d, and with no in-process pointers to it. mmap is not malloc, and the result of

Re: [Valgrind-users] Possible bug in valgrind uninitialized variable detection (negative array index)

2021-11-10 Thread John Reiser
At 2021-11-10 01:18Z, Kyryl Melekhin wrote: Ok, stop. I forgot, the executables likely won't work because my MuslC was -march native optimized. And obviously static linking will include that code. Whn I look at this file: $ ls -l piketcc # compiled by tcc -rwxr-xr-x. 1 user group

Re: [Valgrind-users] Possible bug in valgrind uninitialized variable detection (negative array index)

2021-11-09 Thread John Reiser
On 11/9/21 14:16, Kyryl Melekhin wrote: Hello, I am almost certain to have found a bug in valgrind. The false positive error appears only when compiled with tcc compiler. The platform is x86_64 linux, musl. I can reproduce it in my regex engine and I have created the following branch for you

Re: [Valgrind-users] Very slow execution under Fedora 34

2021-09-05 Thread John Reiser
I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind runs in less than a second, but on Fedora 34 is very slow, several minutes slow. On Fedora 34 it looks like the time spent is reading symbols. This is

Re: [Valgrind-users] Why valgrind can't see this error?

2021-09-03 Thread John Reiser
On 9/3/21 12:31 PM, Eric Chamberland wrote: Hi, I have a simple test and valgrind seems to not see the error: cat fread.cc && clang++ -o fread fread.cc && valgrind ./fread #include #include #include int main(int argc, char ** argv){     int lA {1};     FILE * f = fopen ( argv[0] , "rb"

Re: [Valgrind-users] Valgrind terminates at AVX instruction with "unrecognised instruction"

2021-08-21 Thread John Reiser
I'm using Valgrind 3-13-0 on Ubuntu 18.04.  The package repository has 3-13-0 as its latest version, so if I want 3-17-0 I will need to install from source.  But my question is about AVX instructions that have been supported since before 3-13-0. Copy+Paste the entire error message here,

Re: [Valgrind-users] how to attach valgrind to more than one process at a time

2021-05-31 Thread John Reiser
if i want to attach the valgrind for more than one process at the same time what is the command/option to use. There is no such command or option. Each valgrind tool applies to only one process. The closest you can come is to invoke each process using a (separate) valgrind tool.

Re: [Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-27 Thread John Reiser
For the example given, the backtrace command of gdb-8.3 already displays 80% of the requested information for code compiled by g++-9.3.1 using -g. The request: > If compiled with -g, the debug output will display > (1) C/C++ names down into the standard library > (2) source code names and

Re: [Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-24 Thread John Reiser
On 5/24/21, Martin Licht via Valgrind-users wrote: I think the Valgrind stack tracer is pretty great and I would like to use it as a substitute for `backtrace` in my C++ debug builds. It would help to give an explicit list of why valgrind's backtrace() is "pretty great" in contrast to

Re: [Valgrind-users] printing the values of arguments for strcpy(3), memmove(3), ...

2021-01-26 Thread John Reiser
The reason was at the end of debugging that we replaced in some central place of the server a function call (due to vg messages about overlapping args) strncpy(dst, src, n); by memset(dst, 0, n); memmove(dst, src, n); which is not fully equivalent because strncpy(3)

Re: [Valgrind-users] [Need Help] Valgrind on Cavium-Octeon-3

2021-01-10 Thread John Reiser
mihir amrelia wrote: file /var/tmp/cavium/bin/valgrind /var/tmp/cavium/bin/valgrind: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (SYSV), dynamically linked, interpreter /lib64-f, for GNU/Linux 2.6.32, not stripped How to fix this? Tom Hughes via Valgrind-users wrote: No idea -

Re: [Valgrind-users] 3.16.1 RPi 3b+

2020-12-07 Thread John Reiser
On 2020-12-07 20:22 UTC, John A wrote: [[attachment smime.p7m]] Send the body of the message in plain text, perhaps crypto-signed with the signature in an attachment. Nobody pays any attention to a .p7m body. ___ Valgrind-users mailing list

Re: [Valgrind-users] Automated report for valgrind

2020-11-16 Thread John Reiser
I would like to ask if there is any automated reporting tool which processes the output of the valgrind tool and also scans the code in order to do a "blame" or "annotate" per developer. The real error (the place that needs fixing) can be several levels up the call chain, and in C++ is not

Re: [Valgrind-users] running valgrind on dpdk

2020-09-29 Thread John Reiser
On 2020-09-29 Prujan, Michael wrote: I’m running valgrind-3.16.1 on application with DPDK. I got the following errors: ERROR: This system does not support "FSGSBASE". That's correct: the virtual machine that valgrind exports to the app, does not support FSGSBASE. The valgrind source says:

Re: [Valgrind-users] Partial heap profiling with Massif

2020-09-17 Thread John Reiser
On 2020-09-17 LEPAREUR Loic wrote: Several years ago, I developed a Massif patch to let the client code select which part of the code should be profiled with Massif. Today this is much less interesting unless you compare and contrast with https://github.com/KDE/heaptrack . Do a web search

Re: [Valgrind-users] massif & counts per type

2020-09-11 Thread John Reiser
On 2020-09-11 at 10:50 UTC, folkert wrote: [snip]] This morning I came up with an other solution: I made a LD_PRELOAD wrapper which counts every malloc-call. Decided that allocated-type is not really required in my case, but to know which malloc did it would work as well. For a random C++

Re: [Valgrind-users] compat_ioctl cmd does not match even if it shows same value

2020-08-16 Thread John Reiser
long mgr_compat_ioctl(struct file *pFile, unsigned int cmd, unsigned long arg) { int err = -EFAULT; //unsigned int openLink = kIoctlOpenEthernetLink; unsigned int openLink = 3222829167; "3222829167" is not a legal 32-bit value in source code. You MUST use "3222829167u" with a

Re: [Valgrind-users] compat_ioctl cmd does not match even if it shows same value

2020-08-15 Thread John Reiser
I have a 32 bit application (user space) which communicate with a kernel module through compat_ioctl(). My system is # uname -a Linux chassis1-board1-port5 3.10 #1 SMP Fri Apr 24 02:31:48 PDT 2020 mips64 GNU/Linux Which version of valgrind? The source code of valgrind: commit

Re: [Valgrind-users] Original Path

2020-07-20 Thread John Reiser
On 7/20/20 23:14 UTC, Chithkala Dhulipati wrote: I wanted to use valgrind for profiling my programs. What I am looking for is a list of functions called and a path to those functions. When I previously used gprof for this, there was no option that could produce the original path where the

Re: [Valgrind-users] MySQL related messages

2020-06-07 Thread John Reiser
After a few private emails and --num-callers=50, then the original poster reports: mysql_library_end() was missing. Error messages have gone now. ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net

Re: [Valgrind-users] MySQL related messages

2020-06-07 Thread John Reiser
On 6/7/20 16:11 UTC, James Read wrote: Any idea what this means?: ==56082== 16,528 bytes in 1 blocks are possibly lost in loss record 409 of 409 Help yourself; that question is bad lazy. There is a manual with extensive documentation. A brief search of the web will reveal the answer. The

Re: [Valgrind-users] DHAT speed

2020-05-27 Thread John Reiser
On 5/27/20 Paul FLOYD wrote: Well, no real surprises. This is with a testcase that runs standalone in about 5 seconds and under DHAT in about 200 seconds (so a reasonable slowdown of 40x). # Overhead Command Shared Object Symbol # ... ..

Re: [Valgrind-users] DHAT speed

2020-05-26 Thread John Reiser
> So (4 * 5 * 10 * 3) is a slowdown of 600X, which turns 10 minutes into 100 hours. What I'm seeing is a DHAT-only slowdown that is much more than that. Running 'perf' is likely to give data and strong hints about what is going on. The overhead of 'perf' is only a few percent. perf

Re: [Valgrind-users] DHAT speed

2020-05-26 Thread John Reiser
The server has 48Gbytes of RAM and only about 6Gbytes is being used. The executable is quite big text data bss dec hex filename 57369168 417156 20903108 78689432 4b0b498 [snip] The run under DHAT is using about 2Gbytes virtual and 1.5Gbytes resident according to htop. Running standalone those

Re: [Valgrind-users] DHAT speed

2020-05-26 Thread John Reiser
On 5/26/20, Paul FLOYD wrote: I'm running DHAT on what I consider to be a relatively small example. Standalone the executable runs in a bit under 10 minutes. Based on the CPU time that we print after every 10% of progress, under DHAT the same executable is going to take about 422 hours -

Re: [Valgrind-users] How to disable leak check from inside a program

2020-05-22 Thread John Reiser
What would help a lot is to have a VALGRIND request, like VALGRIND_DO_CLIENT_REQUEST_STMT, that we could use in our signal handler to turn off leak checking. In valgrind-3.16 (to be released in 3 days; RC2 available today) see valgrind --help-dyn-options

Re: [Valgrind-users] HELP/Hint: valgrind error message

2020-05-15 Thread John Reiser
Below is the error coming when running valgrind , Do not know how to tackle it valgrind --tool=memcheck  ./lte_tr069 ==6660== ==6660== Warning: Can't execute setuid/setgid/setcap executable: ./lte_tr069 ==6660== Possible workaround: remove --trace-children=yes, if in effect ==6660== valgrind:

Re: [Valgrind-users] Spurious errors during an abrupt program termination

2020-05-14 Thread John Reiser
On 5/14/20, Dalon Work wrote: I have an application with two threads on linux which I was testing under valgrind. We have a strange memory behavior that is leading to an internal assert terminating the application, hence the investigation. After running the application, I have many, many

Re: [Valgrind-users] Calling arbitrary guest functions

2020-03-03 Thread John Reiser
I am trying to make a tool that intercepts the call to main, and then call an arbitrary function within the guest with arbitrary function arguments. This can be done without valgrind by using LD_PRELOAD environment variable and RTLD_NEXT (see "man dlsym"): LD_PRELOAD=main_interceptor.so

Re: [Valgrind-users] detecting uninitialized values in debug builds

2020-03-02 Thread John Reiser
On 3/2/20 22:02 UTC, Ben White wrote: I’ve also been told that the g++ compiler will initialize all stack objects to zero when compiling for debug (the -g option). Obviously you didn't try it. g++ 9.2.1 does not do that. $ cat foo.cpp int g(int x, int y); int f(int x) { int y;

Re: [Valgrind-users] valgrind: Unrecognised instruction

2020-02-05 Thread John Reiser
vex amd64->IR: unhandled instruction bytes: 0xF3 0xF 0x1E 0xFA 0x41 0x56 0x41 0x89 Follow the Bug Reports link at http://valgrind.org to file a bug report at http://bugs.kde.org/query.cgi?format=specific . Please be sure to state the version of valgrind. Run "valgrind --version". The

Re: [Valgrind-users] Valgrind Internal Error: Valgrind received a signal 11 (SIGSEGV) - exiting

2020-01-30 Thread John Reiser
3. How much physical RAM? How much swap space? (The string "out_of_memory" appears in the output.) JK - [    0.00] 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. Run

Re: [Valgrind-users] Valgrind Internal Error: Valgrind received a signal 11 (SIGSEGV) - exiting

2020-01-30 Thread John Reiser
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.

Re: [Valgrind-users] Don't Instrument Wrapped Functions

2020-01-25 Thread John Reiser
On 1/25/20 5:28 PM, Ausitn Gadient wrote: Hello! Is there a clean way to prevent Valgrind from adding instrumentation to wrapped functions? For example, if I have a wrapper for the libc function “read()”, I do not want to instrument “read()’s” code. Which tool(s) do you mean? valgrind is

Re: [Valgrind-users] valgrind: Heap block lo/hi size mismatch when trying to debug a C++ program running inside Docker container

2019-11-12 Thread John Reiser
On 11/13/19 at 04:18 UTC, Karthik Jayaraman wrote: When trying to debug my C++ binary, I am running into the following issue. valgrind: m_mallocfree.c:307 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed. valgrind : Heap block lo/hi size mismatch: lo = 1, hi = 4294967295. This is

Re: [Valgrind-users] Building and Installing vlagrind 3.15.0 in an embedded Linux cross-compile environment

2019-10-15 Thread John Reiser
I am having some issues with the valgrind 3.15.0 build and install in a cross-compile environment where the resultant code is to run on a router which is embedded Linux. You must create an absolute path name (starts with '/') that is the same (as a character string) on the machine which does

Re: [Valgrind-users] seemingly bogus error reports

2019-09-14 Thread John Reiser
==00:00:00:11.329 1533== Conditional jump or move depends on uninitialised value(s) ==00:00:00:11.329 1533==    at 0x7B0BCC2: ttci2n (in /home/interface/interface/oralib-12/lib/libclntsh.so.12.1) [[snip]] ==00:00:00:11.329 1533==  Uninitialised value was created by a stack allocation

Re: [Valgrind-users] Running Valgrind on ndmp

2019-08-30 Thread John Reiser
1.      service ndmpd stop 2.       service ndmpd start 3.       valgrind -v --num-callers=50 --log-file=ndmp_valgrind_30_8.log --leak-check=full /usr/local/ndmp/ndmpd echo $? Returns 1 after the 3rd command. Does running ndmpd "by hand" work as the third step? 3. /usr/local/ndmp/ndmpd & #

Re: [Valgrind-users] Can't see the actual vars

2019-07-22 Thread John Reiser
==3232== Syscall param stat64(file_name) points to uninitialised byte(s) file_name is the first (leftmost) parameter. ==3232==    at 0x49FD6B8: _xstat (xstat.c:48) ==3232==    by 0x41F23: stat (stat.c:51) ==3232==    by 0x1EC93: getList (util.c:1379) > Looking at line 1379 from util.c: > if

Re: [Valgrind-users] --track-origins option is not working

2019-06-25 Thread John Reiser
On 6/25/19 09:57 UTC, subhasish Karmakar wrote: Hi,> Can someone help me to resolve this issue. Did you read Julian Seward's response of Mon, 24 Jun 2019 21:10:48 +0200 ? What does the shell command file /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so report? If the output contains the

Re: [Valgrind-users] Error report: Valgrind hangs after SIGKILL

2019-06-24 Thread John Reiser
I have detected the following issue while running Valgrind on a multi-threaded application. Valbrind hangs if the application raises the signal SIGKILLl to suicide. Is the hang reproducible in a small test case, such as only two threads that do "nothing" except possibly wait for synchronization

Re: [Valgrind-users] Git access not possible

2019-06-12 Thread John Reiser
My computer is located in Germany, and I cannot clone the source with git (git://sourceware.org/git/valgrind.git). If you post a copy+paste transcript of a terminal session which shows the _exact_ command and error message, then it is likely that you may get better suggestions.

Re: [Valgrind-users] POSIX pthread counter (integer) overflow in valgrind drd_vc.c

2019-06-08 Thread John Reiser
|drd: drd_vc.c:96 (vgDrd_vc_increment): Assertion 'oldcount < vc->vc[i].count' failed. My program was running a quite large volume of data (millions of records). How many millions, and how long does the program run, both with an without drd? It's quite possible to overflow the 'count', which

Re: [Valgrind-users] identifying possible leak

2019-05-13 Thread John Reiser
=16595== 1,008 bytes in 3 blocks are possibly lost in loss record 155 of 1,524 ==16595==    at 0x483AB65: calloc (vg_replace_malloc.c:752) ==16595==    by 0x4012A32: allocate_dtv (in /usr/lib/ld-2.29.so ) ==16595==    by 0x40133E1: _dl_allocate_tls (in /usr/lib/ld-2.29.so

Re: [Valgrind-users] 答复: Some question about linker dlopen with valgrind

2019-04-28 Thread John Reiser
On 4/24/2019 0128 UTC, Wuweijia wrote: Android Q The libc source as below: The purpose of a test case is to reproduce the problem. What you wrote fails badly. It does not compile, under ANY compiler: functions are used before they are declared. It does not have the necessary #include

Re: [Valgrind-users] Some question about linker dlopen with valgrind

2019-04-23 Thread John Reiser
   On the Android OS,  there is a question about the linker program with vaglrind memcheck. Which version of Android?    The 1^st  experiment,  the libc module *do*call the dlopen function to load some shared object, before the linker  call the pre_init functions (   before

Re: [Valgrind-users] Some question about linker dlopen with valgrind

2019-04-23 Thread John Reiser
  On the Android OS,  there is a question about the linker program with vaglrind memcheck;   The 1^st  experiment,  the libc module *do*call the dlopen function to load some shared object, before the linker  call the pre_init functions (   before transfer the cpu control to

Re: [Valgrind-users] 答复: [HELP] Android use LD to link the program but the valgrind can not report malloc leak;

2019-04-09 Thread John Reiser
On 4/8/19 4:54 PM, Wuweijia wrote: localhost:/system/bin # ./valgrind -v --undef-value-errors=no ./test ==30806== Memcheck, a memory error detector ==30806== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==30806== Using Valgrind-3.14.0-353a3587bb-20181007X and LibVEX; rerun

Re: [Valgrind-users] [HELP] Android use LD to link the program but the valgrind can not report malloc leak;

2019-04-07 Thread John Reiser
Elf file type is DYN (Shared object file) Entry point 0x47000 There are 9 program headers, starting at offset 64 Program Headers:   Type   Offset   VirtAddr   PhysAddr   FileSiz  MemSiz   Flg Align   PHDR   0x40 0x0040 0x0040

Re: [Valgrind-users] Valgrind on Android Suppressions

2019-03-29 Thread John Reiser
There's a bunch of errors reported [by valgrind] from the dynamic linker on Android, that I think can be suppressed. For memory leaks, particularly if related to static initialization and/or are bounded in small total size, then probably they can be added to a list of errors to suppress by

Re: [Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-22 Thread John Reiser
==24390== Uninitialised value was created by a stack allocation ==24390==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so) ==24390== Can you check what file/line nr corresponds to 0x8B43AF0, using another tool (gdb, or whatever) ? Looks like this is near to 0x8B5DC3A:

Re: [Valgrind-users] Getting Valgrind securely

2019-03-14 Thread John Reiser
*And* I have to clone the whole git repo when really I just want to install the current release of the program That is by design. If *you* want to get the bits that way, then *you* must build valgrind. Besides, the repo is not large, and building it is not long. Someone whose email address

Re: [Valgrind-users] OT: Where is the location of Bzip2 download?

2019-03-06 Thread John Reiser
Where is the location of Bzip2 nowadays? In practice: download the source to the .rpm package (Fedora, Red Hat, SuSE) or the .deb package (Debian, etc.). Within that is the original source used by maintainers of the .rpm or .deb. For instance on Fedora: $ dnf download --source bzip2

Re: [Valgrind-users] Does valgrind work with Boehm garbage collector?

2019-02-18 Thread John Reiser
    The execution recipe works for me on Fedora 28 using valgrind-3.14.0-7.fc28.x86_64. Also, the default on Mac is to use addresses greater than (1ul<<32). Because the program works when _not_ run under valgrind, then the conclusion is that valgrind-3.14.0-7 has a bug where it stores an

Re: [Valgrind-users] Does valgrind work with Boehm garbage collector?

2019-02-18 Thread John Reiser
The execution recipe works for me on Fedora 28 using valgrind-3.14.0-7.fc28.x86_64. I omitted dsymutil.  Why is it essential for you? It is not essential. Therefore omitting dsymutil will narrow the search for the problem(s). $ rpm -q clang clang-6.0.1-2.fc28.x86_64 Why

Re: [Valgrind-users] Does valgrind work with Boehm garbage collector?

2019-02-18 Thread John Reiser
==23299== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==23299== Command: ./main.l.exe ==23299== ==23299== Conditional jump or move depends on uninitialised value(s) ==23299==    at 0x4E4D166: GC_push_all_eager (in /usr/lib64/libgc.so.1.3.2) ==23299==    by 0x4E49D21: ???

Re: [Valgrind-users] Does valgrind work with Boehm garbage collector?

2019-02-18 Thread John Reiser
On 2/17/19, Peng Yu wrote: $ flex -o main.l.c main.l $ clang -I. -DGC_DEBUG -Wall -pedantic -g -c -o main.l.o main.l.c # rapidstring.h is in . $ clang main.l.o -lgc -lfl -o main.l.exe $ dsymutil main.l.exe What is 'dsymutil', where did you get it, what version? What is the hardware

  1   2   3   4   5   >