Commit Graph

238 Commits

Author SHA1 Message Date
steve robb
28609e6f3c Removal of TEXT used in static_asserts (redundant in ANSI/wide modes, broken in UTF-8 mode).
#rb james.hopkin
#jira UE-132142
#preflight 62a87ef40b7bda795a7dfff0

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 20647361 via CL 20647632 via CL 20647654
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20650895 by steve robb in ue5-main branch]
2022-06-14 12:11:45 -04:00
Devin Doucette
4b99be9d9e Avoid calling GLog->TearDown() from RequestExit as it may deadlock
#preflight 627ec8eebb2c29688c468c8f
#rb Tim.Smith
#rnx

[CL 20224709 by Devin Doucette in ue5-main branch]
2022-05-16 11:06:18 -04:00
Brandon Schaefer
8989ca5c8b Fix memory mapping a full file generally going past the file size when trying to grab some aligned memory
#jira none
#preflight none
#rb Robert.Seiver

[CL 20046111 by Brandon Schaefer in ue5-main branch]
2022-05-04 14:49:54 -04:00
Brandon Schaefer
3403e680f4 Re-add but fix #ifdef --> #if
#jira none
#rb none
#preflight none

[CL 19969881 by Brandon Schaefer in ue5-main branch]
2022-04-28 17:43:40 -04:00
Brandon Schaefer
dc286b75d5 Remove code that breaks *.sym file paths for Unix platform
From CL 19498448

#jira none
#rb none
#fyi Chris.Constantinescu
#preflight none

[CL 19969741 by Brandon Schaefer in ue5-main branch]
2022-04-28 17:37:04 -04:00
Devin Doucette
c8db2d77fe Logging: Added a workaround to log callstacks for failed assertions
#preflight 626ac3c5b17dd9121b406186
#rb Josh.Adams

[CL 19966435 by Devin Doucette in ue5-main branch]
2022-04-28 14:52:11 -04:00
geoff evans
1981b2f5f3 StallDetector support for Linux
### Features

This change enables the StallDetector watchdog in Editor to submit reports to crashreporter about threads violating instrumented deadlines in the source code. This feature was available prior on Windows, and this change adds Linux support.

### Notes

New APIs:
ReportStall()
CaptureThreadPortableCallStack()

Many APIs are updated from purely "Ensure" naming to more general naming. Stalls are more like Ensures than crashes, and so the appropriate renames to make the code readable and clear have been made. In some places Ensure is replaced with the clearer: Continuable Event nomenclature.

### Testing

I synthesized an ensure on Linux, and did the same for a stall. I then compared crash report XML file to make sure they contain accurate data in the callstack, portable callstack, and other fields in the report. I also noted that the stall information was showing as expected in the crash reporter.

#rb brandon.schaefer, francis.hurteau
#jira UETOOL-3336
#preflight 625e20d2804460ab0fea3277

[CL 19911608 by geoff evans in ue5-main branch]
2022-04-25 19:19:04 -04:00
Brandon Schaefer
9ec1ffb6df We already call panic if we are crashing in the signal handler, avoid doing so here as well due to the same code path handling ensures
If we call panic we were no longer output to the log, after the ensure

#jira none
#rb Devin.Doucette
#preflight none

[CL 19849789 by Brandon Schaefer in ue5-main branch]
2022-04-21 11:08:36 -04:00
chris constantinescu
28111d40fc Redundancy cleanup in UBT Low Level Tests:
- test-specific targets and modules are constructed by RulesAssembly which removes a lot of spaghetti code
- no more excluding the Tests folder by default which is guaranteed to mislead users #fyi Jon.Nabozny
- test compilation in Tests is controlled through WITH_LOW_LEVEL_TESTS
- preparation code for switching tests between Catch2 / TestAutomation Fmwk

Nightly LLT PF 6260431391376845adeb4c40

#rnx
#preflight 62602d50dd47b4ad2173c30b

[CL 19834665 by chris constantinescu in ue5-main branch]
2022-04-20 14:24:59 -04:00
robert seiver
b0911026ae Updated error message logging tags from LogLinux to LogUnixPlatformFile
#jira UE-149246
#rb Brandon.Schaefer
#preflight none

[CL 19811644 by robert seiver in ue5-main branch]
2022-04-19 13:11:47 -04:00
jeff newquist
9b066ef681 Remove unused read-ahead cache functionality
#jira none
#rb wojciech.krywult
#preflight none

[CL 19769598 by jeff newquist in ue5-main branch]
2022-04-15 09:10:19 -04:00
robert seiver
98e1b3a69e Implement OpenMapped for Linux inside of UnixPlatformFile
#jira UE-147332
#rb Brandon.Schaefer
#fyi @James.Singer, @Johan.Torp
#preflight 62587d63946114248dc178b2

[CL 19762042 by robert seiver in ue5-main branch]
2022-04-14 16:03:05 -04:00
Matt Peters
3575c7ad87 Fix FFileHandleUnix::Write when writing files more than 2Gb in size.
#rb Brandon.Schaefer
#rnx
#preflight 62558b973f5641db59f49523

[CL 19746662 by Matt Peters in ue5-main branch]
2022-04-13 18:03:39 -04:00
Devin Doucette
292008ea35 Logging: Replaced GLog->PanicFlush() with GLog->Panic()
Panic allows only one thread to become the panic thread. In panic mode, logs are only sent to panic-safe output devices. Each call to Panic flushes buffered logs to panic-safe output devices, and flushes panic-safe output devices.

#jira UE-147152
#preflight 62424814292f228e09d8a612
#rb Zousar.Shaker
#fyi Brandon.Schaefer

[CL 19545093 by Devin Doucette in ue5-main branch]
2022-03-29 13:31:48 -04:00
Brandon Schaefer
b6f2040171 Fix hang on exit due to flush causing other threads to attempt to allocate when crashing
We are now no longer flushing this final callstack into the log, which is a major regression

#jira none
#rb none
#fyi Devin.Doucette
#preflight none

[CL 19505509 by Brandon Schaefer in ue5-main branch]
2022-03-24 20:24:43 -04:00
chris constantinescu
ae281656f2 Tests converted from 18848115 made to work multi-platform.
Not all were converted because they were designed for packaged applications whereas low level tests are designed to run as "native" non-packaged applications.
- reporting support for non-desktop platforms, for the moment Catch2 report type "console" is used that is sent to a .out file
- most number of tests possible running multi platform, slower tests excluded on incremental builds
- slow tests are moved to run on the monolithic build
- Catch2 report failure event listener such that Horde detects them as build errors. Must add new Horde matcher for Catch2 failures

#rb Mark.Lintott
#preflight 623c8de389625f0612dabd64

[CL 19498448 by chris constantinescu in ue5-main branch]
2022-03-24 13:28:25 -04:00
Devin Doucette
c8d64e3c97 Logging: Added and migrated to GLog->PanicFlush() for crash handling
#preflight 623a433a10251d53d5796835
#rb Zousar.Shaker

[CL 19478551 by Devin Doucette in ue5-main branch]
2022-03-23 09:39:18 -04:00
Brandon Schaefer
831a330e1d Partially revert 19458254: don't use profiling scopes in GetStats(), as it's used in static initialization during LLM profiling.
#jira none
#rb brandon.schaefer
#preflight none

#ushell-cherrypick of 19466664 by ilya.loshchinin

[CL 19466749 by Brandon Schaefer in ue5-main branch]
2022-03-22 11:08:54 -04:00
ilya loshchinin
2b47728502 Added trace profiler scopes to UnixPlatformMemory GetStats and GetExtendedStats, to trace the effect of system calls on other threads.
#rb LouisPhilippe.Seguin

#ROBOMERGE-AUTHOR: ilya.loshchinin
#ROBOMERGE-SOURCE: CL 19458254 via CL 19461422 via CL 19462830 via CL 19462892
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v933-19451510)

[CL 19463651 by ilya loshchinin in ue5-main branch]
2022-03-22 00:15:10 -04:00
Brandon Schaefer
50ca5a9fd3 Move logic into platform request exit area to flush logs if we can
#jira UE-146560
#preflight none
#rb Michael.Sartain, Robert.Seiver

[CL 19440198 by Brandon Schaefer in ue5-main branch]
2022-03-18 15:26:38 -04:00
marc audy
2c4ef8db33 add new core delegates (OnParentBeginFork, OnParentPreFork, OnPostFork, OnEndFramePostFork) to allow interested parties a chance to take actions before and after the process fork point on dedicated servers
#jira UE-143512
#rb louisphilippe.seguin
#preflight
[REVIEW] [at]sam.zamani [at]rob.cannaday

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: evan.kinney
#ROBOMERGE-SOURCE: CL 19102416 via CL 19103934 via CL 19106412 via CL 19106558 via CL 19110150
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
#ROBOMERGE-CONFLICT from-shelf

[CL 19151456 by marc audy in ue5-main branch]
2022-02-25 13:23:06 -05:00
Brandon Schaefer
526de2431d Fix %z warning about not being supported. We only support %zu for these
#jira none
#rb none
#fyi Rob.Millar
#preflight none

[CL 19113673 by Brandon Schaefer in ue5-main branch]
2022-02-24 10:13:15 -05:00
Michael Sartain
d775be7af4 Added check for running on ChromeOS to FUnixPlatformMisc::GetOSVersions
#rb none
#fyi Brandon.Schaefer
#jira none
#preflight trivial

[CL 19093918 by Michael Sartain in ue5-main branch]
2022-02-23 12:07:26 -05:00
robert millar
b4bfddef0a MallocBinned2 fork support.
Clear caches and update a canary value across the fork boundary to avoid touching pages that were allocated pre-fork to minimize unnecessary duplication of shared pages.
Savings depend on pre-fork fragmentation/slack and number of concurrent child processes.

#rb louisphilippe.seguin, johan.torp, arciel.rekman

#ROBOMERGE-OWNER: robert.millar
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19057122 via CL 19057644 via CL 19057693 via CL 19057718 via CL 19057737 via CL 19059617
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066314 by robert millar in ue5-main branch]
2022-02-21 02:04:42 -05:00
brian bekich
a602343183 Adding timestamps to child fork signals
Adding optional child process timeout for WAIT_AND_FORK_RESPONSE_SIGNAL
Added logging if we fail to set the child command line

#rb louisphilippe.seguin, brandon.schaefer

#ROBOMERGE-AUTHOR: brian.bekich
#ROBOMERGE-SOURCE: CL 19050891 via CL 19050899 via CL 19050911 via CL 19057425
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066039 by brian bekich in ue5-main branch]
2022-02-21 01:10:42 -05:00