2

I ran valgrind on a c program and got the following error:

valgrind: the 'impossible' happened:
   IA-64 cache detected?!

valgrind: m_threadstate.c:100 (vgPlain_get_ThreadState): Assertion 'tid >= 0 && tid < VG_N_THREADS' failed.

After fixing some memory leaks and restructure my program, the error mysteriously went away. But I searched online and find nothing about the IA-64 cache detected error. What does IA-64 means? Also, I ran the program on a virtual machine if that matters.

phuclv
  • 37,963
  • 15
  • 156
  • 475
Notgate
  • 23
  • 2
  • 3
    Are you running the code on an HP server? They are one of the very few IA-64 machines around. IA-64 means "Intel Architecture for 64-bits" or thereabouts. It was intended to be the successor to the IA-32 architecture — represented by 80x86 processors. However, the AMD x86/64 architecture proved to be more successful and IA-64 is in the last stages of dying (no new machines; no new o/s; I'm not sure whether there are even security updates any more). – Jonathan Leffler Feb 19 '23 at 04:42
  • 2
    IA-64 means Itanium and it's unlikely that you're using that architecture. [Valgrind also doesn't support Itanium](https://valgrind.org/info/platforms.html) so it's probably a wrong message – phuclv Feb 19 '23 at 10:06
  • What CPU are you using? I wonder if recent Intel or AMD x86-64 CPUs have repurposed the CPUID field value that IA-64 used to use, as Paul Floyd's answer mentions. – Peter Cordes Feb 21 '23 at 22:26

2 Answers2

1

As already mentioned in the comments, IA-64 is the Intel Architecture Itanium (actually a joint venture with HP). It dates back to the early 2000s. Support for the IA-64 architecture was never added to Valgrind since it was never a great success.

Earlier Itanium chips did have a kind of dual-mode which allowed them to run 32bit x86 code.

The error message in Valgrind comes from the Intel_cache_info function. This queries the cpuid instruction to find out about the cache. 10 of the codes handled by this function are for IA-64. As I said, this was never supported, so Valgrind terminates with a now rather dated message.

You are also getting an assert that the TID is not valid. So something is going seriously wrong.

If you can reproduce the problem with a small example then please report it on https://bugs.kde.org

Paul Floyd
  • 5,530
  • 5
  • 29
  • 43
  • I ran the code on Oracle VM Virtual machine with Ubuntu. My host computer is a Windows machine. My computer has an Intel chip i9-12900. When I set the max processor in the VM to 5, the error appears. However, when I set it to 6 the error disappear. Does this issue has something to do with the configuration of the VM? – Notgate Feb 22 '23 at 18:06
0

I was running my program on a 5 core VM. I switched to another VM that has 12 cores, and it worked. I still don't know what IA-64 cache means though.

Notgate
  • 23
  • 2