~aleteoryx/muditaos

7a7f1637d7bb250743eed0b82206b7dccea55927 — Roman Kubiak 4 years ago 4cff599
[EGD-6130] Fix update process (stack size, fscopy)

Increase stack size for service-desktop to 8192
Change fs syscall rename() to copy() (rename seems
to fail when moving data across different filesystems)
M module-services/service-desktop/endpoints/update/UpdateMuditaOS.cpp => module-services/service-desktop/endpoints/update/UpdateMuditaOS.cpp +2 -3
@@ 438,9 438,8 @@ updateos::UpdateError UpdateMuditaOS::prepareRoot()
    // rename the temp directory to current (extracted update)
    informDebug("prepareRoot copy: %s->%s", updateTempDirectory.c_str(), currentOSPath.c_str());
    try {
        // std::filesystem::copy(updateTempDirectory.c_str(), currentOSPath.c_str(),
        // std::filesystem::copy_options::recursive);
        std::filesystem::rename(updateTempDirectory.c_str(), currentOSPath.c_str());
        std::filesystem::copy(
            updateTempDirectory.c_str(), currentOSPath.c_str(), std::filesystem::copy_options::recursive);
    }
    catch (const std::filesystem::filesystem_error &fsError) {
        return informError(updateos::UpdateError::CantCopyTempToCurrent,

M module-services/service-desktop/service-desktop/ServiceDesktop.hpp => module-services/service-desktop/service-desktop/ServiceDesktop.hpp +1 -1
@@ 23,7 23,7 @@ namespace settings

namespace sdesktop
{
    inline constexpr auto service_stack             = 5120;
    inline constexpr auto service_stack             = 8192;
    inline constexpr auto worker_stack              = 8704;
    inline constexpr auto cdc_queue_len             = 32;
    inline constexpr auto cdc_queue_object_size     = 1024;