Bug P3
Status Update
Comments
di...@gmail.com <di...@gmail.com> #2
To clarify, the stress tester was a second application, and I was testing with my main app and the stress tester open at the same time in split screen mode.
Description
Version used: 2.9.0
Devices/Android versions reproduced on: Emulator API 34 (Small phone)
I discovered this while stress testing my application in low-memory situations. If the JobScheduler crashes, WorkManager will never execute those jobs. It seems to detect that the job doesn't exist in JobStore, but they still don't get executed. Enqueuing them again with ExistingWorkPolicy.Keep will also not execute these jobs. They won't execute again unless they are replaced with ExistingWorkPolicy.REPLACE.
Sample log entries:
Scheduling restart of crashed service
Start proc 28954:
Job didn't exist in JobStore: 1d11dfe #u0a190/141
The memory stress test was just doing this on each button press:
extern "C"
JNIEXPORT void JNICALL
Java_com_example_memkiller_MainActivity_crashMe(JNIEnv *env, jobject thiz) {
void* ptr = malloc(1024 * 1024 * 256);
memset(ptr, 0, 1024 * 1024 * 256);
}