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

Hanging at `In queue` #878

Closed
d4rken opened this Issue May 5, 2017 · 1 comment

Comments

1 participant
@d4rken
Owner

d4rken commented May 5, 2017

Some reports indicate that SD Maid hangs during the root check on "unrooted" devices.

Logs so far though indicated that this is caused by the device being rooted incomplete / being unrooted incompletely.

Timeout happens after 20 seconds, but it seems we are still stuck waiting for the shell.

1493920322685 D/Shell:Interactive: Opened(root:false)
1493920322687 D/RootContext:Factory: SeLinux: SELinux(state=ENFORCING)
1493920322698 D/Shell:Interactive: runCommand(Command(commands=[su --version]))
1493920322702 V/Shell:Interactive: Input : su --version
1493920322703 V/Shell:Interactive: Input : echo be23a210-284e-42c0-9de5-d93b01a7134f $?
1493920322704 V/Shell:Interactive: Input : echo be23a210-284e-42c0-9de5-d93b01a7134f >&2
1493920322711 V/Shell:Interactive: Output: 2.77:SUPERSU
1493920322713 V/Shell:Interactive: Output: be23a210-284e-42c0-9de5-d93b01a7134f 0
1493920322713 V/Shell:Interactive: Error : be23a210-284e-42c0-9de5-d93b01a7134f
1493920322715 D/Shell:Interactive: runCommand(...): Command.Result(exitcode=0)
1493920322717 D/RootContext:Factory: SuBinary: SuBinary(type=CHAINFIRE_SUPERSU, version=2.77, extra=SUPERSU, raw=2.77:SUPERSU)
1493920322720 D/RootContext:Factory: SuApp: SuApp(packageName=eu.chainfire.supersu, versionName=2.79, versionCode=279, path=/data/app/eu.chainfire.supersu-1/base.apk)
1493920322737 D/Shell:Interactive: Opened(root:true)
1493920322738 D/Shell:Interactive: runCommand(Command(commands=[echo -SDMEOF-, id]))
1493920322741 V/Shell:Interactive: Input : echo -SDMEOF-
1493920322741 V/Shell:Interactive: Input : id
1493920322742 V/Shell:Interactive: Input : echo 7494807c-00f1-4f6e-a738-8bed8e17b00c $?
1493920322742 V/Shell:Interactive: Input : echo 7494807c-00f1-4f6e-a738-8bed8e17b00c >&2
1493920343740 W/Shell:Interactive: Shell got stuck, watchdog acting now!
1493920343742 D/Shell:Interactive: runCommand(...): Command.Result(exitcode=-2)
1493920343744 V/Shell:Interactive: Input : exit
1493920343745 D/Shell:Interactive: Writing exit failed: File descriptor closed

Solution wise it would be good not to have to wait for a timeout, and the timeout should obviously let us continue and not also be stuck.

@d4rken d4rken added this to the Next Tasks milestone May 5, 2017

@d4rken d4rken modified the milestones: v4.8.0, Next Tasks Aug 31, 2017

@d4rken

This comment has been minimized.

Owner

d4rken commented Sep 18, 2017

Syncronization deadlock between watchdog and the output stream closing. This was a tough one, but much good came from it, fixed 2 unrelated edge case issues related to streams dying, refactored and added a dozen unit tests.

@d4rken d4rken closed this Sep 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment