NebraLtd / hm-diag

Helium Miner Diagnostics
https://nebra.io/hnt
MIT License
21 stars 24 forks source link

Sometimes diagnostics report returns with missing information #299

Open MuratUrsavas opened 2 years ago

MuratUrsavas commented 2 years ago

This happened to me couple of times in two days and also seen on @vpetersson's RAK device, too

image

Also diagnostics return very slow.This might be due to some internal timeouts and could be the source of the missing animal name.

shawaj commented 2 years ago

that implies it has not read the ECC key

is there an error message in the logs?

vpetersson commented 2 years ago

We should not report All OK in this state either.

shawaj commented 2 years ago

Weird thing is the ECC is detected (meaning tests have passed?) But no animal name.

Maybe it isn't the ECC but some other bug

shawaj commented 2 years ago

Also how did you get the dark theme on diagnostics @MuratUrsavas 🤔

Didn't know that was possible 😂

vpetersson commented 2 years ago

i mean, there are multiple issues here:

shawaj commented 2 years ago

It doesn't need an animal name to sync but other than that yeah

MuratUrsavas commented 2 years ago

Also how did you get the dark theme on diagnostics @MuratUrsavas thinking

Didn't know that was possible joy

:smile: @shawaj It is Dark Reader extension (https://github.com/darkreader/darkreader). It works well with 90% of sites. I recommend it.

MuratUrsavas commented 2 years ago

that implies it has not read the ECC key

is there an error message in the logs?

@shawaj I remember that in some similar reports, the ECC key result was False. So it might be marked as "True" incorrectly in this one. Not checked the logs but will take a look into it.

MuratUrsavas commented 2 years ago

ECC Detected = True It could be detected perhaps, but not properly provisioned?

I don't think this is the case. It was already provisioned in two devices which I've seen.

Sync Percentage = 100% Theoretically possible i presume, but seems unlikely if it has no Animal Name

Again, it is a temporary issue, not caused by ECC provisioning. So it could be 100% at the moment.

Animal Name Unavailable This should be unlikely if the ECC has been provisioned

This is the bug we need to solve but doesn't happen consistently.

All OK Clearly not the case given that it has no Animal Name

The bug could be in our side since Diagnostics is failing to load in timely manner sometimes. So we could be dropping the ball in the process.

shawaj commented 2 years ago

Possibly could be due to another process using the ECC at the time or something? A clash of some sort

MuratUrsavas commented 2 years ago

In normal conditions, it shouldn't be. Because ECC is managed under file system and kernel should be queuing the requests.

vpetersson commented 2 years ago

@MuratUrsavas we've had a long-running hypothesis that we get various ECC related errors due to collisions on the I2C bus. Basically, there is likely a very short lock on the bus when a process is accessing it (unclear if it is both for read and write operations).

KevinWassermann94 commented 2 years ago

Would make sense with the occasional ECC errors we have seen.

I have only noticed the animal name unavailable a few times now. The ECC always remained true

MuratUrsavas commented 2 years ago

@MuratUrsavas we've had a long-running hypothesis that we get various ECC related errors due to collisions on the I2C bus. Basically, there is likely a very short lock on the bus when a process is accessing it (unclear if it is both for read and write operations).

@vpetersson if that's the case, we now have to be very careful about that since we'll be opening another channel to ECC.

shawaj commented 1 year ago

Not sure if this is really still a problem at all @KevinWassermann94 @WayneNebra ?