Commit graph

6 commits

Author SHA1 Message Date
Karl Wiberg
0611a15c29 Make the stacktrace unit test more robust
The stacktrace unit test was flaking on arm32; my theory is that this
happened when the thread whose stack we were dumping was doing a
system call inside `params->deadlock_start_event.Set();` in
ThreadFunction(). (This would be a problem because, according to the
comment at the bottom of the file, "stack traces originating from
kernel space do not include user space stack traces for ARM32.")

Attempt to solve this problem by spinning on an atomic flag instead,
since this involve no system calls. And add a short sleep to the main
thread, to give the other thread time to get from the barrier to the
thing it's actually supposed to deadlock on.

Bug: webrtc:10420
Change-Id: I4c6392157c8a06c64cb11146ffe9368e5bade6fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128340
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27158}
2019-03-18 11:19:13 +00:00
Karl Wiberg
c130d42aab Add ability to unwind stack for the current thread
Bug: webrtc:10308
Change-Id: Ia82cb7512524bede8da69bbc747ece6e718733ab
Reviewed-on: https://webrtc-review.googlesource.com/c/124993
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26945}
2019-03-04 10:31:40 +00:00
Steve Anton
f380284035 (7) Rename files to snake_case: remove forwarding headers
Bug: webrtc:10159
Change-Id: I2ba899e0283b953538c7941c8790213e36d7c70e
Reviewed-on: https://webrtc-review.googlesource.com/c/118561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26417}
2019-01-26 00:33:46 +00:00
Magnus Jedvert
7510e4aac5 Reland "Android: Add helper methods for printing native stack traces"
This is a reland of dc32cc00e8

Relanding because this CL was not the culprit for the Chrome bot.
(This code shouldn't even be executed in Chrome).

Original change's description:
> Android: Add helper methods for printing native stack traces
>
> This CL adds utility functions to unwind the stack for a given thread on
> Android ARM devices. This works on top of unwind.h and unwinds native
> (C++) stack traces only. Unwinding a thread from another thread is done
> by overriding the signal handler with a custom function and then
> interrupting the specific thread.
>
> Bug: webrtc:10168
> Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
> Reviewed-on: https://webrtc-review.googlesource.com/c/118141
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26328}

TBR=tommi

Bug: webrtc:10168
Change-Id: I4c33c2c147cf10c0172c98a55d32dd35a08517c8
Reviewed-on: https://webrtc-review.googlesource.com/c/118704
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26341}
2019-01-21 15:18:56 +00:00
Magnus Jedvert
700615fb1c Revert "Android: Add helper methods for printing native stack traces"
This reverts commit dc32cc00e8.

Reason for revert: Seems to be breaking Chromium FYI, https://www.google.com/url?q=https://ci.chromium.org/p/chromium/builders/luci.chromium.webrtc.fyi/WebRTC%2520Chromium%2520FYI%2520Android%2520Tests%2520%2528dbg%2529%2520%2528K%2520Nexus5%2529/1807&sa=D&source=hangouts&ust=1548149426180000&usg=AFQjCNGh9aBqv2wNE12D8-6rn9-AJR-cNg

Original change's description:
> Android: Add helper methods for printing native stack traces
> 
> This CL adds utility functions to unwind the stack for a given thread on
> Android ARM devices. This works on top of unwind.h and unwinds native
> (C++) stack traces only. Unwinding a thread from another thread is done
> by overriding the signal handler with a custom function and then
> interrupting the specific thread.
> 
> Bug: webrtc:10168
> Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
> Reviewed-on: https://webrtc-review.googlesource.com/c/118141
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26328}

TBR=magjed@webrtc.org,tommi@webrtc.org

Change-Id: I6e01f9226ef60777cb422baeab042bce8944f9ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10168
Reviewed-on: https://webrtc-review.googlesource.com/c/118683
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26336}
2019-01-21 11:08:36 +00:00
Magnus Jedvert
dc32cc00e8 Android: Add helper methods for printing native stack traces
This CL adds utility functions to unwind the stack for a given thread on
Android ARM devices. This works on top of unwind.h and unwinds native
(C++) stack traces only. Unwinding a thread from another thread is done
by overriding the signal handler with a custom function and then
interrupting the specific thread.

Bug: webrtc:10168
Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
Reviewed-on: https://webrtc-review.googlesource.com/c/118141
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26328}
2019-01-20 12:01:50 +00:00