|
From: Pasquale T. <tri...@gm...> - 2005-01-27 01:53:49
|
Hi, I'm using valgrind 2.2.0 (debian 3.1 testing) to debug a multi-thread Qt based application, using the helgrind tool. With the previous Qt version (3.3.3), valgrind was working fine, while now that the application is linked to Qt 3.3.4 i get this: ---begin--- valgrind --tool=helgrind ./orsa/xorsa ==11691== Helgrind, a data race detector for x86-linux. ==11691== Copyright (C) 2002-2004, and GNU GPL'd, by Nicholas Nethercote et al. ==11691== Using valgrind-2.2.0, a program supervision framework for x86-linux. ==11691== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al. ==11691== For more details, rerun with: -v ==11691== Helgrind: hg_main.c:2219 (vgSkin_instrument): Assertion `1 == u_in->size || 2 == u_in->size || 4 == u_in->size || 8 == u_in->size || 10 == u_in->size || 108 == u_in->size' failed. ==11691== at 0xB002FF57: vgPlain_skin_assert_fail (vg_mylibc.c:1137) ==11691== by 0xB002FF56: assert_fail (vg_mylibc.c:1133) ==11691== by 0xB002FF8E: vgPlain_skin_assert_fail (vg_mylibc.c:1138) ==11691== by 0xB7C56E1E: vgSkin_instrument (hg_main.c:2236) sched status: Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 ==11691== at 0x1E23E8E0: feholdexcept (in /lib/tls/libm-2.3.2.so) ==11691== by 0x1DA7A18C: QLocalePrivate::doubleToString(double, int, QLocalePrivate::DoubleForm, int, unsigned) const (in /home/tricaric/usr/local/qt-x11-free-3.3.4/lib/libqt-mt.so.3.3.4) ==11691== by 0x1DA97B2F: QString::setNum(double, char, int) (in /home/tricaric/usr/local/qt-x11-free-3.3.4/lib/libqt-mt.so.3.3.4) ==11691== by 0x1DA97F87: QString::number(double, char, int) (in /home/tricaric/usr/local/qt-x11-free-3.3.4/lib/libqt-mt.so.3.3.4) Note: see also the FAQ.txt in the source distribution. It contains workarounds to several common problems. If that doesn't help, please report this bug to: valgrind.kde.org In the bug report, send all the above text, the valgrind version, and what Linux distro you are using. Thanks. ---end--- Any suggestion? Thanks, Pasquale |
|
From: Ilkka H. <ihu...@cc...> - 2005-01-27 15:16:56
|
I'm using Gentoo Linux 2.4. I installed Valgrind yesterday, first with emerge tool, then compiling manually from the sources. Either way, whenever I try to run it, I get this: # valgrind Executable range 0xb0000000-0xb01f4b40 is outside the acceptable range 0x80d0000-0x7ffff000 valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate memory Wine is not in use, I try to use the normal Valgrind. # valgrind -v Executable range 0xb0000000-0xb01f4b40 is outside the acceptable range 0x80d0000-0x7ffff000 valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate memory # uname -a Linux nd2 2.4.26-gentoo-r13 #1 Tue Dec 21 15:20:48 EET 2004 i686 Mobile AMD Athlon(tm) XP 2200+ AuthenticAMD GNU/Linux Do you have any ideas what might be wrong? Ilkka |
|
From: Bill R. Jr. <bru...@te...> - 2005-01-28 16:14:06
|
On Thu, Jan 27, 2005 at 05:16:48PM +0200, Ilkka Huotari wrote:
> Either way, whenever I try to run it, I get this:
> # valgrind
> Executable range 0xb0000000-0xb01f4b40 is outside the
> acceptable range 0x80d0000-0x7ffff000
> valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate memory
I'm no authority, but here's what I think is happening.
Your kernel is compiled with 2G/2G split, and Valgrind is compiled
assuming 3G/1G. When it attempts to load stage2 into the space
0xb0000000-0xbfffffff, it can't. A similar problem arises with the
1G-lowmem patch, which allows one to use all of 1GB of RAM without
enabling HIGHMEM, because it moves the kernel start from 0xc0000000
to 0xb0000000. I have valgrind built with the following patch:
--- valgrind-2.1.2/coregrind/Makefile.am.kickstart_base 2004-07-15 16:55:34.000000000 -0400
+++ valgrind-2.1.2/coregrind/Makefile.am 2004-12-09 18:15:33.259784388 -0500
@@ -80,7 +80,7 @@
vg_cpuid.S
stage2_DEPENDENCIES = $(srcdir)/valgrind.vs x86/stage2.lds
stage2_LDFLAGS=-Wl,--export-dynamic -Wl,-e,_ume_entry -g \
- -Wl,-defsym,kickstart_base=0xb0000000 \
+ -Wl,-defsym,kickstart_base=0xa0000000 \
-Wl,-T,x86/stage2.lds \
-Wl,-version-script $(srcdir)/valgrind.vs
stage2_LDADD= \
I don't know whether it will work, but you might try changing kickstart_base to
0x70000000.
Regards,
Bill Rugolsky
|
|
From: Nicholas N. <nj...@ca...> - 2005-01-27 15:55:56
|
On Wed, 26 Jan 2005, Pasquale Tricarico wrote: > I'm using valgrind 2.2.0 (debian 3.1 testing) to debug a multi-thread > Qt based application, using the helgrind tool. With the previous Qt > version (3.3.3), valgrind was working fine, while now that the > application is linked to Qt 3.3.4 i get this: > > Helgrind: hg_main.c:2219 (vgSkin_instrument): Assertion `1 == > u_in->size || 2 == u_in->size || 4 == u_in->size || 8 == u_in->size || > 10 == u_in->size || 108 == u_in->size' failed. Interesting... you could try adding a case "16 == u_in->size" on that line... that might work. If not, I'd be interested to know what the size value is... N |
|
From: Pasquale T. <tri...@gm...> - 2005-01-27 22:54:49
|
On Thu, 27 Jan 2005 13:39:21 +0000, Julian Seward <js...@ac...> wrote:
> Try adding 28 == u_in->size and 512 == u_in->size to that list --
> they appear to be missing.
Thank you. I've tried with 28, and that alone solves this specific
problem. In general, maybe 512 is needed too. I had to update two
different places (patch follows):
-------------
--- hg_main.c.ref 2005-01-27 14:36:29.000000000 -0800
+++ hg_main.c 2005-01-27 14:47:10.000000000 -0800
@@ -2130,8 +2130,8 @@
case MMX2_MemRd:
case FPU_R: {
- sk_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size ||
- 8 == u_in->size || 10 == u_in->size || 108 ==
u_in->size);
+ sk_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size ||
+ 8 == u_in->size || 10 == u_in->size || 28 ==
u_in->size || 108 == u_in->size);
t_size = newTemp(cb);
uInstr2(cb, MOV, 4, Literal, 0, TempReg, t_size);
@@ -2215,8 +2215,8 @@
case MMX2_MemWr:
case FPU_W: {
- sk_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size ||
- 8 == u_in->size || 10 == u_in->size || 108 ==
u_in->size);
+ sk_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size ||
+ 8 == u_in->size || 10 == u_in->size || 28 ==
u_in->size || 108 == u_in->size);
t_size = newTemp(cb);
uInstr2(cb, MOV, 4, Literal, 0, TempReg, t_size);
----------------------
Probably you can add this to the valgrind sources. Thanks a lot, Pasquale.
|