Hi,

First of all, thank you for sharing this great package.

I encountered a strange bug (?) while trying to use valgrind to
validate the operation of a binary produced when I was testing Mozilla
Thunderbird operation.

The observation is with valgrind -3.12.0 SVN which was compiled last
November.  the copyright header shows this.

==11405== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==11405== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for 
copyright info

Now the problem.
As soon as the binary is run under valgrind, valgrind printed many 
warnings like the following.


--11405-- WARNING: Serious error when reading debug info
--11405-- When reading debug info from 
/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.3:
--11405-- Ignoring non-Dwarf2/3/4 block in .debug_info
--11405-- WARNING: Serious error when reading debug info
--11405-- When reading debug info from 
/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.3:
--11405-- Last block truncated in .debug_info; ignoring
--11405-- WARNING: Serious error when reading debug info
--11405-- When reading debug info from 
/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.3:
--11405-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
--11405-- WARNING: Serious error when reading debug info
--11405-- When reading debug info from 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4600.2:
--11405-- Ignoring non-Dwarf2/3/4 block in .debug_info
--11405-- WARNING: Serious error when reading debug info
--11405-- When reading debug info from 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4600.2:
--11405-- Last block truncated in .debug_info; ignoring
--11405-- WARNING: Serious error when reading debug info
--11405-- When reading debug info from 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4600.2:

           There are  more repetitions for different libraries

This is under Debian GNU/Linux 64-bit version.

uname -a outoup:
Linux ip030 3.19.5 #1 SMP Mon Apr 20 08:50:21 JST 2015 x86_64 GNU/Linux

Say, for the last library file in the warning lines, |file| command 
printed something like this.
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4600.2: ELF 64-bit LSB shared 
object, x86-64, version 1 (SYSV), dynamically linked, 
BuildID[sha1]=f7cf7ddb040d36cb8709e6403bc19be4570754d6, stripped

Since I could link the binary using GNU LD (gold) without an obvious
issue to compile and build mozilla thunderbird locally under linux
64-bit on this PC, the library is not completely broken, I suppose.

Now using google and search for hits with the string "Ignoring
non-Dwarf2/3/4 block in .debug_info"
I immediately find a few hits:

The first one is about valgrind operation on ARM CPU.
http://sourceforge.net/p/valgrind/mailman/valgrind-users/thread/4e8534c5.6000...@bitwagon.com/
It mentions something about unaligned access.
But mine is x86_64 CPU and hugely popular one. Beside, I think x86 can 
read at any
octet boundary albeit minor performance loss if alignment is not perfect.
So I doubt anything like the ARM issue may exist. Correct ?

Second hit is from Feb 2015.
https://bugs.kde.org/show_bug.cgi?id=338781
which explains maybe "--read-var-info=yes" can be a problem (Is it on by 
default?)
and "--read-var-info=no" may solve the issue.
But it turns out it is an OSX issue. And maybe the compiler is from llvm.

The next three entries are from the same Debian bug entry.

Anyway, I tried to add --read-var-info=no, but it did not help.

The following is an excerpt from the log:
E.g.: Please understand that the invocation of valgrind is part of
a test harness and so I have to show the log line which showed how the
valgrind is invoked:

  0:01.09 PROCESS_OUTPUT: Thread-1 (pid:12190) Full command: 
['/usr/local/bin/valgrind', '--read-var-info=no', 
'--read-inline-info=no', 
'/NREF-COMM-CENTRAL/objdir-tb3/dist/bin/xpcshell', '-g', 
'/NREF-COMM-CENTRAL/objdir-tb3/dist/bin', '-a', 
'/NREF-COMM-CENTRAL/objdir-tb3/dist/bin', '-r', 
'/NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/httpd.manifest', 
'-m', '-s', '-e', 'const _HEAD_JS_PATH = 
"/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js";', 
'-e', 'const _MOZINFO_JS_PATH = 
"/tmp/xpc-profile-fcjmuR/mozinfo.json";', '-e', 'const 
_TESTING_MODULES_DIR = 
"/NREF-COMM-CENTRAL/objdir-tb3/_tests/modules/";', '-f', 
'/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js', 
'-p', '/tmp/xpc-plugins-wGKRGS', '-e', 'const _SERVER_ADDR = 
"localhost"', '-e', 'const _HEAD_FILES = [];', '-e', 'const _TAIL_FILES 
= [];', '-e', 'const _JSDEBUGGER_PORT = 0;', '-e', 'const _TEST_FILE = 
["/NREF-COMM-CENTRAL/objdir-tb3/_tests/xpcshell/caps/tests/unit/test_origin.js"];',
 
'-e', 'const _TEST_NAME = "caps/tests/unit/test_origin.js"', '-e', 
'_execute_test(); quit(0);']
(pid:12190) "==12190== Memcheck, a memory error detector"
  0:01.09 PROCESS_OUTPUT: Thread-1 (pid:12190) "==12190== Copyright (C) 
2002-2015, and GNU GPL'd, by Julian Seward et al."
  0:01.09 PROCESS_OUTPUT: Thread-1 (pid:12190) "==12190== Using 
Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info"
  0:01.09 PROCESS_OUTPUT: Thread-1 (pid:12190) "==12190== Command: 
/NREF-COMM-CENTRAL/objdir-tb3/dist/bin/xpcshell -g 
/NREF-COMM-CENTRAL/objdir-tb3/dist/bin -a 
/NREF-COMM-CENTRAL/objdir-tb3/dist/bin -r 
/NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/httpd.manifest -m -s 
-e const\\ _HEAD_JS_PATH\\ =\\ 
"/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js"; -e 
const\\ _MOZINFO_JS_PATH\\ =\\ "/tmp/xpc-profile-fcjmuR/mozinfo.json"; 
-e const\\ _TESTING_MODULES_DIR\\ =\\ 
"/NREF-COMM-CENTRAL/objdir-tb3/_tests/modules/"; -f 
/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js -p 
/tmp/xpc-plugins-wGKRGS -e const\\ _SERVER_ADDR\\ =\\ "localhost" -e 
const\\ _HEAD_FILES\\ =\\ []; -e const\\ _TAIL_FILES\\ =\\ []; -e 
const\\ _JSDEBUGGER_PORT\\ =\\ 0; -e const\\ _TEST_FILE\\ =\\ 
["/NREF-COMM-CENTRAL/objdir-tb3/_tests/xpcshell/caps/tests/unit/test_origin.js"];
 
-e const\\ _TEST_NAME\\ =\\ "caps/tests/unit/test_origin.js" -e 
_execute_test();\\ quit(0);"
  0:01.09 PROCESS_OUTPUT: Thread-1 (pid:12190) "==12190== "
  0:10.66 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- WARNING: 
Serious error when reading debug info"
  0:10.66 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- When reading 
debug info from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.3:"
  0:10.66 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- Ignoring 
non-Dwarf2/3/4 block in .debug_info"
  0:10.66 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- WARNING: 
Serious error when reading debug info"
  0:10.66 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- When reading 
debug info from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.3:"
  0:10.66 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- Last block 
truncated in .debug_info; ignoring"
  0:10.68 PROCESS_OUTPUT: Thread-1 (pid:12190) "--12190-- WARNING: 
Serious error when reading debug info"

  ...


So it seems that the latest compiler/linker combination has produced the 
library
may not be producing library which valgrind expects to see.

What can I do to alert the GNU binutils and/or GCC people (does Debian 
use llvm compiler lately?) about this issue? And in what manner. I am 
not sure if I understand the cause of the issue completely.
All I can say is that the format is not compatible or something.
I can send the offending library on request.

Thank you in advance for your attention.

CI


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to