some questions about project tsan
Arthur Eubanks
aeubanks at google.com
Tue Mar 24 15:59:21 UTC 2020
On Tue, Mar 24, 2020 at 4:13 AM Jie He <Jie.He at arm.com> wrote:
> Hi Arthur
>
>
>
> We plan to add the AARCH64 support in jdk/tsan, probably kick off next
> month.
>
Awesome! Looking forward to it.
>
>
> Could we commit the patches progressively? each of them will pass parts of
> the tsan test cases, so that, it’s easier to review and bug tracking than a
> whole big patch.
>
Yes, incremental patches are greatly preferred.
Maybe you want to first rebase/merge with jdk/jdk? I'm not sure what the
right approach is, I'd prefer rebasing, but maybe merging is the typical
thing to do?
Also, we just got notified that the Project Skara people want to move
jdk/tsan to GitHub so we'll probably be going down that path soon, and code
reviews will be done via GitHub pull requests; keep that in mind.
>
>
> B.R
>
> Jie He
>
>
>
> *From:* Arthur Eubanks <aeubanks at google.com>
> *Sent:* Friday, January 10, 2020 1:21 AM
> *To:* Jie He <Jie.He at arm.com>
> *Cc:* tsan-dev at openjdk.java.net; nd <nd at arm.com>
> *Subject:* Re: some questions about project tsan
>
>
>
>
>
>
>
> On Thu, Jan 9, 2020 at 1:02 AM Jie He <Jie.He at arm.com> wrote:
>
> Hi
>
> I'm an engineer from ARM, and noticed this project is helpful to detect
> data race in Java level.
>
> Thanks for the interest!
>
>
> I have some questions about this project:
>
> 1, how about the current status? All dev jobs have been finished already?
>
> It works and we use this internally at Google. There should be no false
> positives reported, but not everything is precise and there are false
> negatives (e.g. final fields, finalizers, etc.). I believe the current
> implementation catches most races, which is good enough, and extra effort
> spent making instrumentation more precise would only find a couple more
> races, which may or may not be worth the effort.
>
> Ideally we'd like to upstream this into mainline.
>
> 2, for detection of data race in Java code, I think current implementation
> only in X86 is enough. A data race in java code will be found whatever the
> machine platform is.
> So that, porting this project to AARCH64 is meaningless? Is it helpful
> to find some issues which don't happen in X86?
>
> Yes a data race will likely be found on x86 and it would apply to AARCH64
> as well. Porting to AARCH64 could still be interesting and useful for
> people who only have AARCH64 machines. And maybe running on different
> architectures will change the timing of concurrent execution, causing races
> to disappear or appear.
>
> 3, Is there a plan to add the support to detect data race in JVM self?
> E.g. add the instrumentation into the assemble code generated by
> interpreter, compiler and runtime,
> In some machine platforms which have weak memory model like arm and
> ppc, engineers often make mistakes when writing data race related code even
> though they are experienced.
> I think such a tool could help to detect these bugs easily than before.
>
> We've thought about this in the past, but there is a ton of intentionally
> racy code. You could try adding -fsanitize=thread to the hotspot
> compilations and running it just to see what would happen.
>
>
> Thanks
> Jie He
>
>
More information about the tsan-dev
mailing list