Commit Graph

666 Commits

Author SHA1 Message Date
aurel cordonnier
d17d20ca36 Merge from Release-Engine-Test @ 16758890 to UE5/Main
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719 (and Release-17.00 @ 16658211)

[CL 16763350 by aurel cordonnier in ue5-main branch]
2021-06-23 17:51:32 -04:00
danny couture
89e1e871ad Exclude mimalloc.c from static analysis
Fix typo where double slash were used

#rnx
#rb trivial
#preflight 60d1fe1fbe81e80001837c38

[CL 16744965 by danny couture in ue5-main branch]
2021-06-22 12:48:16 -04:00
Stefan Boberg
6fb6f32683 Speculative fix/workaround for issue where metadata queries sometimes fail on a newly opened file handle
When this happens the file handle becomes invalid and cannot be used. This change ensures a null handle is returned instead of an invalid handle

It's not clear why a GetFileSizeEx operation would fail on a recently created file handle but it sometimes does for files on file shares (such as for derived data cache files)

#rb devin.doucette

[CL 16704714 by Stefan Boberg in ue5-main branch]
2021-06-17 10:50:07 -04:00
Zousar Shaker
cf116088ae Integrating //UE5/Dev-Cooker @ 16678003 to //UE5/Main (Zousar.Shaker-YEG-0943-Quaternary)
Non-DevIteration_ShooterGame

[CL 16678907 by Zousar Shaker in ue5-main branch]
2021-06-15 16:36:57 -04:00
alexander suvorov
390e009342 Properly handle Windows paths of MAX_PATH length.
#rb Matt.Peters

[CL 16632849 by alexander suvorov in ue5-main branch]
2021-06-10 19:18:53 -04:00
aurel cordonnier
e0ad4e25df Merge from Release-Engine-Test @ 16624776 to UE5/Main
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16625248 by aurel cordonnier in ue5-main branch]
2021-06-10 13:13:24 -04:00
Patrick Laflamme
5b8db7509e Fixed Editor taking several second to resolve and log the ensure callstack.
- Reenabled the optimization that load the symbols on demand only rather than loading all the symbols.
  - Detected when a module loaded in the debug engine (dbghelp) misses the debug symbols, likely because it was implicitly loaded with an incomplete symbol search path and unloaded the module to reload it with the proper symbol search path set so that debug symbols could be found.
  - For Editor, 'debug ensure' is significantly faste. The time to stack walk and dump went from ~20s to ~1s.

#jira UE-117236 - Ensure can freeze the Editor for 30+ seconds
#rb Johan.Berg
#fyi Francis.Hurteau

[CL 16603545 by Patrick Laflamme in ue5-main branch]
2021-06-09 08:11:40 -04:00
David Harvey
3cde6e12da hooks to allow crash handling to be extended by platform extensions.
#jira UE-115086
#rnx
#rb Rolando.Caloca

[CL 16571107 by David Harvey in ue5-main branch]
2021-06-07 11:19:59 -04:00
Patrick Laflamme
06b4a4db0b Copying the error message can overflow the allocated buffer when reporting an ensure.
Replaced usage of misleading FCString::Strcpy() with FCString::Strncpy()

#rb Johan.Berg
#jira UE-116998
#lockdown simon.tourangeau

#ROBOMERGE-OWNER: patrick.laflamme
#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 16536333 in //UE4/Release-4.27/... via CL 16536380
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Staging) (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

#ushell-cherrypick of 16536698 by patrick.laflamme

[CL 16538702 by Patrick Laflamme in ue5-main branch]
2021-06-02 16:15:52 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
Patrick Laflamme
9925c861ae Prevent the engine from providing all threads to CRC on stall and ensure. Only transmit the responsible thread, so that CRC doesn't need to walk all threads before resuming the engine.
- Analytics shows that CRC may takes up to 400 seconds to walk all the threads and create a minidump before responding back to the engine on the pipe to resume the crashing thread.

#rb Johan.Berg
#fyi Geoff.Evans

[CL 16483781 by Patrick Laflamme in ue5-main branch]
2021-05-27 10:10:12 -04:00
Steve Robb
ba5a9cb362 Some explicit casts to UTF8CHAR, for upcoming changes to that type.
#rb none
#jira none

[CL 16478979 by Steve Robb in ue5-main branch]
2021-05-26 20:27:50 -04:00
Patrick Laflamme
2e5316e1ca Generalized the Editor analytics summary session system to be usable/extendable by other apps.
Engine/Editor changes:

- Split the Editor summary session in two, one summary for the Engine properties and one for the Editor specific properties. Made it easy to extend the Engine summary to create other summaries.
- Made the summary sender as agnostics as possible of the keys it sends.
- Fixed the system wide lock contention between the process when persisting a session. (On problem caused by the lock is UE-114315).
- Fixed concurrent issue when saving the summary sessions on Linux/Mac
- Fixed performance issue when saving the summary session on Linux/Mac. This enable saving at higher frequency.
- Fixed cases where the same session summary is sent more than once.
- Fixed Windows registry key overflow that could happens if we accumulated too many sessions (in theory, this can happen)
- Made adding new properties to the summary easy and private to the implementation.
- Brought the Linux/Mac implementation closer to Windows implementation.
- Reduced memory allocation, especially when the session records a crash.
- Improved chances to send the summary non-delayed by allowing the Editor to send the reports if CRC died unexpectedly.
- Generalized the support to collect and aggregate analytics from helper processes. For example, CRC already collects analytics that is merged with the Editor summary as information supplement
- Reserved the disk space required to store the summary ahead of time to prevent failing later.
- Increased frequency at which the summary is persisted because saving the summary is more efficient. (About every 10 seconds rather than every minutes).
- Added unit tests

CrashReportClient changes:

- Created a 'session summary' from the CRC point of view to merge with the Editor summary.
- Moved analytics collection in a separated class to make the crash reporting code leaner and less noisy with all the analytics
- Merged the CRC diagnostic logger in the class collecting CRC analytics summary and make the diagnostic log a property in the summary.
- Collected analytics (on behalf of Editor) in a background thread because CRC main thread can be blocked collecting a crash, so it doesn't pay attention to other things
- Added MonitorBatteryLevel and MonitorOnACPower summary properties on Windows. Collected on CRC background thread (never blocked, so we reduce changes to miss the battery running out)
- Added MonitorSessionDuration summary property to track now long CRC ran.
- Added MonitorQuitSignalRecv summary property to detect when CRC is soft killed like: taskkill /PID 1234
- Added MonitorIsReportingCrash summary property to track when CRC dies reporting a crash.
- Added MonitorIsCollectingCrash summary property to track when CRC dies collecting a crash artifacts.
- Added IsProcessingCrash summary property to track when CRC dies processing a crash.
- Added MonitorCrashed summary property to track when CRC exception handler was triggered.
- Added MonitorWasShutdown summary property to track when CRC summary was shutdown
- Added MonitorLoggingOut summary property to track when CRC died because the user was logging out (or as result of shutting down or restarting the computer).
- More accurate value for DeathTimestamp summary property because this is now captured in CRC background thread (which cannot be busy handling a crash)
- Added crash processing timing to CRC diagnostic logs (how long it takes to collect/process a crash).

#rb Jamie.Dale, Wes.Hunt, Johan.Berg
#jira UETOOL-3500
#jira UE-114315

[CL 16324612 by Patrick Laflamme in ue5-main branch]
2021-05-13 21:58:20 -04:00
ionut matasaru
2d5c799e12 [Insights]
- Added new trace events to track the ReOpenFile API. Updated the PlatformFileTraceAnalysis to process the respective new trace events. This fixes the issue where activities were displayed in Unreal Insights as I/O events with "Unknown" file (UE-114506).
  - Updated warning messages and debug code in PlatformFileTraceAnalysis.
  - Added handle tracking in Insights for I/O Activity events. File handle and read/write handles are now displayed in tooltip of an I/O Activity event.
  - Added "ReOpen" as a separate I/O activity type.

#jira UE-114506
#rb Catalin.Dragoiu, Robert.Millar

[CL 16310259 by ionut matasaru in ue5-main branch]
2021-05-13 03:13:34 -04:00
aurel cordonnier
8eebe8841f Merge UE5/RET @ 16305968 to UE5/Main
This represents UE4/Main @ 16261013 and Dev-PerfTest @ 16259937

[CL 16306996 by aurel cordonnier in ue5-main branch]
2021-05-12 18:10:03 -04:00
Matt Peters
3a1f740ef4 #jira UE-113053
Workaround case when GetStack returns an empty stack, and fix some of the cases that can cause it to return an empty stack.
#rb Johan.Berg
#rnx

[CL 16223819 by Matt Peters in ue5-main branch]
2021-05-06 14:04:04 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Andriy Tylychko
9f1cf3eabf re-deprecated FPlatformProcess::CreateSynchEvent(), now on all platforms. Replaced FEvent* by FEventRef where it made sense. Deprecated FEvent::Create() as another method to bypass the event pool
#rb steve.robb

[CL 16163267 by Andriy Tylychko in ue5-main branch]
2021-04-29 18:52:48 -04:00
Patrick Laflamme
d6a9f2f2e9 Fixed missing PCallstack happening when the Editor has more than 256 threads and the crashing thread is not in the 256 first visited by the OS.
- Bumped the limit from 256 to 512
  - Always reserve one spot for the crashing thread in the list transmitted to CRC, possibly ignoring some thread.
  - Added diagnostic logs in CRC to captures cases where the number of thread would reach the new limit of 512 or if the crashing thread is 0.

#jira UE-114291 - Fail to capture some Editor PCallstack because a hard limit in GenericCrashContext
#rb Johan.Berg

[CL 16123400 by Patrick Laflamme in ue5-main branch]
2021-04-27 08:35:19 -04:00
Johan Berg
a96db78464 Fix crash reporting thread exiting immediately.
#rnx
#rb zousar.shaker
#jira UE-113873

[CL 16114903 by Johan Berg in ue5-main branch]
2021-04-26 11:48:25 -04:00
Zousar Shaker
b95635adb7 Avoid delaying process shutdown by up to 500ms due to the crash reporter thread. This can be significant for worker processes that run at high frequency (eg: SCW).
#rb Johan.Berg
#rb Devin.Doucette
#preflight 607dac7b6e83200001abdf28

[CL 16052192 by Zousar Shaker in ue5-main branch]
2021-04-19 12:53:39 -04:00
Johan Berg
b2f93702ab Remove UE4 strings and names from Crash reporting
#rb none
#jira UE-111405, UE-111410, UE-111407, UE-111477, UE-111412, UE-111925, UE-111413, UE-111408, UE-111438, UE-111406

[CL 16002172 by Johan Berg in ue5-main branch]
2021-04-14 04:24:50 -04:00
Johan Torp
6871720087 Reduce FWindowsPlatformFile allocations
#rb matt.peters

[CL 15987431 by Johan Torp in ue5-main branch]
2021-04-13 05:52:58 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
Martin Ridgers
8359d56895 Corrected the remote debugging prompt's message.
#rb Ari.Arnbj�rnsson
#rnx

[CL 15939943 by Martin Ridgers in ue5-main branch]
2021-04-07 09:54:26 -04:00