Electronic Resource
A hot-repair method for the running software with zero suspends
Repairing software defects is crucial to improving the security and robustness of software. Traditional methods repair software defects by using the “stop-repair-restart” approach. Unfortunately, in some scenarios, such as cloud environments, restarting critical software is expensive. Dynamic methods enable the defect repair while the software is running, which can avoid software restart. However, dynamic repair requires capture the safe state of the running software (process). Otherwise, it will cause execution exceptions or even process crashes. To address the complex state issues in multi-threaded environments, existing methods modify the kernel or compiler, or even pre-adding custom code to the target software, which reduces their generality. To solve this problem, we propose a hot repair method HotFix, which can fix the defects without any software suspending. HotFix places probes in the process to receive state signals, which can avoid complex and time-consuming state identification. Then, it selects the safe zone and repairs the defects when the code in the safe zone is called, which can prevent the target process from hanging for a long time. Finally, HotFix completes multi-threaded automated migration online. Experiments and analysis show that HotFix can achieve hot repair in complex environments. We found that the affected function was executed no more than 1,000 times during the fix. Introducing 3us and 11us delays per request respectively when repairing Redis and Mem cached, and the requests influenced are limited.
Memperbaiki cacat perangkat lunak sangat penting untuk meningkatkan keamanan dan ketahanan perangkat lunak. Metode tradisional memperbaiki cacat perangkat lunak dengan pendekatan "hentikan-perbaiki-mulai ulang". Sayangnya, dalam beberapa skenario, seperti lingkungan cloud, memulai ulang perangkat lunak penting membutuhkan biaya yang mahal. Metode dinamis memungkinkan perbaikan cacat saat perangkat lunak sedang berjalan, yang dapat menghindari memulai ulang perangkat lunak. Namun, perbaikan dinamis memerlukan perekaman status aman dari perangkat lunak (proses) yang sedang berjalan. Jika tidak, hal ini akan menyebabkan pengecualian eksekusi atau bahkan crash proses. Untuk mengatasi masalah status yang kompleks dalam lingkungan multi-thread, metode yang ada memodifikasi kernel atau compiler, atau bahkan menambahkan kode khusus terlebih dahulu ke perangkat lunak target, yang mengurangi generalitasnya. Untuk mengatasi masalah ini, kami mengusulkan metode perbaikan cepat (hotfix), yang dapat memperbaiki cacat tanpa penangguhan perangkat lunak. Hotfix menempatkan probe dalam proses untuk menerima sinyal status, yang dapat menghindari identifikasi status yang rumit dan memakan waktu. Kemudian, Hotfix memilih zona aman dan memperbaiki cacat ketika kode di zona aman dipanggil, yang dapat mencegah proses target macet dalam waktu lama. Akhirnya, HotFix menyelesaikan migrasi otomatis multi-utas daring. Eksperimen dan analisis menunjukkan bahwa HotFix dapat mencapai perbaikan panas (hot repair) di lingkungan yang kompleks. Kami menemukan bahwa fungsi yang terdampak dieksekusi tidak lebih dari 1.000 kali selama perbaikan. Penundaan 3us dan 11us per permintaan masing-masing diperkenalkan saat memperbaiki Redis dan Mem yang di-cache, dan permintaan yang terdampak pun terbatas.
Tidak ada salinan data
Tidak tersedia versi lain