From de3ae94ee6d037d713ebae9a4224be6ce9607d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=86=AC=E5=86=AC=E5=86=AC?= Date: Tue, 29 Jul 2025 12:07:26 +0800 Subject: [PATCH] Message:get app_running_id value optimization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑冬冬冬 --- .../native/appkit/dfr/appfreeze_inner.cpp | 15 ++++++ .../app_manager/include/appmgr/fault_data.h | 14 +++-- .../app_manager/src/appmgr/fault_data.cpp | 53 +++++++++++++++++++ .../kits/native/appkit/dfr/appfreeze_inner.h | 1 + services/appdfr/src/appfreeze_manager.cpp | 44 ++++++++------- .../appdfr/src/application_anr_listener.cpp | 10 +++- services/appmgr/src/app_mgr_service_inner.cpp | 16 ++++++ .../appfreeze_inner_test.cpp | 15 ++++++ .../appfreeze_manager_test.cpp | 2 +- test/unittest/fault_data/fault_data_test.cpp | 8 +++ 10 files changed, 153 insertions(+), 25 deletions(-) diff --git a/frameworks/native/appkit/dfr/appfreeze_inner.cpp b/frameworks/native/appkit/dfr/appfreeze_inner.cpp index b56ae785ec..f94a3cda4e 100644 --- a/frameworks/native/appkit/dfr/appfreeze_inner.cpp +++ b/frameworks/native/appkit/dfr/appfreeze_inner.cpp @@ -89,6 +89,17 @@ bool AppfreezeInner::IsHandleAppfreeze() return !isAppDebug_; } +std::string AppfreezeInner::GetProcStatm(int32_t pid) +{ + std::string procStatm; + std::ifstream statmStream("/proc/" + std::to_string(pid) + "/statm"); + if (statmStream) { + std::getline(statmStream, procStatm); + statmStream.close(); + } + return procStatm; +} + void AppfreezeInner::GetMainHandlerDump(std::string& msgContent) { msgContent = "\nMain handler dump start time: " + AbilityRuntime::TimeUtil::DefaultCurrentTimeStr() + "\n"; @@ -143,6 +154,7 @@ void AppfreezeInner::AppfreezeHandleOverReportCount(bool isSixSecondEvent) faultData.timeoutMarkers = ""; if (isSixSecondEvent) { faultData.errorObject.name = AppFreezeType::THREAD_BLOCK_6S; + faultData.procStatm = GetProcStatm(static_cast(getpid())); } else { faultData.errorObject.name = AppFreezeType::THREAD_BLOCK_3S; } @@ -224,6 +236,8 @@ int AppfreezeInner::AcquireStack(const FaultData& info, bool onlyMainThread) faultData.eventId = it->eventId; faultData.needKillProcess = it->needKillProcess; faultData.appfreezeInfo = it->appfreezeInfo; + faultData.appRunningUniqueId = it->appRunningUniqueId; + faultData.procStatm = it->procStatm; ChangeFaultDateInfo(faultData, msgContent); } return 0; @@ -244,6 +258,7 @@ void AppfreezeInner::ThreadBlock(std::atomic_bool& isSixSecondEvent) #ifdef APP_NO_RESPONSE_DIALOG isSixSecondEvent.store(false); #endif + faultData.procStatm = GetProcStatm(static_cast(getpid())); } else { faultData.errorObject.name = AppFreezeType::THREAD_BLOCK_3S; isSixSecondEvent.store(true); diff --git a/interfaces/inner_api/app_manager/include/appmgr/fault_data.h b/interfaces/inner_api/app_manager/include/appmgr/fault_data.h index ea1faee711..a9427a266c 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/fault_data.h +++ b/interfaces/inner_api/app_manager/include/appmgr/fault_data.h @@ -59,8 +59,9 @@ public: */ struct FaultData : public Parcelable { bool ReadFromParcel(Parcel &parcel); - bool WriteContent(Parcel &parcel) const; + bool ReadContent(Parcel &parcel); virtual bool Marshalling(Parcel &parcel) const override; + bool WriteContent(Parcel &parcel) const; static FaultData *Unmarshalling(Parcel &parcel); // error object ErrorObject errorObject; @@ -76,6 +77,8 @@ struct FaultData : public Parcelable { uint32_t stuckTimeout = 0; sptr token = nullptr; std::string appfreezeInfo; + std::string appRunningUniqueId; + std::string procStatm; }; /** @@ -84,14 +87,15 @@ struct FaultData : public Parcelable { */ struct AppFaultDataBySA : public Parcelable { bool ReadFromParcel(Parcel &parcel); + bool ReadContent(Parcel &parcel); + virtual bool Marshalling(Parcel &parcel) const override; + bool WriteErrorObject(Parcel &parcel) const; bool WriteContent(Parcel &parcel) const; + static AppFaultDataBySA *Unmarshalling(Parcel &parcel); bool waitSaveState = false; bool notifyApp = false; bool forceExit = false; bool needKillProcess = true; - bool WriteErrorObject(Parcel &parcel) const; - virtual bool Marshalling(Parcel &parcel) const override; - static AppFaultDataBySA *Unmarshalling(Parcel &parcel); // error object ErrorObject errorObject; FaultDataType faultType = FaultDataType::UNKNOWN; @@ -101,6 +105,8 @@ struct AppFaultDataBySA : public Parcelable { sptr token = nullptr; std::string timeoutMarkers; std::string appfreezeInfo; + std::string appRunningUniqueId; + std::string procStatm; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/interfaces/inner_api/app_manager/src/appmgr/fault_data.cpp b/interfaces/inner_api/app_manager/src/appmgr/fault_data.cpp index 8bb221a980..4f4129e1f6 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/fault_data.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/fault_data.cpp @@ -71,6 +71,22 @@ bool FaultData::ReadFromParcel(Parcel &parcel) return false; } appfreezeInfo = strValue; + return ReadContent(parcel); +} + +bool FaultData::ReadContent(Parcel &parcel) +{ + std::string strValue; + if (!parcel.ReadString(strValue)) { + TAG_LOGE(AAFwkTag::APPMGR, "AppRunningUniqueId read string failed."); + return false; + } + appRunningUniqueId = strValue; + if (!parcel.ReadString(strValue)) { + TAG_LOGE(AAFwkTag::APPMGR, "ProcStatm read string failed."); + return false; + } + procStatm = strValue; return true; } @@ -107,6 +123,16 @@ bool FaultData::WriteContent(Parcel &parcel) const TAG_LOGE(AAFwkTag::APPMGR, "AppfreezeInfo [%{public}s] write string failed.", appfreezeInfo.c_str()); return false; } + + if (!parcel.WriteString(appRunningUniqueId)) { + TAG_LOGE(AAFwkTag::APPMGR, "AppRunningUniqueId [%{public}s] write string failed.", appRunningUniqueId.c_str()); + return false; + } + + if (!parcel.WriteString(procStatm)) { + TAG_LOGE(AAFwkTag::APPMGR, "ProcStatm [%{public}s] write string failed.", procStatm.c_str()); + return false; + } return true; } @@ -230,6 +256,23 @@ bool AppFaultDataBySA::ReadFromParcel(Parcel &parcel) return false; } appfreezeInfo = strValue; + return ReadContent(parcel); +} + +bool AppFaultDataBySA::ReadContent(Parcel &parcel) +{ + std::string strValue; + if (!parcel.ReadString(strValue)) { + TAG_LOGE(AAFwkTag::APPMGR, "AppRunningUniqueId read string failed."); + return false; + } + appRunningUniqueId = strValue; + + if (!parcel.ReadString(strValue)) { + TAG_LOGE(AAFwkTag::APPMGR, "ProcStatm read string failed."); + return false; + } + procStatm = strValue; return true; } @@ -261,6 +304,16 @@ bool AppFaultDataBySA::WriteContent(Parcel &parcel) const TAG_LOGE(AAFwkTag::APPMGR, "AppfreezeInfo [%{public}s] write string failed.", appfreezeInfo.c_str()); return false; } + + if (!parcel.WriteString(appRunningUniqueId)) { + TAG_LOGE(AAFwkTag::APPMGR, "AppRunningUniqueId [%{public}s] write string failed.", appRunningUniqueId.c_str()); + return false; + } + + if (!parcel.WriteString(procStatm)) { + TAG_LOGE(AAFwkTag::APPMGR, "ProcStatm [%{public}s] write string failed.", procStatm.c_str()); + return false; + } return true; } diff --git a/interfaces/kits/native/appkit/dfr/appfreeze_inner.h b/interfaces/kits/native/appkit/dfr/appfreeze_inner.h index 90f4bc3bf7..8b4c04da7c 100644 --- a/interfaces/kits/native/appkit/dfr/appfreeze_inner.h +++ b/interfaces/kits/native/appkit/dfr/appfreeze_inner.h @@ -54,6 +54,7 @@ private: int NotifyANR(const FaultData& faultData); bool IsExitApp(const std::string& name); bool IsHandleAppfreeze(); + std::string GetProcStatm(int32_t pid); static std::mutex singletonMutex_; static std::shared_ptr instance_; diff --git a/services/appdfr/src/appfreeze_manager.cpp b/services/appdfr/src/appfreeze_manager.cpp index f4afb389fa..06fe5800b2 100644 --- a/services/appdfr/src/appfreeze_manager.cpp +++ b/services/appdfr/src/appfreeze_manager.cpp @@ -227,6 +227,8 @@ int AppfreezeManager::AppfreezeHandleWithStack(const FaultData& faultData, const faultNotifyData.eventId = faultData.eventId; faultNotifyData.tid = faultData.tid; faultNotifyData.appfreezeInfo = faultData.appfreezeInfo; + faultNotifyData.appRunningUniqueId = faultData.appRunningUniqueId; + faultNotifyData.procStatm = faultData.procStatm; HITRACE_METER_FMT(HITRACE_TAG_APP, "AppfreezeHandleWithStack pid:%d-name:%s", appInfo.pid, faultData.errorObject.name.c_str()); @@ -263,36 +265,40 @@ std::string AppfreezeManager::WriteToFile(const std::string& fileName, std::stri int AppfreezeManager::LifecycleTimeoutHandle(const ParamInfo& info, FreezeUtil::LifecycleFlow flow) { - if (info.typeId != AppfreezeManager::TypeAttribute::CRITICAL_TIMEOUT) { + if (info.typeId != AppfreezeManager::TypeAttribute::CRITICAL_TIMEOUT || !IsHandleAppfreeze(info.bundleName)) { return -1; } - if (!IsHandleAppfreeze(info.bundleName)) { + if (info.eventName != AppFreezeType::LIFECYCLE_TIMEOUT && info.eventName != AppFreezeType::LIFECYCLE_HALF_TIMEOUT + && info.eventName != AppFreezeType::LIFECYCLE_TIMEOUT_WARNING + && info.eventName != AppFreezeType::LIFECYCLE_HALF_TIMEOUT_WARNING) { return -1; } - if (info.eventName != AppFreezeType::LIFECYCLE_TIMEOUT && - info.eventName != AppFreezeType::LIFECYCLE_TIMEOUT_WARNING && - info.eventName != AppFreezeType::LIFECYCLE_HALF_TIMEOUT && - info.eventName != AppFreezeType::LIFECYCLE_HALF_TIMEOUT_WARNING) { - return -1; - } - TAG_LOGD(AAFwkTag::APPDFR, "called %{public}s, name_ %{public}s", info.bundleName.c_str(), - name_.c_str()); + TAG_LOGD(AAFwkTag::APPDFR, "called %{public}s, name_ %{public}s", info.bundleName.c_str(), name_.c_str()); HITRACE_METER_FMT(HITRACE_TAG_APP, "LifecycleTimeoutHandle:%{public}s bundleName:%{public}s", info.eventName.c_str(), info.bundleName.c_str()); + AppFaultDataBySA faultDataSA; + if (info.eventName.find("HALF") == std::string::npos) { + std::ifstream statmStream("/proc/" + std::to_string(info.pid) + "/statm"); + if (statmStream) { + std::string procStatm; + std::getline(statmStream, procStatm); + statmStream.close(); + faultDataSA.procStatm = procStatm; + } + } faultDataSA.errorObject.name = info.eventName; faultDataSA.errorObject.message = info.msg; faultDataSA.errorObject.stack = "\nDump tid stack start time:" + AbilityRuntime::TimeUtil::DefaultCurrentTimeStr() + "\n"; - std::string stack = ""; + std::string stack; if (!HiviewDFX::GetBacktraceStringByTidWithMix(stack, info.pid, 0, true)) { stack = "Failed to dump stacktrace for " + stack; } faultDataSA.errorObject.stack += stack + "\nDump tid stack end time:" + AbilityRuntime::TimeUtil::DefaultCurrentTimeStr() + "\n"; faultDataSA.faultType = FaultDataType::APP_FREEZE; - faultDataSA.timeoutMarkers = "notifyFault" + - std::to_string(info.pid) + + faultDataSA.timeoutMarkers = "notifyFault" + std::to_string(info.pid) + "-" + std::to_string(AbilityRuntime::TimeUtil::CurrentTimeMillis()); faultDataSA.pid = info.pid; faultDataSA.needKillProcess = info.needKillProcess; @@ -314,6 +320,8 @@ FaultData AppfreezeManager::GetFaultNotifyData(const FaultData& faultData, int p faultNotifyData.eventId = faultData.eventId; faultNotifyData.tid = (faultData.errorObject.name == AppFreezeType::APP_INPUT_BLOCK) ? pid : faultData.tid; faultNotifyData.appfreezeInfo = faultData.appfreezeInfo; + faultNotifyData.appRunningUniqueId = faultData.appRunningUniqueId; + faultNotifyData.procStatm = faultData.procStatm; return faultNotifyData; } @@ -419,9 +427,7 @@ std::string AppfreezeManager::ReportAppfreezeCpuInfo(const FaultData& faultData, int AppfreezeManager::NotifyANR(const FaultData& faultData, const AppfreezeManager::AppInfo& appInfo, const std::string& binderInfo, const std::string& memoryContent) { - std::string appRunningUniqueId = ""; - DelayedSingleton::GetInstance()->GetAppRunningUniqueIdByPid(appInfo.pid, - appRunningUniqueId); + std::string appRunningUniqueId = faultData.appRunningUniqueId; int ret = 0; this->PerfStart(faultData.errorObject.name); int64_t startTime = AbilityRuntime::TimeUtil::CurrentTimeMillis(); @@ -431,7 +437,7 @@ int AppfreezeManager::NotifyANR(const FaultData& faultData, const AppfreezeManag EVENT_PACKAGE_NAME, appInfo.bundleName, EVENT_PROCESS_NAME, appInfo.processName, EVENT_MESSAGE, faultData.errorObject.message, EVENT_STACK, faultData.errorObject.stack, BINDER_INFO, binderInfo, APP_RUNNING_UNIQUE_ID, appRunningUniqueId, EVENT_INPUT_ID, faultData.eventId, - FREEZE_MEMORY, memoryContent); + FREEZE_MEMORY, memoryContent + "\n" + faultData.procStatm); } else if (faultData.errorObject.name == AppFreezeType::THREAD_BLOCK_6S) { HitraceInfo info; bool hitraceIsValid = GetHitraceId(info); @@ -440,7 +446,7 @@ int AppfreezeManager::NotifyANR(const FaultData& faultData, const AppfreezeManag EVENT_TID, faultData.tid, EVENT_PACKAGE_NAME, appInfo.bundleName, EVENT_PROCESS_NAME, appInfo.processName, EVENT_MESSAGE, faultData.errorObject.message, EVENT_STACK, faultData.errorObject.stack, BINDER_INFO, binderInfo, - APP_RUNNING_UNIQUE_ID, appRunningUniqueId, FREEZE_MEMORY, memoryContent, + APP_RUNNING_UNIQUE_ID, appRunningUniqueId, FREEZE_MEMORY, memoryContent + "\n" + faultData.procStatm, EVENT_TRACE_ID, hitraceIsValid ? info.hiTraceChainId : "", EVENT_SPAN_ID, hitraceIsValid ? info.spanId : "", EVENT_PARENT_SPAN_ID, hitraceIsValid ? info.pspanId : "", @@ -452,7 +458,7 @@ int AppfreezeManager::NotifyANR(const FaultData& faultData, const AppfreezeManag EVENT_TID, faultData.tid > 0 ? faultData.tid : appInfo.pid, EVENT_PACKAGE_NAME, appInfo.bundleName, EVENT_PROCESS_NAME, appInfo.processName, EVENT_MESSAGE, faultData.errorObject.message, EVENT_STACK, faultData.errorObject.stack, BINDER_INFO, binderInfo, - APP_RUNNING_UNIQUE_ID, appRunningUniqueId, FREEZE_MEMORY, memoryContent, + APP_RUNNING_UNIQUE_ID, appRunningUniqueId, FREEZE_MEMORY, memoryContent + "\n" + faultData.procStatm, FREEZE_INFO_PATH, ReportAppfreezeCpuInfo(faultData, appInfo)); } TAG_LOGW(AAFwkTag::APPDFR, diff --git a/services/appdfr/src/application_anr_listener.cpp b/services/appdfr/src/application_anr_listener.cpp index de66ff4342..5dc02de982 100644 --- a/services/appdfr/src/application_anr_listener.cpp +++ b/services/appdfr/src/application_anr_listener.cpp @@ -16,6 +16,7 @@ #include "application_anr_listener.h" #include +#include #include "singleton.h" #include "app_mgr_client.h" @@ -34,12 +35,19 @@ ApplicationAnrListener::~ApplicationAnrListener() {} void ApplicationAnrListener::OnAnr(int32_t pid, int32_t eventId) const { AppExecFwk::AppFaultDataBySA faultData; + std::ifstream statmStream("/proc/" + std::to_string(pid) + "/statm"); + if (statmStream) { + std::string procStatm; + std::getline(statmStream, procStatm); + statmStream.close(); + faultData.procStatm = procStatm; + } faultData.faultType = AppExecFwk::FaultDataType::APP_FREEZE; faultData.pid = pid; faultData.errorObject.message = "User input does not respond!"; faultData.errorObject.stack = "\nDump tid stack start time: " + AbilityRuntime::TimeUtil::DefaultCurrentTimeStr() + "\n"; - std::string stack = ""; + std::string stack; if (!HiviewDFX::GetBacktraceStringByTidWithMix(stack, pid, 0, true)) { stack = "Failed to dump stacktrace for " + std::to_string(pid) + "\n" + stack; } diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 6814d00e87..512599873e 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -7233,6 +7233,15 @@ int32_t AppMgrServiceInner::NotifyAppFault(const FaultData &faultData) return ERR_OK; } } + + if (appRunningManager_ && eventName.find("THREAD_BLOCK_") != std::string::npos) { + std::string appRunningUniqueId; + int32_t ret = appRunningManager_->GetAppRunningUniqueIdByPid(pid, appRunningUniqueId); + TAG_LOGI(AAFwkTag::APPDFR, "ret=%{public}d, appRunningUniqueId=%{public}s", ret, appRunningUniqueId.c_str()); + FaultData& nonConstFaultData = const_cast(faultData); + nonConstFaultData.appRunningUniqueId = appRunningUniqueId; + } + if (SubmitDfxFaultTask(faultData, bundleName, appRecord, pid) != ERR_OK) { return ERR_INVALID_VALUE; } @@ -7428,6 +7437,13 @@ FaultData AppMgrServiceInner::ConvertDataTypes(const AppFaultDataBySA &faultData newfaultData.eventId = faultData.eventId; newfaultData.needKillProcess = faultData.needKillProcess; newfaultData.appfreezeInfo = faultData.appfreezeInfo; + newfaultData.procStatm = faultData.procStatm; + if (appRunningManager_) { + std::string appRunningUniqueId; + int32_t ret = appRunningManager_->GetAppRunningUniqueIdByPid(faultData.pid, appRunningUniqueId); + TAG_LOGI(AAFwkTag::APPDFR, "ret=%{public}d, appRunningUniqueId=%{public}s", ret, appRunningUniqueId.c_str()); + newfaultData.appRunningUniqueId = appRunningUniqueId; + } return newfaultData; } diff --git a/test/unittest/dfr_test/appfreeze_inner_test/appfreeze_inner_test.cpp b/test/unittest/dfr_test/appfreeze_inner_test/appfreeze_inner_test.cpp index 624c11944e..4f95f65375 100644 --- a/test/unittest/dfr_test/appfreeze_inner_test/appfreeze_inner_test.cpp +++ b/test/unittest/dfr_test/appfreeze_inner_test/appfreeze_inner_test.cpp @@ -256,5 +256,20 @@ HWTEST_F(AppfreezeInnerTest, AppfreezeInner_AppfreezeHandleOverReportCount_001, appfreezeInner->AppfreezeHandleOverReportCount(isSixSecondEvent); EXPECT_TRUE(!isSixSecondEvent); } + +/** + * @tc.number: AppfreezeInner_GetProcStatm_001 + * @tc.name: GetProcStatm + * @tc.desc: Verify that function GetProcStatm. + */ +HWTEST_F(AppfreezeInnerTest, AppfreezeInner_GetProcStatm_001, TestSize.Level1) +{ + int32_t pid = static_cast(getpid()); + std::string procStatm = appfreezeInner->GetProcStatm(pid); + EXPECT_TRUE(!procStatm.empty()); + pid = -1; + procStatm = appfreezeInner->GetProcStatm(pid); + EXPECT_TRUE(procStatm.empty()); +} } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/dfr_test/appfreeze_manager_test/appfreeze_manager_test.cpp b/test/unittest/dfr_test/appfreeze_manager_test/appfreeze_manager_test.cpp index 6df7316401..f999bc27c4 100644 --- a/test/unittest/dfr_test/appfreeze_manager_test/appfreeze_manager_test.cpp +++ b/test/unittest/dfr_test/appfreeze_manager_test/appfreeze_manager_test.cpp @@ -261,7 +261,7 @@ HWTEST_F(AppfreezeManagerTest, AppfreezeManagerTest_AppFreezeFilter_001, TestSiz int32_t pid = static_cast(getprocpid()); EXPECT_TRUE(!appfreezeManager->CancelAppFreezeDetect(pid, "")); appfreezeManager->ResetAppfreezeState(pid, ""); - EXPECT_TRUE(!appfreezeManager->IsValidFreezeFilter(pid, "")); + EXPECT_TRUE(appfreezeManager->IsValidFreezeFilter(pid, "")); appfreezeManager->RemoveDeathProcess(""); } diff --git a/test/unittest/fault_data/fault_data_test.cpp b/test/unittest/fault_data/fault_data_test.cpp index 206108221d..310bae8bf5 100644 --- a/test/unittest/fault_data/fault_data_test.cpp +++ b/test/unittest/fault_data/fault_data_test.cpp @@ -100,6 +100,8 @@ HWTEST_F(FaultDataTest, ReadFromParcel_001, TestSize.Level1) messageSixth.WriteUint32(12); messageSixth.WriteBool(true); messageSixth.WriteString(helloWord); + messageSixth.WriteString(helloWord); + messageSixth.WriteString(helloWord); bool retSixth = faultData->ReadFromParcel(messageSixth); EXPECT_EQ(true, retSixth); } @@ -132,6 +134,8 @@ HWTEST_F(FaultDataTest, Unmarshalling_001, TestSize.Level1) message.WriteUint32(12); message.WriteBool(true); message.WriteString(helloWord); + message.WriteString(helloWord); + message.WriteString(helloWord); auto retSecond = faultData->Unmarshalling(message); EXPECT_NE(nullptr, retSecond); } @@ -207,6 +211,8 @@ HWTEST_F(FaultDataTest, ReadFromParcel_002, TestSize.Level1) messageSixth.WriteInt32(12); messageSixth.WriteBool(true); messageSixth.WriteString(helloWord); + messageSixth.WriteString(helloWord); + messageSixth.WriteString(helloWord); bool retSixth = appFaultDataBySA->ReadFromParcel(messageSixth); EXPECT_EQ(true, retSixth); } @@ -238,6 +244,8 @@ HWTEST_F(FaultDataTest, Unmarshalling_002, TestSize.Level1) message.WriteInt32(12); message.WriteBool(true); message.WriteString(helloWord); + message.WriteString(helloWord); + message.WriteString(helloWord); auto retSecond = appFaultDataBySA->Unmarshalling(message); EXPECT_NE(nullptr, retSecond); }