Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcrash_sample native crash double catches #24

Closed
clang-clang-clang opened this issue Nov 9, 2019 · 2 comments
Closed

xcrash_sample native crash double catches #24

clang-clang-clang opened this issue Nov 9, 2019 · 2 comments
Labels
discussion Discussion that it not necessarily related to a concrete bug or feature help wanted Extra attention is needed

Comments

@clang-clang-clang
Copy link

First of all, thank you for your work. And then the issue:

Description

When test "native crash (in another process)", it cause double times crashes/catches, create 2 tombstones in seconds.

Detail

I compared that files, they have different catch pid, tid, and some random memory addr, and later one have following stack additionally:

    stack:
    ...
    00000074d963c000-00000074d963d000 ---       0     1000 [anon:thread signal stack guard]
    00000074d963d000-00000074d9641000 rw-       0     4000 [anon:thread signal stack]
    ...
    00000074d96fa000-00000074d96fb000 ---       0     1000 [anon:bionic TLS guard]
    00000074d96fb000-00000074d96fe000 rw-       0     3000 [anon:bionic TLS]
    00000074d96fe000-00000074d96ff000 ---       0     1000 [anon:bionic TLS guard]
    ...

Question

Is it a feature or something else?

@caikelun
Copy link
Collaborator

Not a feature.

The way the mock service process native crashes in the sample app is to create a native crash in the onStartCommand function.

xCrash does not catch the same process crash multiple times. The PID of the crash process is different. It sounds like the service process crashed and was restarted by the operating system again, and then crashed again. Can you look at logcat and find some clues?

Can you provide the model and Android version in question? In addition, do you have the same problem on other models or Android version?

Thanks~

clang-clang-clang added a commit to clang-clang-clang/xCrash that referenced this issue Nov 12, 2019
@clang-clang-clang
Copy link
Author

Thank you.

It is weird, as you can see, I made a demo to log MyService's behavior, one of the log as shown below (first col is logging seconds):

59.634 27142-27142/xcrash.sample:bg D/DoubleCatch: MyService: constructCnt is 0
59.634 27142-27142/xcrash.sample:bg D/DoubleCatch: MyService: thread is Thread[main,5,main]
59.634 27142-27142/xcrash.sample:bg D/DoubleCatch: MyService: object is 103236765
59.634 27142-27142/xcrash.sample:bg D/DoubleCatch: MyService: createCnt is 0
59.635 27142-27142/xcrash.sample:bg D/DoubleCatch: MyService: startCommandCnt is 0
59.635 27142-27142/xcrash.sample:bg D/DoubleCatch: MyService: Process is 27142
02.661 27197-27197/? D/DoubleCatch: MyService: constructCnt is 0
02.661 27197-27197/? D/DoubleCatch: MyService: thread is Thread[main,5,main]
02.661 27197-27197/? D/DoubleCatch: MyService: object is 103236765
02.661 27197-27197/? D/DoubleCatch: MyService: createCnt is 0
02.662 27197-27197/? D/DoubleCatch: MyService: startCommandCnt is 0
02.662 27197-27197/? D/DoubleCatch: MyService: Process is 27197

MyService instantiation 2 times with the same android.app.Service#hashCode.

tested on:

  • Google Pixel 3 XL, Android 9
  • Samsung S6 edge, Android 7.0 (same as pixel, crash 2 times, but I have a problem to checkout tombstone files due to samsung run-as)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion that it not necessarily related to a concrete bug or feature help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants