patchew-project / patchew

A patch email tracking and testing system
MIT License
73 stars 24 forks source link

imported() in scripts/patchew-importer causes host inode outage #85

Closed famz closed 5 years ago

famz commented 6 years ago

The imported dir is not cleaned up every time the importer docker instance restarts, and the hashes of the same message change with each instance restart. The result is the if the instance keeps restarting due to some issue, the imported dir can have infinitely growing entries (files). This can eventually cause 100% inode usage on the system.

The imported() code needs rewrite to avoid this. One possible way is using a DB file like SQLite, or it can be a set of files containing message hashes in each line and searched with grep.

bonzini commented 5 years ago

"Fixed" by commit e6fba8d7d27f2c24173a250584e21dff912c8608. imported() is not used anymore unless IMAP_DELETE_AFTER_IMPORT=y, which should only be used for testing.