signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.59k stars 6.14k forks source link

Sudden Signal wakelock battery drain overnight #8794

Closed MarioVolarevic closed 5 years ago

MarioVolarevic commented 5 years ago

Bug description

I don't know whether this affected things, but Signal was updated yesterday. Then I went to sleep (didn't open Signal after an update) And in the morning when I woke up my battery was almost completely drained and there was a notification that an app is detected draining a battery. It seems that based on the graph, issue started to happen sometimes around 1 am and continued during the night.

Based on the logs and the wakelock GUID I see in the logs this message and it keeps repeating so I guess this is what kept waking the phone, but I don't know why since internet was working correctly in the morning when I woke up. And you can see that the Run Attempt corresponds to the one in the wakelock detector

2019-05-02 08:41:19.049 CEST I BaseJob: [1bf702b6-2d80-48b2-962a-a08525ab5aec][RotateCertificateJob] Encountered a retryable exception. (Time Since Submission: 31586687 ms, Lifespan: 86400000 ms, Run Attempt: 540732/Unlimited)
2019-05-02 08:41:19.049 CEST I BaseJob: org.whispersystems.signalservice.api.push.exceptions.PushNetworkException: java.net.UnknownHostException: Unable to resolve host "textsecure-service.whispersystems.org": No address associated with hostname
2019-05-02 08:41:19.049 CEST I BaseJob:     at org.whispersystems.signalservice.internal.push.PushServiceSocket.getServiceConnection(PushServiceSocket.java:962)

Screenshots

Device info

Device: Xiaomi Redmi Note 4 (nikel) Android version: 6.0 (V10.2.1.0.MBFMIXM, MRA58K) Signal version: Signal 4.38.3

Link to debug log

Screenshot_2019-05-02-08-43-26-331_com uzumapps wakelockdetector noroot Screenshot_2019-05-02-08-45-23-938_com gsamlabs bbm Screenshot_2019-05-02-09-16-20-602_com miui securitycenter

https://debuglogs.org/39840d545a13427cd156205e35146aef731f7aaf95a2bb6c89c0945d087fa6b5

greyson-signal commented 5 years ago

Hey there, this issue will be largely mitigated by 1e564b6ad1af95eec3e57fb406f4fce4b508f6ca, which is currently in the 4.39.x beta. Feel free to join. Thanks!