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

JSON file suddenly empty #2884

Closed
JordanLBogdanov opened this issue Aug 5, 2024 · 8 comments
Closed

JSON file suddenly empty #2884

JordanLBogdanov opened this issue Aug 5, 2024 · 8 comments

Comments

@JordanLBogdanov
Copy link

One of the json files, which is used for TPM NVRAM index data, suddenly becomes empty.

Has someone else encountered such a beast?
I am attaching the log file.

tss2_logfile.txt

Some additional info:
It seems like this issue coincided with the SATA flash drive memory running out (had left the logfile writing option ON for some time and the tss2_logfile.txt had become 4GB+).
I think the two are not interconnected, because this issue (the empty json file) happened few times in the near past, and if memory serves me well, the out-of-hard-drive-space problem hadnt been encountered at the same time before that.

@JordanLBogdanov
Copy link
Author

@JuergenReppSIT do you have any insight on the matter?

@JuergenReppSIT
Copy link
Member

@JordanLBogdanov Did the problem also occur when enough space was available on the hard drive?

@JordanLBogdanov
Copy link
Author

@JuergenReppSIT it has not occurred since I posted this issue. But from what I remember it has happened with even enough hard drive space available. I will keep an eye out for that.
I would be thankful if you could spare a look at the logfile to see if there is something suspicious.

@JuergenReppSIT
Copy link
Member

@JordanLBogdanov If not enough space is available the reason might be that an unnecessary write to keystore is executed in your case. This should be fixed with:
#2883
But in other cases where the write is necessary it still will be a problem. If enough space is available I have no explanation.

@JordanLBogdanov
Copy link
Author

Thank you.

@JordanLBogdanov
Copy link
Author

Reopening the issue for a short discussion.

@JuergenReppSIT regarding the earlier issue with the suddenly-empty json file, do you know what would be the result of powering down the PC, during a writing operation to the TPM chip's nvram.

Can you please test this, when you have the time.
Thank you so much in advance.

@JuergenReppSIT
Copy link
Member

@JordanLBogdanov I did run a test where I wrote a big file to nvram and did power down the RaspberryPi during the write operation. Afterwards I checked the content of the NV ram and saw that only half of the data was written to nvram. The FAPI nv object still could be used and the JSON file in the keystore was OK.

@JordanLBogdanov
Copy link
Author

@JuergenReppSIT thank you a lot for your effort.
We will continue to investigate this behavior. Have a good workday and weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants