Thread 'Android client keeps restarting tasks after some time'

Message boards : Android : Android client keeps restarting tasks after some time
Message board moderation

To post messages, you must log in.

AuthorMessage
daghtus

Send message
Joined: 28 Apr 20
Posts: 3
Slovakia
Message 98114 - Posted: 28 Apr 2020, 8:00:20 UTC

I have noticed weird behavior of BOINC client for Android which I use for Rosetta@Home project. What happens is the client works fine for several days / weeks but suddenly, it cannot complete any tasks as it keeps restarting them every time I have a look at the UI. Restarting the phone or clearing the cache of the app does not help. What worked for me earlier was to remove all app data and add the project again but that generates a new ID for this phone and I lose progress of the running tasks which sucks. Any ideas?

Here is the log from today morning after I restarted the phone. It's Huawei P20.

Tue Apr 28 09:52:00 GMT+02:00 2020|Rosetta@home|Scheduler request completed: got 0 new tasks
Tue Apr 28 09:51:39 GMT+02:00 2020|Rosetta@home|Requesting new tasks for Mali-G72
Tue Apr 28 09:51:39 GMT+02:00 2020|Rosetta@home|Sending scheduler request: To fetch work.
Tue Apr 28 09:51:39 GMT+02:00 2020||Resuming network activity
Tue Apr 28 09:51:37 GMT+02:00 2020||Suspending network activity - not connected to WiFi network
Tue Apr 28 09:51:37 GMT+02:00 2020||Suspending computation - on batteries
Tue Apr 28 09:51:30 GMT+02:00 2020||Not using a proxy
Tue Apr 28 09:51:30 GMT+02:00 2020||(to change preferences, visit a project web site or select Preferences in the Manager)
Tue Apr 28 09:51:30 GMT+02:00 2020||suspend work if non-BOINC CPU load exceeds 50%
Tue Apr 28 09:51:30 GMT+02:00 2020||don't use GPU while active
Tue Apr 28 09:51:30 GMT+02:00 2020||don't compute while active
Tue Apr 28 09:51:30 GMT+02:00 2020||max CPUs used: 4
Tue Apr 28 09:51:30 GMT+02:00 2020||max disk usage: 88.54GB
Tue Apr 28 09:51:30 GMT+02:00 2020||max memory usage when idle: 1844.19MB
Tue Apr 28 09:51:30 GMT+02:00 2020||max memory usage when active: 1844.19MB
Tue Apr 28 09:51:30 GMT+02:00 2020||Preferences:
Tue Apr 28 09:51:30 GMT+02:00 2020||Reading preferences override file
Tue Apr 28 09:51:30 GMT+02:00 2020|Rosetta@home|URL http://boinc.bakerlab.org/rosetta/; Computer ID 4160170; resource share 100
Tue Apr 28 09:51:30 GMT+02:00 2020||Config: report completed tasks immediately
Tue Apr 28 09:51:30 GMT+02:00 2020||Local time is UTC +2 hours
Tue Apr 28 09:51:30 GMT+02:00 2020||Disk: 111.44 GB total, 83.75 GB free
Tue Apr 28 09:51:30 GMT+02:00 2020||Memory: 3.60 GB physical, 2.19 GB virtual
Tue Apr 28 09:51:30 GMT+02:00 2020||OS: Android: 4.9.148
Tue Apr 28 09:51:30 GMT+02:00 2020||Processor features: fp asimd evtstrm aes pmull sha1 sha2 crc32
Tue Apr 28 09:51:30 GMT+02:00 2020||Using 4 CPUs
Tue Apr 28 09:51:30 GMT+02:00 2020||Processor: 8
Tue Apr 28 09:51:30 GMT+02:00 2020||Host name: android_ac767ac9
Tue Apr 28 09:51:30 GMT+02:00 2020||OpenCL: Mali-G72 0: Mali-G72 (driver version 2.0, device version OpenCL 2.0 v1.r14p0-00cet0.0416641283c5d6e2d53c163d0ca99357, 3637MB, 3637MB available, 0 GFLOPS peak)
Tue Apr 28 09:51:30 GMT+02:00 2020||Data directory: /data/data/edu.berkeley.boinc/client
Tue Apr 28 09:51:30 GMT+02:00 2020||Running as a daemon
Tue Apr 28 09:51:30 GMT+02:00 2020||Libraries: libcurl/7.48.0 OpenSSL/1.0.2g zlib/1.2.11
Tue Apr 28 09:51:30 GMT+02:00 2020||log flags: file_xfer, sched_ops, task
Tue Apr 28 09:51:30 GMT+02:00 2020||Starting BOINC client version 7.4.53 for aarch64-android-linux-gnu
ID: 98114 · Report as offensive
Raistmer

Send message
Joined: 9 Apr 06
Posts: 302
Message 98117 - Posted: 28 Apr 2020, 10:23:11 UTC - in response to Message 98114.  
Last modified: 28 Apr 2020, 10:26:13 UTC

I have noticed weird behavior of BOINC client for Android which I use for Rosetta@Home project. What happens is the client works fine for several days / weeks but suddenly, it cannot complete any tasks as it keeps restarting them every time I have a look at the UI. Restarting the phone or clearing the cache of the app does not help. What worked for me earlier was to remove all app data and add the project again but that generates a new ID for this phone and I lose progress of the running tasks which sucks. Any ideas?

Here is the log from today morning after I restarted the phone. It's Huawei P20.

Tue Apr 28 09:52:00 GMT+02:00 2020|Rosetta@home|Scheduler request completed: got 0 new tasks
Tue Apr 28 09:51:39 GMT+02:00 2020|Rosetta@home|Requesting new tasks for Mali-G72
Tue Apr 28 09:51:39 GMT+02:00 2020|Rosetta@home|Sending scheduler request: To fetch work.
Tue Apr 28 09:51:39 GMT+02:00 2020||Resuming network activity
Tue Apr 28 09:51:37 GMT+02:00 2020||Suspending network activity - not connected to WiFi network
Tue Apr 28 09:51:37 GMT+02:00 2020||Suspending computation - on batteries
Tue Apr 28 09:51:30 GMT+02:00 2020||Not using a proxy
Tue Apr 28 09:51:30 GMT+02:00 2020||(to change preferences, visit a project web site or select Preferences in the Manager)
Tue Apr 28 09:51:30 GMT+02:00 2020||suspend work if non-BOINC CPU load exceeds 50%
Tue Apr 28 09:51:30 GMT+02:00 2020||don't use GPU while active
Tue Apr 28 09:51:30 GMT+02:00 2020||don't compute while active
Tue Apr 28 09:51:30 GMT+02:00 2020||max CPUs used: 4
Tue Apr 28 09:51:30 GMT+02:00 2020||max disk usage: 88.54GB
Tue Apr 28 09:51:30 GMT+02:00 2020||max memory usage when idle: 1844.19MB
Tue Apr 28 09:51:30 GMT+02:00 2020||max memory usage when active: 1844.19MB
Tue Apr 28 09:51:30 GMT+02:00 2020||Preferences:
Tue Apr 28 09:51:30 GMT+02:00 2020||Reading preferences override file
Tue Apr 28 09:51:30 GMT+02:00 2020|Rosetta@home|URL http://boinc.bakerlab.org/rosetta/; Computer ID 4160170; resource share 100
Tue Apr 28 09:51:30 GMT+02:00 2020||Config: report completed tasks immediately
Tue Apr 28 09:51:30 GMT+02:00 2020||Local time is UTC +2 hours
Tue Apr 28 09:51:30 GMT+02:00 2020||Disk: 111.44 GB total, 83.75 GB free
Tue Apr 28 09:51:30 GMT+02:00 2020||Memory: 3.60 GB physical, 2.19 GB virtual
Tue Apr 28 09:51:30 GMT+02:00 2020||OS: Android: 4.9.148
Tue Apr 28 09:51:30 GMT+02:00 2020||Processor features: fp asimd evtstrm aes pmull sha1 sha2 crc32
Tue Apr 28 09:51:30 GMT+02:00 2020||Using 4 CPUs
Tue Apr 28 09:51:30 GMT+02:00 2020||Processor: 8
Tue Apr 28 09:51:30 GMT+02:00 2020||Host name: android_ac767ac9
Tue Apr 28 09:51:30 GMT+02:00 2020||OpenCL: Mali-G72 0: Mali-G72 (driver version 2.0, device version OpenCL 2.0 v1.r14p0-00cet0.0416641283c5d6e2d53c163d0ca99357, 3637MB, 3637MB available, 0 GFLOPS peak)
Tue Apr 28 09:51:30 GMT+02:00 2020||Data directory: /data/data/edu.berkeley.boinc/client
Tue Apr 28 09:51:30 GMT+02:00 2020||Running as a daemon
Tue Apr 28 09:51:30 GMT+02:00 2020||Libraries: libcurl/7.48.0 OpenSSL/1.0.2g zlib/1.2.11
Tue Apr 28 09:51:30 GMT+02:00 2020||log flags: file_xfer, sched_ops, task
Tue Apr 28 09:51:30 GMT+02:00 2020||Starting BOINC client version 7.4.53 for aarch64-android-linux-gnu


I highlighted relevant lines.

1)
Tue Apr 28 09:51:30 GMT+02:00 2020||don't use GPU while active
Tue Apr 28 09:51:30 GMT+02:00 2020||don't compute while active

These appeared in my log too though I set DO computations while phone active. Some glitch in Android version?...Actually it obeys and compute. So why such lines in log - no idea.

2)
Tue Apr 28 09:51:30 GMT+02:00 2020||suspend work if non-BOINC CPU load exceeds 50%

This could be the reason of restarts. Change it to 100% via BOINC UI. Not very convenient default here causing computational errors.

3) Tue Apr 28 09:51:37 GMT+02:00 2020||Suspending computation - on batteries
And this could be the another reason - each time you unplug device it stops tasks. Eventually can lead to computational error due to too many restarts too.
Allow to use battery as power source in BOINC UI. And lower allowed battery level from default 90% to some you can tolerate (the lower level the faster battery drain will be but the longer BOINC will continue - this will give you time to use phone and re-connect it to power source w/o stopping tasks - decreases number of restarts).
Unfortunately, this option is bugged currently as discussed here:
https://boinc.berkeley.edu/forum_thread.php?id=13646 So time to time computations will stop causing one another task restart....
ID: 98117 · Report as offensive
ProfileDave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2691
United Kingdom
Message 98120 - Posted: 28 Apr 2020, 11:11:40 UTC
Last modified: 28 Apr 2020, 11:29:56 UTC

Just a thought,

recently, CPDN sent out some tasks where even on a fast computer, checkpoints were over 2 hours apart. This means that if BOINC stops for any reason, tasks would start again from scratch. I got around this by using suspend to ram or to disk on my computer. Since this was spotted, subsequent batches have all had much more reasonable intervals between checkpoints and the problem has gone.

While on Android, BOINC may not have stopped running, I wonder if it lost the work already done because of memory limitations combined with not reaching a checkpoint before the problem occurs? May be totally off the wall as I have never looked in detail at what happens on my phone when running BOINC.
ID: 98120 · Report as offensive
daghtus

Send message
Joined: 28 Apr 20
Posts: 3
Slovakia
Message 98142 - Posted: 29 Apr 2020, 6:42:13 UTC

Thank you guys for your reply.

@Raistmer: See, Android client sometimes gets suspended when I turn the screen on for no reason. It says it is running on batteries but it is of course not true. It takes it a few seconds to resume calculations.

@Dave: Checkpoints came to my mind, too but I'm afraid similar tasks from the same batch ran, got suspended and resumed again without any problem. What I noticed however is that Rosetta@Home is very RAM consuming (i.e. 1.7 GB or so). I sometimes saw warnings in the Projects section that the available memory was insufficient even after reboot of the phone which is very weird. This wouldn't stop BOINC from downloading and running tasks in a while, though.
ID: 98142 · Report as offensive
Raistmer

Send message
Joined: 9 Apr 06
Posts: 302
Message 98143 - Posted: 29 Apr 2020, 7:29:36 UTC - in response to Message 98142.  

Thank you guys for your reply.

@Raistmer: See, Android client sometimes gets suspended when I turn the screen on for no reason. It says it is running on batteries but it is of course not true. It takes it a few seconds to resume calculations.

Yes, battery detection handling somewhat bugged. It either can't understand battery fully charged or that it's not used at all...
ID: 98143 · Report as offensive
daghtus

Send message
Joined: 28 Apr 20
Posts: 3
Slovakia
Message 98210 - Posted: 30 Apr 2020, 6:01:57 UTC

Besides restarting tasks from scratch, I also noticed that the app sometimes keeps computing for a couple of dozens of minutes but the progress is stuck with like 2%. So I cleared app data, logged in again and voila, everything suddenly works fine. I wonder if this is some memory leak or silent data corruption or something. I do think it is app related, not project related.
ID: 98210 · Report as offensive
ProfileDave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2691
United Kingdom
Message 98213 - Posted: 30 Apr 2020, 11:41:04 UTC - in response to Message 98210.  

Besides restarting tasks from scratch, I also noticed that the app sometimes keeps computing for a couple of dozens of minutes but the progress is stuck with like 2%. So I cleared app data, logged in again and voila, everything suddenly works fine. I wonder if this is some memory leak or silent data corruption or something. I do think it is app related, not project related.


On the progress being stuck, I have seen some projects, can't remember which where some tasks will seem stuck for ages then there will be a big jump in progress.
ID: 98213 · Report as offensive
ProDigit

Send message
Joined: 8 Nov 19
Posts: 718
United States
Message 98658 - Posted: 19 May 2020, 18:44:44 UTC
Last modified: 19 May 2020, 18:47:11 UTC

The battery bug, is a minor bug.
Just modify the battery percentage (eg: to 10% more or less), or set it to 10%, or completely off.
It will resume.
Completely off isn't recommended though. I'd recommend to set it to 10%, and keep crunching on AC/USB power.

The battery bug happens occasionally when you leave your phone running for a prolonged amount of time.

Also, GPU for Android isn't relevant, as there are currently zero projects that support GPU crunching on Android.
If you care to ROM-Hack your cellphone (and run the risk of bricking it), to see if Linux allows for GPU crunching, would be awesome.
But I think very few projects support ARM GPUs (if any), whether it's over Android or Linux.
ID: 98658 · Report as offensive
John Elvin

Send message
Joined: 28 May 20
Posts: 1
United Kingdom
Message 98868 - Posted: 28 May 2020, 11:16:52 UTC - in response to Message 98658.  
Last modified: 28 May 2020, 11:30:32 UTC

Edit: Having seen this topic I saw that the suspensions are logged and have taken a look - from that it appears it may be overheating. I'm going to monitor because I'm sure when I spotted this first the phone didn't feel that hot. Also I wasn't seeing the "Waiting for battery to cool down" at the bottom.

I've just posted on my teams Facebook page about this and come here to find out if it was an acknowledged bug. This is what I posted:

I'm having a very silly issue with the Android app. Hard coded in to the app (with no option to turn it off) is that it will only run when the phone has the charger plugged in. When I started running this the phone was at about 90% charge and it ran great as it went up to 100%. I have found that there is an option to keep tasks running while the screen is on and so can now see what it is doing.

My phone must be turning off the charging circuits when fully charged (for obvious reasons), but must also be saying "I'm not being charged" so the app suspends all the tasks. A few seconds later everything else on the phone (screen and other apps) uses a bit of the battery so the phone decides to start charging again. The app then picks that it is charging again and resumes all the tasks.

I assume that the displayed battery percentage is rounded to integers and that what the app sees is probably 99.999... so to my mind, rather than "only run when charging", in addition to the minimum battery (defaults to 90%), it should say "always run if battery > 99.0%". OK it would mean it would run on battery for a short while when unplugged from fully charged, but only the short time it took to use 1% of the battery (which with the amount of CPU it uses wouldn't be long).

It varies depending upon other settings, but when I first noticed the issue it was suspending and resuming every 5-10 seconds.

This isn't a trivial bug, the constant suspending and resuming will be significantly reducing the ability to process tasks.

John
ID: 98868 · Report as offensive

Message boards : Android : Android client keeps restarting tasks after some time

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.