From: dwk <dwks42@gmail.com>
To: Philippe Proulx <eeppeliteloop@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Process record does not support instruction 0xc5 at address...
Date: Sun, 14 Aug 2016 23:09:00 -0000 [thread overview]
Message-ID: <CAPkwjGvMbQUffVG0fcRML8nY5gyrdGmDMeT=eSOuVS0ZhJVEVw@mail.gmail.com> (raw)
In-Reply-To: <CAB4xu_0XrR=+XUvKs6htZ5=XP9rRLMSt6uxDn+q6J_HaKcQZgQ@mail.gmail.com>
Some context. I found that on an illegal instruction, or when jumping to
an address where there was no mapped instruction, process record would
fail in this way. It looks like 0xc5 is an undefined instruction in
64-bit mode (see http://ref.x86asm.net/coder64.html#xC5) so you appear
to be running to the exact same issue. My work-around was to write a
script which would disable record, single-step to the next instruction,
then re-enable record. However, I was intentionally adding undefined
instructions and hoping for a SIGILL.
The deeper issue here might be that some AVX instructions are not
supported by process record. Thus, I suggest you disable the AVX versions
of functions in libc, libm, and ld.so. libm in particular makes heavy
use of IFUNCs -- indirect symbols which are supposed to be called once to
determine the real target function. Typically it looks at the supported
features of your CPU and selects the appropriate function (AVX optimized,
SSE optimized, SSE3 optimized, etc). It can't hurt to try disabling
this. You can recompile libc (thus ld.so), or hack __init_cpu_features
and thus __cpu_features at runtime (see e.g. strcmp).
Oh, you can also try setting LD_BIND_NOW=1 so that symbols are all
resolved immediately at load-time and _dl_runtime_resolve will never be
called later, unless you dlopen of course.
On Sun, Aug 14, 2016 at 6:36 PM, Philippe Proulx
<eeppeliteloop@gmail.com> wrote:
> On Sun, Aug 14, 2016 at 5:42 PM, dwk <dwks42@gmail.com> wrote:
>> I used to run into this all the time with SIGSEGV, SIGINT, instruction
>> 0xcc, instruction 0xf4, etc. It seems to have been fixed when I upgraded
>> gdb at one point. I am currently using gdb 7.7.1 on x86-64. Your mileage
>> may vary.
>
> I'm on 7.11.1 by the way.
>
> Processor is Intel(R) Core(TM) i7-3520M with the following flags:
>
> fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36
> clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm
> constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
> aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2
> ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer
> aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept
> vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
>
> Phil
>
>>
>> On Sun, Aug 14, 2016 at 5:30 PM, Philippe Proulx
>> <eeppeliteloop@gmail.com> wrote:
>>> Hello,
>>>
>>> Is there any known solution or workaround for this problem when
>>> using the GDB `record` command:
>>>
>>> Process record does not support instruction 0xc5 at address 0x7ffff7dee8a7.
>>> Process record: failed to record execution log.
>>>
>>> Program stopped.
>>> 0x00007ffff7dee8a7 in _dl_runtime_resolve_avx () from
>>> /lib64/ld-linux-x86-64.so.2
>>>
>>> Thank you,
>>>
>>> Philippe Proulx
next prev parent reply other threads:[~2016-08-14 23:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-14 21:31 Philippe Proulx
2016-08-14 21:42 ` dwk
2016-08-14 22:36 ` Philippe Proulx
2016-08-14 23:09 ` dwk [this message]
2016-08-15 0:00 ` Philippe Proulx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPkwjGvMbQUffVG0fcRML8nY5gyrdGmDMeT=eSOuVS0ZhJVEVw@mail.gmail.com' \
--to=dwks42@gmail.com \
--cc=eeppeliteloop@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox