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

Issue on Nexus 10 JB4.3 - SEGV_MAPERR #3

Open
sriram-kakarala opened this issue Mar 27, 2014 · 3 comments
Open

Issue on Nexus 10 JB4.3 - SEGV_MAPERR #3

sriram-kakarala opened this issue Mar 27, 2014 · 3 comments

Comments

@sriram-kakarala
Copy link

What steps will reproduce the problem?

  1. Call "RootTools.RootTools.isRootAvailable()" in a separate thread in "onResume()" of Activity.

What is the expected output? What do you see instead?

The device root value is returned, but then there are a series of SEGV_MAPERR in the DDMS logs.
This happens everytime.

What version of the product are you using? On what operating system?

RootTools 3.0 on Nexus 10, Android 4.3, Build No JWR66Y

@sriram-kakarala
Copy link
Author

Is this observed on any other version?

@Fusion
Copy link
Collaborator

Fusion commented Apr 1, 2014

Very disturbing. Typically I would fault an OOM error but a Nexus 10 has 2 GB RAM. Unless you are running some other app at the same time that's using up all your memory?
Would you mind adding the code below and call it before and after calling isRootAvailable()?

private void quickDirtyCheck() {
    MemoryInfo mInfo = new ActivityManager.MemoryInfo();
    ((ActivityManager)context.getSystemService(ACTIVITY_SERVICE)).getMemoryInfo(Info);
    RootTools.log("Available memory: " + mInfo.availMem +
            (mInfo.lowMemory ? " and that's too low!" : ""));
}

@sriram-kakarala
Copy link
Author

Hi,
Thanks for responding. Here are the logs,
D/ROOTTOOLS( 3290): Available memory: 704278528
D/ROOTTOOLS( 3290): Available memory: 650276864

Below are some of my findings,

  1. The seg fault happens mainly if I run the root check inside a Thread/AsyncTask. Running it on the main thread does not cause issues.
  2. The line that causes issue is in Shell.java when we try to create a new root shell with "su" command,
    this.proc = new ProcessBuilder("su").redirectErrorStream(true).start();
    once this line is executed the ddms logs show the crash dumps.
  3. When I do a "adh shell ps", I see a whole bunch of processes that are created because of ProcessBuilder which are never closed.
    It seems like it hits the zombie process issue as mentioned here,
    http://stackoverflow.com/a/15485210/987105

Let me know if I should copy/paste the code and/or logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants