InfiniTimeOrg / InfiniTimeOrg/InfiniTime

Watch crashes when updating settings after filesystem read via BLE

Open
#1,579 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Verification
  • I searched for similar bug reports and found none was relevant.
What happened?

Running ReadDir via BLE followed by any setting update causes a crash

What should happen instead?

It should save the settings and not crash

Reproduction steps

Simplest way is using itd.

  1. Connect to the Pinetime via itd and look at the filesystem via itgui
  2. Disconnect the Pinetime from Bluetooth
  3. Open Settings, change something and press the Pinetime button
  4. It will hang for a while and then crash
More details?

By closer inspection we found that the issue is unrelated to itd. It can be triggered by issuing an "ls" command directly using the Adafruit protocol (for example with a Python script), and that the crash occurs when there is an attempt to write to the filesystem.

We believe that some data structure of LittleFS becomes corrupted when FS operations are triggered via BLE.

Version

1.11.0

Companion app

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash with a filesystem read through the Adafruit protocol, then a settings update, using the listed itd and Python-script scenarios. Trace the BLE-triggered filesystem read through the subsequent filesystem write; done means settings save successfully without a hang or crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.