From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>
Cc: Yao Qi <qiyaoltc@gmail.com>, <gdb-patches@sourceware.org>
Subject: Re: [RFC 0/3] Use reinsert breakpoint for vCont;s
Date: Tue, 10 May 2016 13:29:00 -0000 [thread overview]
Message-ID: <wwokposukpn7.fsf@ericsson.com> (raw)
In-Reply-To: <wwoktwi7l0q6.fsf@ericsson.com>
Antoine Tremblay writes:
>> I tried different ways to remove reinsert breakpoints in GDBserver, but still
>> can't fix fails in gdb.threads/schedlock.exp, that the program gets SIGILL or
>> SIGSEGV. These fails can't happen in every run, and they are disappeared
>> when I turn on debugging output in GDBserver. I suspect they are about the
>> improper management to reinsert breakpoints.
>>
>
> I'm not sure at the moment but this makes me think of an issue I sent
> here: https://www.sourceware.org/ml/gdb/2015-11/msg00030.html
>
> Actually thanks to a good discussion with LTTng maintainer, (Mathieu
> Desnoyer) last week I got the hint that this could be due to the
> situation described here:
> https://community.arm.com/groups/processors/blog/2010/02/17/caches-and-self-modifying-code
>
> Short story, the instruction cache could be out of sync after we've
> removed a software breakpoint and the processor would execute the
> breakpoint instruction causing a SIGILL rather then the original memory.
>
> The solution however, calling __clear_cache(...) requires that we're in
> the same process for the memory addresses to be valid, I think, so I'm
> not sure how to fix this yet...
>
> I'm still early in my investigation but it may be something to consider.
>
Note I tracked that down to __flush_ptrace_access in the kernel, and
tried to hardcode the instruction cache flush (Thanks to Will Deacon for
the hints) but that did not help, at least on the odroid ux4.
Not an easy problem, I'm installing your patch series today and I'll
start checking it out in more detail.
Thanks,
Antoine
next prev parent reply other threads:[~2016-05-10 13:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 10:32 Yao Qi
2016-05-06 10:32 ` [RFC 1/3] make reinsert breakpoint thread specific Yao Qi
2016-05-06 10:32 ` [PATCH 3/3] [GDBserver] Support vCont s and S actions with software single step Yao Qi
2016-05-06 10:32 ` [RFC 2/3] use reinsert breakpoint for vCont;s Yao Qi
2016-05-11 10:41 ` Yao Qi
2016-05-12 13:25 ` Antoine Tremblay
2016-05-13 12:12 ` Antoine Tremblay
[not found] ` <wwokeg97l6fe.fsf@ericsson.com>
2016-05-12 16:38 ` Yao Qi
2016-05-09 15:17 ` [RFC 0/3] Use " Antoine Tremblay
2016-05-10 13:29 ` Antoine Tremblay [this message]
2016-05-11 8:35 ` Yao Qi
2016-05-11 12:08 ` Antoine Tremblay
[not found] ` <wwokfutg3hge.fsf@ericsson.com>
2016-05-18 7:50 ` Yao Qi
2016-05-18 11:50 ` Antoine Tremblay
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=wwokposukpn7.fsf@ericsson.com \
--to=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/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