Bug 471964 - vex amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xFA 0x48 0x89 0x11 0x73 0x28 0x48
Summary: vex amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xFA 0x48 0x89 0x11...
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: massif (show other bugs)
Version: 3.21.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Nicholas Nethercote
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-05 02:51 UTC by Kyle Sanderson
Modified: 2025-02-24 21:54 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Sanderson 2023-07-05 02:51:22 UTC
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/1) Installing valgrind (3.19.0-r0)
Executing busybox-1.35.0-r17.trigger
OK: 91 MiB in 20 packages
==10== Massif, a heap profiler
==10== Copyright (C) 2003-2017, and GNU GPL'd, by Nicholas Nethercote
==10== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==10== Command: qbittorrent-nox
==10==
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, but has failed to switch to one.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
vex amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xFA 0x48 0x89 0x11 0x73 0x28 0x48
vex amd64->IR:   REX=1 REX.W=1 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==10== valgrind: Unrecognised instruction at address 0xd7e210.
==10==    at 0xD7E210: qRandomCpu(void*, long long) (in /bin/qbittorrent-nox)
==10==    by 0xBD622F: QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*) (in /bin/qbittorrent-nox)
==10==    by 0xBD633E: std::enable_if<std::__and_<std::__not_<std::is_same<std::remove_cv<std::remove_reference<QRandomGenerator::SystemGenerator>::type>::type, std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u> > >, std::is_unsigned<QRandomGenerator::SystemGenerator::result_type>, std::__not_<std::is_convertible<QRandomGenerator::SystemGenerator, unsigned int> > >::value, void>::type std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>::seed<QRandomGenerator::SystemGenerator>(QRandomGenerator::SystemGenerator&) (in /bin/qbittorrent-nox)
==10==    by 0xBD6441: QRandomGenerator64::global() (in /bin/qbittorrent-nox)
==10==    by 0xC03F2A: QTemporaryFileName::generateNext() (in /bin/qbittorrent-nox)
==10==    by 0xC037F3: QTemporaryDirPrivate::create(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C2A8F: QLocalServerPrivate::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C00C0: QLocalServer::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x47F569: QtLocalPeer::isClient() (in /bin/qbittorrent-nox)
==10==    by 0x47533D: ApplicationInstanceManager::ApplicationInstanceManager(QString const&, QObject*) (in /bin/qbittorrent-nox)
==10==    by 0x474366: Application::Application(int&, char**) (in /bin/qbittorrent-nox)
==10==    by 0x47E26F: std::_MakeUniq<Application>::__single_object std::make_unique<Application, int&, char**&>(int&, char**&) [clone .isra.0] (in /bin/qbittorrent-nox)
==10==    by 0x463CD4: main (in /bin/qbittorrent-nox)
==10== Your program just tried to execute an instruction that Valgrind
==10== did not recognise.  There are two possible reasons for this.
==10== 1. Your program has a bug and erroneously jumped to a non-code
==10==    location.  If you are running Memcheck and you just saw a
==10==    warning about a bad jump, it's probably your program's fault.
==10== 2. The instruction is legitimate but Valgrind doesn't handle it,
==10==    i.e. it's Valgrind's fault.  If you think this is the case or
==10==    you are not sure, please let us know and we'll try to fix it.
==10== Either way, Valgrind will now raise a SIGILL signal which will
==10== probably kill your program.
==10==
==10== Process terminating with default action of signal 4 (SIGILL): dumping core
==10==  Illegal opcode at address 0xD7E210
==10==    at 0xD7E210: qRandomCpu(void*, long long) (in /bin/qbittorrent-nox)
==10==    by 0xBD622F: QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*) (in /bin/qbittorrent-nox)
==10==    by 0xBD633E: std::enable_if<std::__and_<std::__not_<std::is_same<std::remove_cv<std::remove_reference<QRandomGenerator::SystemGenerator>::type>::type, std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u> > >, std::is_unsigned<QRandomGenerator::SystemGenerator::result_type>, std::__not_<std::is_convertible<QRandomGenerator::SystemGenerator, unsigned int> > >::value, void>::type std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>::seed<QRandomGenerator::SystemGenerator>(QRandomGenerator::SystemGenerator&) (in /bin/qbittorrent-nox)
==10==    by 0xBD6441: QRandomGenerator64::global() (in /bin/qbittorrent-nox)
==10==    by 0xC03F2A: QTemporaryFileName::generateNext() (in /bin/qbittorrent-nox)
==10==    by 0xC037F3: QTemporaryDirPrivate::create(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C2A8F: QLocalServerPrivate::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C00C0: QLocalServer::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x47F569: QtLocalPeer::isClient() (in /bin/qbittorrent-nox)
==10==    by 0x47533D: ApplicationInstanceManager::ApplicationInstanceManager(QString const&, QObject*) (in /bin/qbittorrent-nox)
==10==    by 0x474366: Application::Application(int&, char**) (in /bin/qbittorrent-nox)
==10==    by 0x47E26F: std::_MakeUniq<Application>::__single_object std::make_unique<Application, int&, char**&>(int&, char**&) [clone .isra.0] (in /bin/qbittorrent-nox)
==10==    by 0x463CD4: main (in /bin/qbittorrent-nox)
==10==
Illegal instruction (core dumped)


Qt:	6.5.1
Libtorrent:	1.2.19.0
Boost:	1.82.0
OpenSSL:	3.1.1
zlib:	1.2.13.zlib-ng
Comment 1 Kyle Sanderson 2023-07-05 03:49:55 UTC
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/1) Installing valgrind (3.21.0-r5)
Executing busybox-1.35.0-r17.trigger
OK: 92 MiB in 20 packages
==10== Massif, a heap profiler
==10== Copyright (C) 2003-2017, and GNU GPL'd, by Nicholas Nethercote
==10== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==10== Command: qbittorrent-nox
==10==
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, but has failed to switch to one.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
vex amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xFA 0x48 0x89 0x11 0x73 0x28 0x48
vex amd64->IR:   REX=1 REX.W=1 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==10== valgrind: Unrecognised instruction at address 0xd7e210.
==10==    at 0xD7E210: qRandomCpu(void*, long long) (in /bin/qbittorrent-nox)
==10==    by 0xBD622F: QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*) (in /bin/qbittorrent-nox)
==10==    by 0xBD633E: std::enable_if<std::__and_<std::__not_<std::is_same<std::remove_cv<std::remove_reference<QRandomGenerator::SystemGenerator>::type>::type, std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u> > >, std::is_unsigned<QRandomGenerator::SystemGenerator::result_type>, std::__not_<std::is_convertible<QRandomGenerator::SystemGenerator, unsigned int> > >::value, void>::type std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>::seed<QRandomGenerator::SystemGenerator>(QRandomGenerator::SystemGenerator&) (in /bin/qbittorrent-nox)
==10==    by 0xBD6441: QRandomGenerator64::global() (in /bin/qbittorrent-nox)
==10==    by 0xC03F2A: QTemporaryFileName::generateNext() (in /bin/qbittorrent-nox)
==10==    by 0xC037F3: QTemporaryDirPrivate::create(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C2A8F: QLocalServerPrivate::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C00C0: QLocalServer::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x47F569: QtLocalPeer::isClient() (in /bin/qbittorrent-nox)
==10==    by 0x47533D: ApplicationInstanceManager::ApplicationInstanceManager(QString const&, QObject*) (in /bin/qbittorrent-nox)
==10==    by 0x474366: Application::Application(int&, char**) (in /bin/qbittorrent-nox)
==10==    by 0x47E26F: std::_MakeUniq<Application>::__single_object std::make_unique<Application, int&, char**&>(int&, char**&) [clone .isra.0] (in /bin/qbittorrent-nox)
==10==    by 0x463CD4: main (in /bin/qbittorrent-nox)
==10== Your program just tried to execute an instruction that Valgrind
==10== did not recognise.  There are two possible reasons for this.
==10== 1. Your program has a bug and erroneously jumped to a non-code
==10==    location.  If you are running Memcheck and you just saw a
==10==    warning about a bad jump, it's probably your program's fault.
==10== 2. The instruction is legitimate but Valgrind doesn't handle it,
==10==    i.e. it's Valgrind's fault.  If you think this is the case or
==10==    you are not sure, please let us know and we'll try to fix it.
==10== Either way, Valgrind will now raise a SIGILL signal which will
==10== probably kill your program.
==10==
==10== Process terminating with default action of signal 4 (SIGILL): dumping core
==10==  Illegal opcode at address 0xD7E210
==10==    at 0xD7E210: qRandomCpu(void*, long long) (in /bin/qbittorrent-nox)
==10==    by 0xBD622F: QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*) (in /bin/qbittorrent-nox)
==10==    by 0xBD633E: std::enable_if<std::__and_<std::__not_<std::is_same<std::remove_cv<std::remove_reference<QRandomGenerator::SystemGenerator>::type>::type, std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u> > >, std::is_unsigned<QRandomGenerator::SystemGenerator::result_type>, std::__not_<std::is_convertible<QRandomGenerator::SystemGenerator, unsigned int> > >::value, void>::type std::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>::seed<QRandomGenerator::SystemGenerator>(QRandomGenerator::SystemGenerator&) (in /bin/qbittorrent-nox)
==10==    by 0xBD6441: QRandomGenerator64::global() (in /bin/qbittorrent-nox)
==10==    by 0xC03F2A: QTemporaryFileName::generateNext() (in /bin/qbittorrent-nox)
==10==    by 0xC037F3: QTemporaryDirPrivate::create(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C2A8F: QLocalServerPrivate::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x9C00C0: QLocalServer::listen(QString const&) (in /bin/qbittorrent-nox)
==10==    by 0x47F569: QtLocalPeer::isClient() (in /bin/qbittorrent-nox)
==10==    by 0x47533D: ApplicationInstanceManager::ApplicationInstanceManager(QString const&, QObject*) (in /bin/qbittorrent-nox)
==10==    by 0x474366: Application::Application(int&, char**) (in /bin/qbittorrent-nox)
==10==    by 0x47E26F: std::_MakeUniq<Application>::__single_object std::make_unique<Application, int&, char**&>(int&, char**&) [clone .isra.0] (in /bin/qbittorrent-nox)
==10==    by 0x463CD4: main (in /bin/qbittorrent-nox)
==10==
Illegal instruction (core dumped)
Comment 2 Paul Floyd 2023-07-05 12:28:19 UTC
Looks to me like this is a problem with rdseed, which Valgrind should support.

Can you build Valgrind yourself on the same machine that you are running the tests on?

If the package build machine doesn't have avx2 and rdseed but your test machine does then that could explain the problem
Comment 3 Kyle Sanderson 2023-07-06 02:25:28 UTC
(In reply to Paul Floyd from comment #2)
> Looks to me like this is a problem with rdseed, which Valgrind should
> support.
> 
> Can you build Valgrind yourself on the same machine that you are running the
> tests on?
> 
> If the package build machine doesn't have avx2 and rdseed but your test
> machine does then that could explain the problem

If there's a static I can try I'm happy to do it. I'm not able to build on the container at the moment. I have fakeroot.
Comment 4 Paul Floyd 2023-07-06 12:28:19 UTC
In general containers are not a good environment for running Valgrind. From what I've seen they add some extra restrictions in their virtualization of the operating system. There's not much that we can do on the Valgrind side for this.
Comment 5 TraceyC 2025-02-24 17:59:17 UTC
Adding the x11-only keyword
Comment 6 Sam James 2025-02-24 21:54:30 UTC
This bug is for Valgrind, so x11-only/wayland-only doesn't apply here ;)