Commit Graph

105 Commits

Author SHA1 Message Date
patrick laflamme
409cdd2482 #jira UE-83339 - Disaster Recovery can fail to recover its session when the project is opened from the Project Browser
- Fixed a disaster recovery bug preventing the Editor from recovering a session because another instance of the Editor on another project already locked all the sessions.

Problem:

On windows, the CrashReportClientEditor (hosting disaster recovery service) is started in the static initialization, before the engine is initialized, not allowing lot of command line configuration. The Editor project browser would start a first CrashReportClientEditor instance, which would load and lock all the available sessions (unless another CrashReportClientEditor was running). When the user selected a project, a new Editor and CrashReportClientEditor were launched before the first one was closed. The second instance could not access the existing sessions because they were still locked by the first instance.

Solution:

Because CrashReportClientEditor is launch before the engine is initialized, we don't have any context at the launch time. The best the was to delay the moment when the server reloads the existing sessions and enable each clients to store their sessions in different folders (repositories) mounted on demand by the server.

Implementation details:
  - Implemented new RPC API to allow the client to list/create/load/drop specific repositories containing its own sessions on demand.
  - Updated the Concert server to manage multiples directories where session can be stored/found (session repositories) rather than just one.
  - Added a settings to allow the user to specify where the disaster recovery sessions should be stored on the disk. Now default in the current project folder.
  - Added a settings to prevent the Concert server from scanning the sessions in the default location.
  - Updated disaster recovery to start without any session repository and let the client decide if a new one needs to be created or an existing one be mounted to restore a previous session.
  - Changed the code to let disaster recovery client manage its session history rather than letting the server rotate the old session. Defaulted the history to 0, user has no flow to visualize and pick from the history.

#rb Jamie.Dale

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 10260823 in //UE4/Release-4.24/... via CL 10260830
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v593-10286020)

[CL 10294859 by patrick laflamme in Dev-Core branch]
2019-11-18 22:43:10 -05:00
patrick laflamme
93ab27052b #jira UE-83339 - Disaster Recovery can fail to recover its session when the project is opened from the Project Browser
- Fixed a disaster recovery bug preventing the Editor from recovering a session because another instance of the Editor on another project already locked all the sessions.

Problem:

On windows, the CrashReportClientEditor (hosting disaster recovery service) is started in the static initialization, before the engine is initialized, not allowing lot of command line configuration. The Editor project browser would start a first CrashReportClientEditor instance, which would load and lock all the available sessions (unless another CrashReportClientEditor was running). When the user selected a project, a new Editor and CrashReportClientEditor were launched before the first one was closed. The second instance could not access the existing sessions because they were still locked by the first instance.

Solution:

Because CrashReportClientEditor is launch before the engine is initialized, we don't have any context at the launch time. The best the was to delay the moment when the server reloads the existing sessions and enable each clients to store their sessions in different folders (repositories) mounted on demand by the server.

Implementation details:
  - Implemented new RPC API to allow the client to list/create/load/drop specific repositories containing its own sessions on demand.
  - Updated the Concert server to manage multiples directories where session can be stored/found (session repositories) rather than just one.
  - Added a settings to allow the user to specify where the disaster recovery sessions should be stored on the disk. Now default in the current project folder.
  - Added a settings to prevent the Concert server from scanning the sessions in the default location.
  - Updated disaster recovery to start without any session repository and let the client decide if a new one needs to be created or an existing one be mounted to restore a previous session.
  - Changed the code to let disaster recovery client manage its session history rather than letting the server rotate the old session. Defaulted the history to 0, user has no flow to visualize and pick from the history.

#rb Jamie.Dale

#ROBOMERGE-SOURCE: CL 10260823 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v591-10236483)

[CL 10260830 by patrick laflamme in Main branch]
2019-11-15 12:55:57 -05:00
jamie dale
d164a4deee Initialize and Shutdown analytics for each crash reported by the monitor
This ensures that we honor the user-settings for reporting analytics correctly if they change while the editor is running.

#jira UE-82764
[FYI] Johan.Berg
#rb Sebastian.Nordgren
#rnx

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 9902945 in //UE4/Release-4.24/... via CL 9902964
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v560-9963197)

[CL 9981629 by jamie dale in Dev-Core branch]
2019-11-05 02:21:31 -05:00
johan berg
6979655ceb Prevent analytics being initialized twice
When the user has allowed usage data to be sent we initialize the analytics backend in the crash report client. If the user has also enabled sending unattended reports and an ensure is encountered followed by a crash the crash reporter would assert because the analytics backend was being initialized twice.

#rb sebastian.nordgren
#jira UE-82764

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: johan.berg
#ROBOMERGE-SOURCE: CL 9899678 in //UE4/Release-4.24/... via CL 9899681
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v560-9963197)

[CL 9978276 by johan berg in Dev-Core branch]
2019-11-05 01:50:45 -05:00
jamie dale
9457015249 Initialize and Shutdown analytics for each crash reported by the monitor
This ensures that we honor the user-settings for reporting analytics correctly if they change while the editor is running.

#jira UE-82764
[FYI] Johan.Berg
#rb Sebastian.Nordgren
#rnx

#ROBOMERGE-SOURCE: CL 9902945 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v558-9892490)

[CL 9902964 by jamie dale in Main branch]
2019-10-31 12:39:36 -04:00
johan berg
bd51031375 Prevent analytics being initialized twice
When the user has allowed usage data to be sent we initialize the analytics backend in the crash report client. If the user has also enabled sending unattended reports and an ensure is encountered followed by a crash the crash reporter would assert because the analytics backend was being initialized twice.

#rb sebastian.nordgren
#jira UE-82764

#ROBOMERGE-SOURCE: CL 9899678 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v558-9892490)

[CL 9899681 by johan berg in Main branch]
2019-10-31 08:19:10 -04:00
johan berg
b70955bdea Allow game/editor to continue execution earlier after a crash.
A previous change moved the signal to the game/editor that it's okay to continue to after the crash report client was completely done with sending and resolving callstacks, because it was assumed that there was a syncronization problem. However that proved to be another issue, so moving the signal back to where it was originally. This should make the editor only "freeze" a short time, while necessary data is collected.

#jira UE-82333
#rb pj.kack

(ushell-p4-cherrypick of 9868282 by Johan.Berg)

#ROBOMERGE-SOURCE: CL 9868804 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v548-9842178)

[CL 9868810 by johan berg in Main branch]
2019-10-28 09:56:39 -04:00
Johan Berg
b747cc9f1f Allow game/editor to continue execution earlier after a crash.
A previous change moved the signal to the game/editor that it's okay to continue to after the crash report client was completely done with sending and resolving callstacks, because it was assumed that there was a syncronization problem. However that proved to be another issue, so moving the signal back to where it was originally. This should make the editor only "freeze" a short time, while necessary data is collected.

#jira UE-82333
#rb pj.kack

[CL 9868282 by Johan Berg in Dev-Core branch]
2019-10-28 08:50:44 -04:00
ben marsh
a15970c624 Fix assert in CrashReportClient when shutting down without sending a crash report.
#rb none
[FYI] sebastian.nordgren
#jira UE-82436

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 9838412 in //UE4/Release-4.24/... via CL 9838415
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v548-9842178)

[CL 9854928 by ben marsh in Dev-Core branch]
2019-10-28 03:21:37 -04:00
ben marsh
4e13df3463 Fix assert in CrashReportClient when shutting down without sending a crash report.
#rb none
[FYI] sebastian.nordgren
#jira UE-82436

#ROBOMERGE-SOURCE: CL 9838412 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v546-9757112)

[CL 9838415 by ben marsh in Main branch]
2019-10-25 08:54:17 -04:00
sebastian nordgren
d7fbf013c6 We now spoof a crash report and send it from the CrashReportClientApp when detecting an abnormal shutdown has occurred. That is to say, a shutdown where, as far as we can tell, no known exit path was followed.
Reverted change to where FCrashReportAnalytics was initialized now that we get those settings from the UECrashContext file.

Added DelayedSend analytics attribute that determines whether or not the process that is sending an analytics event was the same one that created it.

#rb jamie.dale

#jira UETOOL-1826

#ROBOMERGE-SOURCE: CL 9731024 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v539-9700858)

[CL 9731027 by sebastian nordgren in Main branch]
2019-10-21 08:17:44 -04:00
ben marsh
29ebc577af Fix missing icon in CrashReportClient.
#rb none
#jira UE-82092
#rnx

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 9710426 in //UE4/Release-4.24/... via CL 9710427
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v539-9700858)

[CL 9729650 by ben marsh in Dev-Core branch]
2019-10-20 08:48:01 -04:00
ben marsh
12cc1a8499 Fix missing icon in CrashReportClient.
#rb none
#jira UE-82092
#rnx

#ROBOMERGE-SOURCE: CL 9710426 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v539-9700858)

[CL 9710427 by ben marsh in Main branch]
2019-10-18 21:17:02 -04:00
sebastian nordgren
07617b3f68 We now spoof a crash report and send it from the CrashReportClientApp when detecting an abnormal shutdown has occurred. That is to say, a shutdown where, as far as we can tell, no known exit path was followed.
Reverted change to where FCrashReportAnalytics was initialized now that we get those settings from the UECrashContext file.

Added DelayedSend analytics attribute that determines whether or not the process that is sending an analytics event was the same one that created it.

#rb jamie.dale

[CL 9687109 by sebastian nordgren in Dev-Core branch]
2019-10-18 08:14:04 -04:00
jamie dale
ac738262ef CIS fix
#jira
[FYI] Patrick.Laflamme
#rb none
#rnx

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 9619706 in //UE4/Release-4.24/... via CL 9619710
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v531-9631997)

[CL 9645729 by jamie dale in Dev-Core branch]
2019-10-17 11:56:08 -04:00
patrick laflamme
f0a6c0ef6a #jira UE-81549 - Disaster Recovery fails to find the session after selecting Send and Close or Send and Restart in Crash Reporter
- Cleared the concert server instance info on server shutdown.
  - Shutdown the disaster recovery service when a crash is created. This enable the next server instance to grab the file lock and restore.
  - Fixed archive rotation (delete oldest) that did not work when concurrent servers existed.
  - Improved disaster recovery error messages.
  - Fixed disaster recovery client not restoring a session that was crashed (server managed the crash), but for which the client process was still hanging around.
  - Prevent showing the recovery UI if -unattended is specified on command line.

#rb Jamie.Dale

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 9617188 in //UE4/Release-4.24/... via CL 9617199
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v531-9631997)

[CL 9644164 by patrick laflamme in Dev-Core branch]
2019-10-17 11:49:48 -04:00
Jamie Dale
f6cbdd7e62 CIS fix
#jira
#fyi Patrick.Laflamme
#rb none
#rnx

[CL 9619706 by Jamie Dale in 4.24 branch]
2019-10-16 12:32:26 -04:00
Patrick Laflamme
6805fb63aa #jira UE-81549 - Disaster Recovery fails to find the session after selecting Send and Close or Send and Restart in Crash Reporter
- Cleared the concert server instance info on server shutdown.
  - Shutdown the disaster recovery service when a crash is created. This enable the next server instance to grab the file lock and restore.
  - Fixed archive rotation (delete oldest) that did not work when concurrent servers existed.
  - Improved disaster recovery error messages.
  - Fixed disaster recovery client not restoring a session that was crashed (server managed the crash), but for which the client process was still hanging around.
  - Prevent showing the recovery UI if -unattended is specified on command line.

#rb Jamie.Dale

[CL 9617188 by Patrick Laflamme in 4.24 branch]
2019-10-16 10:41:37 -04:00
jamie dale
15918dac97 Only include disaster recovery session data in crash reports when asked to upload log files
[FYI] Patrick.Laflamme
#rb Patrick.Laflamme
#rnx

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 9489700 in //UE4/Main/...
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v524-9564021)

[CL 9573423 by jamie dale in Dev-Core branch]
2019-10-14 15:22:39 -04:00
jamie dale
195dbe7445 Gather CrashReportClient into the Engine LocRes
#jira UE-80470
[FYI] Michelle.Zhao, Yali.He
#rb none
#rnx

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 9474225 in //UE4/Main/...
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v524-9564021)

[CL 9572112 by jamie dale in Dev-Core branch]
2019-10-14 14:39:36 -04:00
Jamie Dale
d0f7b3060f Only include disaster recovery session data in crash reports when asked to upload log files
#fyi Patrick.Laflamme
#rb Patrick.Laflamme
#rnx

[CL 9489700 by Jamie Dale in Main branch]
2019-10-09 12:39:19 -04:00
Jamie Dale
80769d305f Gather CrashReportClient into the Engine LocRes
#jira UE-80470
#fyi Michelle.Zhao, Yali.He
#rb none
#rnx

[CL 9474225 by Jamie Dale in Main branch]
2019-10-08 11:37:02 -04:00
Jamie Dale
2ad3997cc5 Removed unneeded dependencies from CrashReportClient
Legacy code in CrashDebugHelper was dragging in SourceControl and AssetRegistry as dependencies for CrashReportClient.

This dependency is no longer needed, as internal crashes now always perform local symbolification (either via symbols built locally, or synced via UGS). Syncing symbols from Perforce or a network drive is no longer needed or used.

#rb Ben.Marsh
#rnx

[CL 9422370 by Jamie Dale in Dev-Core branch]
2019-10-04 16:17:40 -04:00
Stefan Boberg
1f813eb516 Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb many

[CL 9405827 by Stefan Boberg in Main branch]
2019-10-03 16:26:48 -04:00
Jamie Dale
fb5d4ab110 Added missing CloseProc call
#rb none
#rnx

[CL 9387094 by Jamie Dale in Dev-Core branch]
2019-10-02 18:34:32 -04:00