From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54357 invoked by alias); 14 Aug 2016 23:09:10 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 54347 invoked by uid 89); 14 Aug 2016 23:09:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=eeppeliteloop@gmail.com, eeppeliteloopgmailcom, dwks42gmailcom, dwks42@gmail.com X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 14 Aug 2016 23:08:59 +0000 Received: by mail-wm0-f53.google.com with SMTP id i5so73670576wmg.0 for ; Sun, 14 Aug 2016 16:08:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mmKPc0gOnjc1sCPFdU6QkamLOcOt2oXH/8bpK9H1eI8=; b=QaVt+U7E+3l+2X1I9zNDew+2LuGRGiqN7E6/DdXNNLAyyUNItglBkAm8pqWODc9wwG CJKxvM7Pv6yidTshP+IC4Y+JD8ONbPnl9djoHU00mQ1rOmdPjITJbDZwlMHKbACvMqQQ vGlh1qEdt5x7/JcpJFDU/og0/IX1gip+GM07Z/ssaB6II/HZvrg/pkriLmmRQadK0XfX c1v/4yAjdh7Uqz9Rp4UfNHku6nKte3F2QXeHNFO2JQxbd8U3nWoJ91UD+Hvt2nkz7Wgu r204+BS/vDwh4kg9caVYdNuqYi4l+/esVofOBDwvqIQ9790x9JD2nM1ecYCQNPVb0rgt ZAyQ== X-Gm-Message-State: AEkoousLsUKoR0rhcY4rjop7AxgBrIoMl/1hikNCosx7fC+TP5DDrveiLCz6tfFusXV7jlZ69M9y388K/3h9XQ== X-Received: by 10.194.148.81 with SMTP id tq17mr27260029wjb.67.1471216136783; Sun, 14 Aug 2016 16:08:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.2.6 with HTTP; Sun, 14 Aug 2016 16:08:56 -0700 (PDT) In-Reply-To: References: From: dwk Date: Sun, 14 Aug 2016 23:09:00 -0000 Message-ID: Subject: Re: Process record does not support instruction 0xc5 at address... To: Philippe Proulx Cc: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-08/txt/msg00028.txt.bz2 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 wrote: > On Sun, Aug 14, 2016 at 5:42 PM, dwk 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 >> 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