Skip to content

fix: storage_flush check thread exists before joining - #554

Open
shikl3x7 wants to merge 1 commit into
siemens:nextfrom
shikl3x7:storage_fix_flush
Open

fix: storage_flush check thread exists before joining#554
shikl3x7 wants to merge 1 commit into
siemens:nextfrom
shikl3x7:storage_fix_flush

Conversation

@shikl3x7

@shikl3x7 shikl3x7 commented Dec 16, 2025

Copy link
Copy Markdown

Some issue are observed during storage write, it happens when the storage_flush is called by client. At server thread join is tried when flush is called to writer, since the stop has already been called thread for the instance is already reinitialized to none, Due to this at client we observe errors stating calling join on None type.

Tested-by: Gourav Singh gourav.singh.ext@siemens.com
Signed-off-by: Shivaschandra KL shivaschandra.k-l@siemens.com

@github-actions
github-actions Bot requested a review from chombourger December 16, 2025 09:15
@shikl3x7

Copy link
Copy Markdown
Author

Error observed at client during the storage write

gourav@gourav:~/images/lx1/example$ mtda-cli -r 134.86.254.94 storage write isar-image-installer-lx1-x86-uefi.wic
Discovered bmap file 'isar-image-installer-lx1-x86-uefi.wic.bmap'
isar-image-installer-lx1-x86-uefi.wic: [####################] 100% (650 MiB read, 5.70 GiB written, 36 KiB/s)

'storage write' failed! ('NoneType' object has no attribute 'join')

Comment thread mtda/storage/writer.py
@shikl3x7

Copy link
Copy Markdown
Author

@chombourger we checked on latest version also we still see this issue intermittently; this fix is currently applied in all our MTDA. Please review this and suggest :)

Some issue are observed during storage write, happens when
the storage_flush is called by client. At server thread join is tried
when flush is called in writer, since the stop has already been called
thread for the instance is already reinitialized to none, Due to this
the at client we observe errors stating calling join on None type.

Tested-by: Gourav Singh <gourav.singh.ext@siemens.com>
Signed-off-by: Shivaschandra KL <shivaschandra.k-l@siemens.com>
@chombourger

Copy link
Copy Markdown
Collaborator

a flush-after-stop test could easily be added to tests/test_storage.py. this way we get a reproducer (write the test before pulling your fix and then confirm that the issue is gone by running the test again)

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

Successfully merging this pull request may close these issues.

3 participants