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

Check task canceling logic for shell operations running with root #691

Closed
d4rken opened this issue Jan 14, 2017 · 0 comments
Closed

Check task canceling logic for shell operations running with root #691

d4rken opened this issue Jan 14, 2017 · 0 comments

Comments

@d4rken
Copy link
Member

d4rken commented Jan 14, 2017

Would have expected SD Maid to try to kill the shell forcefully here, but nothing happened.

I'm wondering whether the shell was already closed and we were just handling the output still which then blocked the canceling somewhere?

1484357772407 W/SystemCleanerWorker: Canceling...
1484357772407 D/SystemCleanerWorker: Cleaning up after task (force:true)
1484357772418 V/InteractiveShell: Input : exit
1484357772422 D/InteractiveShell: Writing exit failed.
java.io.IOException: write failed: EBADF (Bad file descriptor)
	at libcore.io.IoBridge.write(IoBridge.java:498)
	at java.io.FileOutputStream.write(FileOutputStream.java:186)
	at java.io.OutputStreamWriter.flushBytes(OutputStreamWriter.java:170)
	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:161)
	at eu.thedarken.sdm.tools.shell.a.a.f(InteractiveShell.java:444)
	at eu.thedarken.sdm.tools.shell.a.a.c(InteractiveShell.java:422)
	at eu.thedarken.sdm.tools.io.shell.c.c(ShellIO.java:140)
	at eu.thedarken.sdm.tools.io.x.c(SmartIO.java:407)
	at eu.thedarken.sdm.tools.worker.a.a(AbstractWorker.java:202)
	at eu.thedarken.sdm.tools.worker.a.b(AbstractWorker.java:215)
	at eu.thedarken.sdm.tools.worker.a.c(AbstractWorker.java:226)
	at eu.thedarken.sdm.ui.c.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: write failed: EBADF (Bad file descriptor)
	at libcore.io.Posix.writeBytes(Native Method)
	at libcore.io.Posix.write(Posix.java:271)
	at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
	at libcore.io.IoBridge.write(IoBridge.java:493)
	... 12 more

1484357772424 D/InteractiveShell: Closed (globalexitcode=9)

SystemCleaner was reading ~100k files from /data/local/nhsystem on a OnePLus2

1484357700545 D/Debug: ro.build.description=OnePlus2-user 6.0.1 MMB29M 3 dev-keys
1484357700545 D/Debug: ro.build.oemfingerprint=6.0.1/MMB29M/1447841100:user/release-keys
1484357700546 D/Debug: ro.build.date.Ymd=161227
1484357700546 D/Debug: ro.build.date.ymd=161227
1484357700546 D/Debug: ro.build.date.YmdHM=201612271635
1484357700546 D/Debug: ro.build.soft.version=A.27
1484357700546 D/Debug: ro.build.kernel.id=3.10.49-G1612271635
1484357700546 D/Debug: ro.build.ota.versionname=OnePlus2Oxygen_14_1612271635
1484357700547 D/Debug: ro.build.version.ota=OnePlus2Oxygen_14.A.27_GLO_027_1612271635

Check what the next step would be until the UI is available again

  • Cancel action via UI
  • Cleanup call back with forced flag within the worker
  • Shells are closed
  • Shell returned Closed (existcode 9, I think that's an internal SD Maid code, not shell code)
  • ????
  • UI becomes available again.
@d4rken d4rken added this to the Next Tasks milestone Jan 14, 2017
@d4rken d4rken closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant