Debian Bug report logs -
#584912
valgrind: load i686 libraries while emulating an i586 CPU
Reported by: Gianluigi Tiesi <sherpya@netfarm.it>
Date: Sun, 6 Jun 2010 09:51:01 UTC
Severity: important
Tags: sid
Fixed in version valgrind/1:3.6.0~svn11254
Done: Andrés Roldán <aroldan@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 09:51:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Gianluigi Tiesi <sherpya@netfarm.it>:
New Bug report received and forwarded. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 09:51:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: libc6-i686
Version: 2.11.1-2
Severity: serious
Tags: sid
I'm unable to run valgrind without renaming /lib/i686
it asserts on:
.../sysdeps/x86_64/cacheinfo.c:255: handle_intel: Assertion `maxidx >= 2'
I've looked at sources and is_intel is true but my cpu is
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 4
model name : AMD Athlon(tm) processor
stepping : 2
cpu MHz : 899.968
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow up
bogomips : 1799.93
clflush size : 32
cache_alignment : 32
address sizes : 36 bits physical, 32 bits virtual
power management:
without libc6-i686 it works correctly
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages libc6-i686 depends on:
ii libc6 2.11.1-2 Embedded GNU C Library: Shared lib
libc6-i686 recommends no packages.
libc6-i686 suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 11:24:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 11:24:03 GMT) (full text, mbox, link).
Message #10 received at submit@bugs.debian.org (full text, mbox, reply):
On Sun, Jun 06, 2010 at 11:40:26AM +0200, Gianluigi Tiesi wrote:
> Package: libc6-i686
> Version: 2.11.1-2
> Severity: serious
> Tags: sid
>
> I'm unable to run valgrind without renaming /lib/i686
>
> it asserts on:
>
> .../sysdeps/x86_64/cacheinfo.c:255: handle_intel: Assertion `maxidx >= 2'
>
> I've looked at sources and is_intel is true but my cpu is
>
> processor : 0
> vendor_id : AuthenticAMD
> cpu family : 6
> model : 4
> model name : AMD Athlon(tm) processor
>
> stepping : 2
So it is an AMD Athlon Thunderbird CPU.
> cpu MHz : 899.968
> cache size : 256 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 1
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow up
No lm flag, so this CPU can't run 64-bit. This is consistent.
> bogomips : 1799.93
> clflush size : 32
> cache_alignment : 32
> address sizes : 36 bits physical, 32 bits virtual
> power management:
>
>
> without libc6-i686 it works correctly
>
>
>
> -- System Information:
> Debian Release: squeeze/sid
> APT prefers unstable
> APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: i386 (x86_64)
>
> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
This part is not consistent. Are you running reportbug on a different
machine?
> Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
> Shell: /bin/sh linked to /bin/dash
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 11:24:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 11:24:05 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 12:27:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Gianluigi Tiesi <sherpya@netfarm.it>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 12:27:06 GMT) (full text, mbox, link).
Message #20 received at 584748@bugs.debian.org (full text, mbox, reply):
On 06/06/2010 13.21, Aurelien Jarno wrote:
>>
>> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
>
> This part is not consistent. Are you running reportbug on a different
> machine?
yes
the problem is on a old amd 800mhz box, but I use a different box
for submitting
do you need some additional infos about the amd installation?
Regards
--
Gianluigi Tiesi <sherpya@netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 12:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 12:57:03 GMT) (full text, mbox, link).
Message #25 received at 584748@bugs.debian.org (full text, mbox, reply):
On Sun, Jun 06, 2010 at 02:17:29PM +0200, Gianluigi Tiesi wrote:
> On 06/06/2010 13.21, Aurelien Jarno wrote:
> >>
> >> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
> >
> > This part is not consistent. Are you running reportbug on a different
> > machine?
>
> yes
>
> the problem is on a old amd 800mhz box, but I use a different box
> for submitting
>
> do you need some additional infos about the amd installation?
>
Yes, which libc6 packages are actually installed? I have fixed a bug
that my cause the problem you are observing in version 2.11.1-2, so if
you are running version 2.11.1-1, please try to upgrade.
Also which kernel are you running?
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 20:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Gianluigi Tiesi <sherpya@netfarm.it>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 20:30:03 GMT) (full text, mbox, link).
Message #30 received at 584748@bugs.debian.org (full text, mbox, reply):
On 06/06/2010 14.55, Aurelien Jarno wrote:
> On Sun, Jun 06, 2010 at 02:17:29PM +0200, Gianluigi Tiesi wrote:
>> On 06/06/2010 13.21, Aurelien Jarno wrote:
>>>>
>>>> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
>>>
>>> This part is not consistent. Are you running reportbug on a different
>>> machine?
>>
>> yes
>>
>> the problem is on a old amd 800mhz box, but I use a different box
>> for submitting
>>
>> do you need some additional infos about the amd installation?
>>
>
> Yes, which libc6 packages are actually installed? I have fixed a bug
> that my cause the problem you are observing in version 2.11.1-2, so if
> you are running version 2.11.1-1, please try to upgrade.
>
> Also which kernel are you running?
libc is 2.11.1-2
kernel: Linux attila 2.6.32-5-686 #1 SMP Tue Jun 1 04:59:47 UTC 2010 i686 GNU/Linux
I known the problem with libc6-i686 and intel i7 I've reported some info too :)
this look different
Regards
--
Gianluigi Tiesi <sherpya@netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 21:06:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 21:06:03 GMT) (full text, mbox, link).
Message #35 received at 584748@bugs.debian.org (full text, mbox, reply):
On Sun, Jun 06, 2010 at 10:27:12PM +0200, Gianluigi Tiesi wrote:
> On 06/06/2010 14.55, Aurelien Jarno wrote:
> > On Sun, Jun 06, 2010 at 02:17:29PM +0200, Gianluigi Tiesi wrote:
> >> On 06/06/2010 13.21, Aurelien Jarno wrote:
> >>>>
> >>>> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
> >>>
> >>> This part is not consistent. Are you running reportbug on a different
> >>> machine?
> >>
> >> yes
> >>
> >> the problem is on a old amd 800mhz box, but I use a different box
> >> for submitting
> >>
> >> do you need some additional infos about the amd installation?
> >>
> >
> > Yes, which libc6 packages are actually installed? I have fixed a bug
> > that my cause the problem you are observing in version 2.11.1-2, so if
> > you are running version 2.11.1-1, please try to upgrade.
> >
> > Also which kernel are you running?
>
> libc is 2.11.1-2
> kernel: Linux attila 2.6.32-5-686 #1 SMP Tue Jun 1 04:59:47 UTC 2010 i686 GNU/Linux
>
> I known the problem with libc6-i686 and intel i7 I've reported some info too :)
It's not the problem with core i7, but a different one that has also
been corrected. One that breaks reading model and family in some
conditions.
> this look different
>
Unfortunately I am not able to reproduce it. Tried on an Athlon and on
Opteron CPU.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Sun, 06 Jun 2010 21:12:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Sun, 06 Jun 2010 21:12:03 GMT) (full text, mbox, link).
Message #40 received at 584748@bugs.debian.org (full text, mbox, reply):
On Sun, Jun 06, 2010 at 11:03:15PM +0200, Aurelien Jarno wrote:
> Unfortunately I am not able to reproduce it. Tried on an Athlon and on
> Opteron CPU.
>
I am just wondering, what is the version of valgrind, and how exactly do
you trigger the bug (valgrind command line, code, etc.)
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Mon, 07 Jun 2010 02:03:09 GMT) (full text, mbox, link).
Acknowledgement sent
to Gianluigi Tiesi <sherpya@netfarm.it>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Mon, 07 Jun 2010 02:03:09 GMT) (full text, mbox, link).
Message #45 received at 584748@bugs.debian.org (full text, mbox, reply):
On 06/06/2010 23.09, Aurelien Jarno wrote:
> On Sun, Jun 06, 2010 at 11:03:15PM +0200, Aurelien Jarno wrote:
>> Unfortunately I am not able to reproduce it. Tried on an Athlon and on
>> Opteron CPU.
>>
>
> I am just wondering, what is the version of valgrind, and how exactly do
> you trigger the bug (valgrind command line, code, etc.)
>
debian sid with latest packages from apt, apt-showversions says only uptodate
valgrind 1:3.5.0-3
to reproduce is enough:
valgrind /bin/ls
to be sure I don't have mixed loaded/not loaded libs I've also tried to reboot
do you have a test program? obviously it's not easy to compile elibc here :D
Regards
--
Gianluigi Tiesi <sherpya@netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Mon, 07 Jun 2010 02:15:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Gianluigi Tiesi <sherpya@netfarm.it>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Mon, 07 Jun 2010 02:15:03 GMT) (full text, mbox, link).
Message #50 received at 584748@bugs.debian.org (full text, mbox, reply):
On 06/06/2010 23.09, Aurelien Jarno wrote:
> On Sun, Jun 06, 2010 at 11:03:15PM +0200, Aurelien Jarno wrote:
>> Unfortunately I am not able to reproduce it. Tried on an Athlon and on
>> Opteron CPU.
>>
>
> I am just wondering, what is the version of valgrind, and how exactly do
> you trigger the bug (valgrind command line, code, etc.)
but are we sure the problem is in elibc and not in valgrind itself
that maybe mimics somehow an intel cpu ?
--
Gianluigi Tiesi <sherpya@netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Mon, 07 Jun 2010 06:51:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Mon, 07 Jun 2010 06:51:03 GMT) (full text, mbox, link).
Message #55 received at 584748@bugs.debian.org (full text, mbox, reply):
Aurelien Jarno a écrit :
> On Sun, Jun 06, 2010 at 10:27:12PM +0200, Gianluigi Tiesi wrote:
>> On 06/06/2010 14.55, Aurelien Jarno wrote:
>>> On Sun, Jun 06, 2010 at 02:17:29PM +0200, Gianluigi Tiesi wrote:
>>>> On 06/06/2010 13.21, Aurelien Jarno wrote:
>>>>>> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
>>>>> This part is not consistent. Are you running reportbug on a different
>>>>> machine?
>>>> yes
>>>>
>>>> the problem is on a old amd 800mhz box, but I use a different box
>>>> for submitting
>>>>
>>>> do you need some additional infos about the amd installation?
>>>>
>>> Yes, which libc6 packages are actually installed? I have fixed a bug
>>> that my cause the problem you are observing in version 2.11.1-2, so if
>>> you are running version 2.11.1-1, please try to upgrade.
>>>
>>> Also which kernel are you running?
>> libc is 2.11.1-2
>> kernel: Linux attila 2.6.32-5-686 #1 SMP Tue Jun 1 04:59:47 UTC 2010 i686 GNU/Linux
>>
>> I known the problem with libc6-i686 and intel i7 I've reported some info too :)
>
> It's not the problem with core i7, but a different one that has also
> been corrected. One that breaks reading model and family in some
> conditions.
>
>> this look different
>>
>
> Unfortunately I am not able to reproduce it. Tried on an Athlon and on
> Opteron CPU.
>
For your information, I have been able to find a machine with a CPU
identical to yours, and I am now able to reproduce the issue. I'll debug
it later today.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Mon, 07 Jun 2010 10:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Mon, 07 Jun 2010 10:21:03 GMT) (full text, mbox, link).
Message #60 received at 584748@bugs.debian.org (full text, mbox, reply):
On Mon, Jun 07, 2010 at 08:47:23AM +0200, Aurelien Jarno wrote:
> Aurelien Jarno a écrit :
> > On Sun, Jun 06, 2010 at 10:27:12PM +0200, Gianluigi Tiesi wrote:
> >> On 06/06/2010 14.55, Aurelien Jarno wrote:
> >>> On Sun, Jun 06, 2010 at 02:17:29PM +0200, Gianluigi Tiesi wrote:
> >>>> On 06/06/2010 13.21, Aurelien Jarno wrote:
> >>>>>> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
> >>>>> This part is not consistent. Are you running reportbug on a different
> >>>>> machine?
> >>>> yes
> >>>>
> >>>> the problem is on a old amd 800mhz box, but I use a different box
> >>>> for submitting
> >>>>
> >>>> do you need some additional infos about the amd installation?
> >>>>
> >>> Yes, which libc6 packages are actually installed? I have fixed a bug
> >>> that my cause the problem you are observing in version 2.11.1-2, so if
> >>> you are running version 2.11.1-1, please try to upgrade.
> >>>
> >>> Also which kernel are you running?
> >> libc is 2.11.1-2
> >> kernel: Linux attila 2.6.32-5-686 #1 SMP Tue Jun 1 04:59:47 UTC 2010 i686 GNU/Linux
> >>
> >> I known the problem with libc6-i686 and intel i7 I've reported some info too :)
> >
> > It's not the problem with core i7, but a different one that has also
> > been corrected. One that breaks reading model and family in some
> > conditions.
> >
> >> this look different
> >>
> >
> > Unfortunately I am not able to reproduce it. Tried on an Athlon and on
> > Opteron CPU.
> >
>
> For your information, I have been able to find a machine with a CPU
> identical to yours, and I am now able to reproduce the issue. I'll debug
> it later today.
>
Ok, here we go, it's a bit tricky.
First of all, newer versions of the glibc tries to optimise the string
function by using cache information, which are stored in cpuid level 2
and later on an Intel CPU.
Secondly, valgrind does not use the real CPU, but always emulates an
Intel one, trying to match the characteristics of the host CPU,
especially in term of instruction set. When the CPU has no SSE support
it emulates an old Pentium CPU, which have a max a cpuid level of 1.
This is what happens when the host CPU is an Athlon one.
The Pentium CPU is an i586 CPU, which does not support the CMOV
instruction, so the libc from the libc6 package is used. On the other
hand, the Athlon CPU is an i686 CPU, which does support the CMOV
instruction, so the libc from libc6-i686 is used.
Everything works well as long as you don't use valgrind. When you use
it, it loads all the libraries using the host CPUID, that is it loads
the libc from libc6-i686. It latter emulates a Pentium CPU, which has
a cpuid level of 1 only. The glibc code recognizes an Intel CPU (as
valgrind emulates it), and given it is the i686 version of the libc, it
assumes it is at minimum a Pentium Pro (which is the first i686 Intel
CPU), which means it assumes that the cpuid level is at 2. This is
where all the cache information is stored.
The bug really seems to be on the valgrind side, which should not load
an i686 library while emulating an i586 CPU. OTOH, if it is difficult
to fix, we can maybe remove assumptions that are correct, but wrong when
using valgrind.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#584748; Package libc6-i686.
(Mon, 07 Jun 2010 14:15:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Mon, 07 Jun 2010 14:15:04 GMT) (full text, mbox, link).
Message #65 received at 584748@bugs.debian.org (full text, mbox, reply):
severity 584748 important
clone 584748 -1
reassign -1 valgrind
retitle -1 valgrind: load i686 libraries while emulating an i586 CPU
thanks
On Mon, Jun 07, 2010 at 12:16:00PM +0200, Aurelien Jarno wrote:
> On Mon, Jun 07, 2010 at 08:47:23AM +0200, Aurelien Jarno wrote:
> > Aurelien Jarno a écrit :
> > > On Sun, Jun 06, 2010 at 10:27:12PM +0200, Gianluigi Tiesi wrote:
> > >> On 06/06/2010 14.55, Aurelien Jarno wrote:
> > >>> On Sun, Jun 06, 2010 at 02:17:29PM +0200, Gianluigi Tiesi wrote:
> > >>>> On 06/06/2010 13.21, Aurelien Jarno wrote:
> > >>>>>> Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/8 CPU cores)
> > >>>>> This part is not consistent. Are you running reportbug on a different
> > >>>>> machine?
> > >>>> yes
> > >>>>
> > >>>> the problem is on a old amd 800mhz box, but I use a different box
> > >>>> for submitting
> > >>>>
> > >>>> do you need some additional infos about the amd installation?
> > >>>>
> > >>> Yes, which libc6 packages are actually installed? I have fixed a bug
> > >>> that my cause the problem you are observing in version 2.11.1-2, so if
> > >>> you are running version 2.11.1-1, please try to upgrade.
> > >>>
> > >>> Also which kernel are you running?
> > >> libc is 2.11.1-2
> > >> kernel: Linux attila 2.6.32-5-686 #1 SMP Tue Jun 1 04:59:47 UTC 2010 i686 GNU/Linux
> > >>
> > >> I known the problem with libc6-i686 and intel i7 I've reported some info too :)
> > >
> > > It's not the problem with core i7, but a different one that has also
> > > been corrected. One that breaks reading model and family in some
> > > conditions.
> > >
> > >> this look different
> > >>
> > >
> > > Unfortunately I am not able to reproduce it. Tried on an Athlon and on
> > > Opteron CPU.
> > >
> >
> > For your information, I have been able to find a machine with a CPU
> > identical to yours, and I am now able to reproduce the issue. I'll debug
> > it later today.
> >
>
> Ok, here we go, it's a bit tricky.
>
> First of all, newer versions of the glibc tries to optimise the string
> function by using cache information, which are stored in cpuid level 2
> and later on an Intel CPU.
>
> Secondly, valgrind does not use the real CPU, but always emulates an
> Intel one, trying to match the characteristics of the host CPU,
> especially in term of instruction set. When the CPU has no SSE support
> it emulates an old Pentium CPU, which have a max a cpuid level of 1.
> This is what happens when the host CPU is an Athlon one.
>
> The Pentium CPU is an i586 CPU, which does not support the CMOV
> instruction, so the libc from the libc6 package is used. On the other
> hand, the Athlon CPU is an i686 CPU, which does support the CMOV
> instruction, so the libc from libc6-i686 is used.
>
> Everything works well as long as you don't use valgrind. When you use
> it, it loads all the libraries using the host CPUID, that is it loads
> the libc from libc6-i686. It latter emulates a Pentium CPU, which has
> a cpuid level of 1 only. The glibc code recognizes an Intel CPU (as
> valgrind emulates it), and given it is the i686 version of the libc, it
> assumes it is at minimum a Pentium Pro (which is the first i686 Intel
> CPU), which means it assumes that the cpuid level is at 2. This is
> where all the cache information is stored.
>
> The bug really seems to be on the valgrind side, which should not load
> an i686 library while emulating an i586 CPU. OTOH, if it is difficult
> to fix, we can maybe remove assumptions that are correct, but wrong when
> using valgrind.
>
I think the best is to fix this bug on both sides:
- Valgrind should present a cpuid consistent with the libraries it
loads
- There is no real reason in the GNU libc to trigger an assertion here,
0 can be returned for all the cache values here.
I am therefore cloning this bug and reassigning it to valgrind.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
Severity set to 'important' from 'serious'
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 07 Jun 2010 14:15:06 GMT) (full text, mbox, link).
Bug 584748 cloned as bug 584912.
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 07 Jun 2010 14:15:07 GMT) (full text, mbox, link).
Bug reassigned from package 'libc6-i686' to 'valgrind'.
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 07 Jun 2010 14:15:08 GMT) (full text, mbox, link).
Bug No longer marked as found in versions eglibc/2.11.1-2.
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 07 Jun 2010 14:15:09 GMT) (full text, mbox, link).
Changed Bug title to 'valgrind: load i686 libraries while emulating an i586 CPU' from '../sysdeps/x86_64/cacheinfo.c:255: handle_intel: Assertion `maxidx >= 2' on AMD cpu'
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 07 Jun 2010 14:15:09 GMT) (full text, mbox, link).
Reply sent
to Andrés Roldán <aroldan@debian.org>:
You have taken responsibility.
(Mon, 09 Aug 2010 16:06:17 GMT) (full text, mbox, link).
Notification sent
to Gianluigi Tiesi <sherpya@netfarm.it>:
Bug acknowledged by developer.
(Mon, 09 Aug 2010 16:06:17 GMT) (full text, mbox, link).
Message #80 received at 584912-close@bugs.debian.org (full text, mbox, reply):
Source: valgrind
Source-Version: 1:3.6.0~svn11254
We believe that the bug you reported is fixed in the latest version of
valgrind, which is due to be installed in the Debian FTP archive:
valgrind_3.6.0~svn11254.diff.gz
to main/v/valgrind/valgrind_3.6.0~svn11254.diff.gz
valgrind_3.6.0~svn11254.dsc
to main/v/valgrind/valgrind_3.6.0~svn11254.dsc
valgrind_3.6.0~svn11254.orig.tar.gz
to main/v/valgrind/valgrind_3.6.0~svn11254.orig.tar.gz
valgrind_3.6.0~svn11254_amd64.deb
to main/v/valgrind/valgrind_3.6.0~svn11254_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 584912@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andrés Roldán <aroldan@debian.org> (supplier of updated valgrind package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 09 Aug 2010 14:35:45 +0000
Source: valgrind
Binary: valgrind
Architecture: source amd64
Version: 1:3.6.0~svn11254
Distribution: unstable
Urgency: low
Maintainer: Andrés Roldán <aroldan@debian.org>
Changed-By: Andrés Roldán <aroldan@debian.org>
Description:
valgrind - A memory debugger and profiler
Closes: 433426 491195 549218 559520 574810 580210 584912 585809 588263 588997 592345
Changes:
valgrind (1:3.6.0~svn11254) unstable; urgency=low
.
* New SVN snapshot.
(Closes: #574810, #592345, #584912, #588997, #588263, #585809, #580210)
* debian/control: Dropped build dependency on gcc-4.3 on amd64 (Closes: #559520)
* debian/patches/01_more-vg-n-threads.dpatch:
- Removed. Already applied by upstream
* debian/patches/01_more-vg-n-segments.dpatch
- Increased VG_N_SEGMENTS to 25000 (Closes: #491195)
* debian/README.Debian:
- Updated (Closes: #433426)
* debian/valgrind.bash:
- Updated to make tools autocomplete well. (Closes: #549218)
Checksums-Sha1:
d1041c109416c84a5c17cc0d2f9dd14c1aeb4165 1191 valgrind_3.6.0~svn11254.dsc
0cad76c9987a369833f699cf34a61ca1f46916fd 7158459 valgrind_3.6.0~svn11254.orig.tar.gz
677e2abff322b1564a1ef89cf723b44fabd3de4d 95092 valgrind_3.6.0~svn11254.diff.gz
366210341dd26b7f04ff572a74fb4b4904c0f810 49228802 valgrind_3.6.0~svn11254_amd64.deb
Checksums-Sha256:
c0f9422858fb1e8e575b5dea17e9c2ec11c076a8775e6eefc6416f66f622a723 1191 valgrind_3.6.0~svn11254.dsc
38682f0d83f8e1e5a63bf631d8783bfde0de23e91fd435a3b4edea71a0129e34 7158459 valgrind_3.6.0~svn11254.orig.tar.gz
7f011825161458f996f00c53f01978dc14b45b1a42c4d363797befe09d809937 95092 valgrind_3.6.0~svn11254.diff.gz
ec7d71a743b632e2045fdb78f8a7a5a189ef5230456fbf33d7525b24803408be 49228802 valgrind_3.6.0~svn11254_amd64.deb
Files:
1f5c404722ce335af46e96f291bf777b 1191 devel optional valgrind_3.6.0~svn11254.dsc
2b355c2a271905612cfb511fefea5722 7158459 devel optional valgrind_3.6.0~svn11254.orig.tar.gz
1bb8cd92447330867e26e05d23a77ea9 95092 devel optional valgrind_3.6.0~svn11254.diff.gz
8f98a7e5a975785169caf5500a1ab0e1 49228802 devel optional valgrind_3.6.0~svn11254_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkxgIcoACgkQ2OByS7KTluvR+wCgjXFHuk0nZQx28BSw45Hs0DRa
p+oAn0gwrltu+LdJ0l7twq660RcRV6W9
=QhO0
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 29 Sep 2010 07:30:49 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Tue Jul 23 13:39:54 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.