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

Freeze and crash during Damus update to 1.7 on devices with low disk space available #1912

Closed
danieldaquino opened this issue Jan 24, 2024 · 7 comments
Labels
bug Something is not working, or not working as intended
Milestone

Comments

@danieldaquino
Copy link
Contributor

Summary

Some users are reporting that they are seeing Damus freeze or become very slow once they update to 1.7 (2) on TestFlight.

Some crash reports from these users indicate that they are running low on disk space (usually less than 800MB).

The root cause is not certain, but I believe the app is crashing due to a lack of disk space during NostrDB migration from the individual app container to the shared container.

Preconditions

iOS: 17
Damus: During upgrade from 1.6 to 1.7 (2)
Disk space available: Between 500MB and 800MB (roughly)

@danieldaquino
Copy link
Contributor Author

Related tickets:

Possible solutions:

  • Detect disk space available before migration, and start a new NostrDB from scratch on the new container if there is no disk space
  • Trigger the NostrDB migration only when the user opts-in the Push notifications feature, and prevent them from doing so if there isn’t enough disk space

Possible improvements to avoid this type of situation:

  • Limit NostrDB space usage to a fraction (Maybe 1/2) of the storage available to the app, and purge notes more aggressively when running low on disk space

@danieldaquino danieldaquino added the bug Something is not working, or not working as intended label Jan 24, 2024
@danieldaquino
Copy link
Contributor Author

We received one report of similar symptoms, but no apparent lack of storage space on their device.

@alltheseas
Copy link
Collaborator

We received one report of similar symptoms, but no apparent lack of storage space on their device.

#1913

@danieldaquino
Copy link
Contributor Author

Another thought: I looked again at the file container migration code, and there are error catchers in place to fail smoothly in case the file operation fails

This reduces the chance of the container migration issue hypothesis. Unless it is failing in an indirect way (e.g. operation takes too long, hangs the app for a long time, and some kind of iOS watchdog kills the app)

@alltheseas
Copy link
Collaborator

1.7 (3) does not crash for me

@danieldaquino
Copy link
Contributor Author

@alltheseas, thank you for checking!

Since the crashes might not have been caused by low storage space, and the crash is being addressed on a separate ticket, maybe we can close this ticket, and work on low-storage handling improvements under #1619?

@alltheseas
Copy link
Collaborator

Agree

Closing

@alltheseas alltheseas closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working, or not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants