David's Astronomy Pages
Notes - Session 795 (2020-07-17)

 
Bullet Session Aims & Highlights
 - Observing Result
 - Night Summary Plot
 - Session Event Log
 
Bullet Operational Issues
  - Critical Issues (0),  Major Issues (1),  Minor Issues (4),  Continuous Improvement (2)
   
Bullet Images from 2020-07-17 >>
 
Bullet Investigation: Obs.Manager freezing upon entering Closing State
 

Session Aims & Highlights (2020-07-17)

Main aims

  1. Dome Driver. Test out dome driver under Device Hub control. Look for any glitches which had hampered the previous two sessions (S792 & S793) that were under DeviceHub control
  2. Targets. Aquire variety of targets if conditions allow

Equipment & Software

Highlights

Lowlights

Summary Plots & Logs

Observing Plan
Image
  
Observing Result
(Southern targets added as ToO targets)
Image
   
Dome & Scope Slewing Performance
Image
  
Slew/Centering Performance
Image
  
Guiding Performance
Image
Image
  
Sky Conditions (Locate Frames)
Image
  
Night Sky Summary Plot
Top axis: Sky Brightness at Zenith (in ADU/s)
Lefthand axis: Local Time (hh LT). Righthand axis: Sun Altitude (degs)
Image   
  
Pre-Session Weather Forecast (API data from darksky.net)
Pre-Session Weather forecast showed moderate cloud (68-72% cloud cover) in first part of night improving towards dawn (29-39% cloud cover)
with light wind (5 - 7 mph) , no rain and a minimum temperature of 7°C.

In the event conditions were clear the whole night (though a bit hazy) with a minimum temperature of 5°C
Image   
  
Session Event Log
Time     Event Detail
22:43:40   Camera1 Connected SBIG Camera Connected (set point -15°C)
22:43:42 Session Created Live Session Created (2020-07-17 S00795, ImageSaveNum: 795001)
22:43:52   Services Started Observatory Services started
22:44:13 Observatory (Auto) Observatory placed in Fully-Automated Mode
22:44:16 Session Pending Session pending (2020-07-17)
22:44:18 Session Initiating Session initiating (2020-07-17)
22:44:20   Plan Loaded Observing Plan loaded to queue (2020-07-17 V1 BEST PLAN, Plan ID: 525)
22:44:22   Camera1 Connected SBIG Camera Connected (set point -10°C)
22:44:28   Telescope Connected Telescope Connected (TheSky6)
22:44:39 Session Equilibration Session ready for dome & camera equilibration
23:16:18   Dome Opened Dome opened (opening time 45s)
23:16:21   Equilibration Started Dome Equilibration started
23:29:34   Equilibration Ended Dome Equilibration ended (13.3 mins total)
23:29:36 Session Running Session running
23:29:38   Queue Started Observing Queue started (13 targets selected)
23:30:32       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
23:33:13       Focusing Completed Foc1 AutoFocus Completed (Profile No 1)
23:33:16       Focusing Started Foc2 Focusing Started (Secondary Scope, using ShCap)
23:35:50       Focusing Failed Foc2 Focusing Failed - failed QC check (Quadratic)
23:35:53     Target Started (1/13) Target started (1/13, HIP 87937)
23:38:37       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
23:41:38       Focusing Completed Foc1 AutoFocus Completed (Profile No 3)
23:43:21     Target Completed Target partially completed (1/13, HIP 87937)
23:43:23     Target Started (2/13) Target started (2/13, GCVS CY Lyr)
23:45:26       Focusing Failed Foc1 Focusing Failed - star is lost (TCF-S)
23:50:48     Target Completed Target completed (2/13, GCVS CY Lyr)
23:50:50     Target Started (3/13) Target started (3/13, NGC 6928)
23:53:31       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
23:56:10       Focusing Completed Foc1 AutoFocus Completed (Profile No 4)
00:12:12     Target Completed Target completed (3/13, NGC 6928)
00:12:14     Target Started (4/13) Target started (4/13, NGC 6962)
00:15:02       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
00:18:05       Focusing Completed Foc1 AutoFocus Completed (Profile No 5)
00:34:08     Target Completed Target completed (4/13, NGC 6962)
00:34:10     Target Started (5/13) Target started (5/13, IC 1365)
00:37:35       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
00:40:43       Focusing Completed Foc1 AutoFocus Completed (Profile No 6)
00:56:54     Target Completed Target completed (5/13, IC 1365)
00:56:56     Target Started (6/13) Target started (6/13, IC 1370)
00:59:45       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
01:02:45       Focusing Completed Foc1 AutoFocus Completed (Profile No 7)
01:18:56     Target Completed Target completed (6/13, IC 1370)
01:18:58     Target Started (7/13) Target started (7/13, UGC 12040)
01:20:49       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
01:23:49       Focusing Completed Foc1 AutoFocus Completed (Profile No 8)
01:39:54     Target Completed Target completed (7/13, UGC 12040)
01:40:33     Target Started (8/13) Target started (8/13, Basel 14)
01:43:21       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
01:46:02       Focusing Completed Foc1 AutoFocus Completed (Profile No 9)
01:52:08     Target Completed Target completed (8/13, Basel 14)
01:52:33     Target Started (9/13) Target started (9/13, GCVS SS Cyg)
01:55:04       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
01:57:42       Focusing Completed Foc1 AutoFocus Completed (Profile No 10)
02:01:14     Target Completed Target completed (9/13, GCVS SS Cyg)
02:07:45     Target Started (10/13) Target started (10/13, Berkeley 101)
02:10:16       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
02:12:54       Focusing Completed Foc1 AutoFocus Completed (Profile No 11)
02:18:31     Target Completed Target completed (10/13, Berkeley 101)
02:19:44     Target Started (11/13) Target started (11/13, GCVS HH And)
02:21:44       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
02:24:44       Focusing Completed Foc1 AutoFocus Completed (Profile No 12)
02:26:27     Target Completed Target completed (11/13, GCVS HH And)
02:27:59     Target Started (12/13) Target started (12/13, WDS GRB 34)
02:30:23       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
02:33:03       Focusing Completed Foc1 AutoFocus Completed (Profile No 13)
02:34:53     Target Completed Target completed (12/13, WDS GRB 34)
02:36:14     Target Started (13/13) Target started (13/13, GCVS RX And)
02:38:15       Focusing Started-Foc1 Foc1 Focusing Started (TCF-S)
02:41:05       Focusing Completed Foc1 AutoFocus Completed (Profile No 14)
02:43:39     Target Completed Target completed (13/13, GCVS RX And)
02:43:42   Queue Completed Job Queue completed
03:23:00 User Intervention User intervention to close & park dome
   
Session Alerts
Time     Alert Detail
-- No Alerts                --                              

Back to Top


Operational Issues (2020-07-17, S795)

[ Prev | Next ]

Critical Issues

Major Issues

Minor Issues

Continuous Improvement

[ Prev | Next ]

Back to Top


Investigation: Obs.Manager freezing upon entering Closing State

Issue : Session S795 became frozen at 02:43 just after entering Closing state.     

Details :
Job Manager finished the observing plan at ~ 02:42/02:43 and the session entered closing state at 02:43.  Before beginning to Close Shutter/Park Dome etc, the program effectively hung.  Program has hung/crashed at a similar point in the past (eg S740, S763). In the event the Shutter remained open for 40 minutes until session was checked remotely.
 
Conditions were good and were being monitored by AstroGuard & Cloud Sensor Relays.  Status of observatory was checked via website/remote connection at 03:15. Finding the  session was still active and after making appropriate lock-down screen captures at 03:21, the Dome was closed & parked via AstroGuard program at 03:23 and the Telescope parked from the DeviceHub at around 03:30.  Log file contained no error messages, other than messages indicating the time when particular threads become unresponsive or frozen.  How can the root cause to this issue be found ?    What happens when code begins to execute Closing

AstroMain Report Logs (S795)


  
  Image Group 3/3 [GSet 29]
  Taking 10s image (V)...     Ok        [00795104] 01:42:59 (UT)  Full 3x3 10s V
  Taking 8s image (R)...      Ok        [00795105] 01:43:25 (UT)  Full 3x3 8s R

  Guiding Results 3/3         Ok        0.7 mins (elapsed)
    Guide Stats  rms error    2.2"      1.9" / 1.0", N: 15, SNR: 251.0, HFD: 6.16, Guide: 100%, Lost: 0%

  Guiding Results Total       Ok        2.5 mins (elapsed)
    Guide Stats  rms error    1.8"      1.6" / 0.9", N: 46, SNR: 259.5, HFD: 6.21, Guide: 100%, Lost: 0%

  Current AllSky Meas...      Ok        Unknown           (291)

Operation...                  Completed

Session Closing                         2020-07-18 02:43  (Local)

Logs show the following :

02:43:13.00 | GCVS RX And Take Image 3/3 Try |
02:43:13.00 | GCVS RX And Take Image Set Try | Exposure 2 ( 8s)
02:43:35.99 | GCVS RX And TakeImage Ok | Exposure Time 8s (Recorded FITS Exposure Time 8s)
02:43:36.00 | GCVS RX And TakeImage Ok | [00795105] 3x3 8s |2020-07-18 01:43:25.481
02:43:36.02 | GCVS RX And Continue Ok | IamAlive: TakeMainImage
02:43:36.05 | GCVS RX And Continue Ok | IamAlive: TakeMainScopeFrames
02:43:36.44 | GCVS RX And Convert ImageToJPG Ok | Converting Image 795105 to JPG
02:43:36.55 | GCVS RX And Copy GuideSumm Ok | Session.GuideData file has been updated
02:43:38.47 | GCVS RX And Stop PHD2 Guiding Try | Stopping PHD2 Capture & Guiding
02:43:38.98 | GCVS RX And StopPHD2Guiding Info | Checking PHD2 App State (Result=Stopped)
02:43:41.14 | Job Executor Completed Info | Job Queue has completed
02:43:41.14 | GCVS RX And SetScopeMode Info | Setting Scope Mode to Waiting (Mode 2)
02:43:42.01 | GCVS RX And StopPHD2Guiding Info | Checking PHD2 App State (Result=Stopped)
02:43:42.01 | Job Executor Finish TakeFrameJobsQSOInfo | Setting RunningFrameJobs to False & Finishing Thread
02:43:42.51 | **************************************************************************************************
02:43:42.51 | Observatory Manager Change State Info | Session Closing
02:43:46.50 | Observatory Overseer Check UserInterface Alert | UI is Pending
02:43:50.49 | Observatory Overseer Check UserInterface Alert | UI is Not Responding
02:43:55.50 | Observatory Overseer Check UserInterface Alert | UI is Not Responding
02:43:55.50 | Observatory Overseer Check ObsManager Alert | Obs.Manager is Frozen
02:44:00.51 | Observatory Overseer Check UserInterface Alert | UI is Not Responding
02:44:00.51 | Observatory Overseer Check ObsManager Alert | Obs.Manager is Frozen
02:44:00.51 | Observatory Overseer Check ObsWorker Alert | Obs.Worker is Frozen
02:44:05.51 | Observatory Overseer Check UserInterface Alert | UI is Not Responding
02:44:05.51 | Observatory Overseer Check ObsManager Alert | Obs.Manager is Frozen
02:44:05.51 | Observatory Overseer Check ObsWorker Alert | Obs.Worker is Frozen
02:44:10.52 | Observatory Overseer Check UserInterface Alert | UI is Not Responding
02:44:10.52 | Observatory Overseer Check ObsManager Alert | Obs.Manager is Frozen
02:44:10.52 | Observatory Overseer Check ObsWorker Alert | Obs.Worker is Frozen

AstroMain ObsPics (S795)
Final ObsPic is from 02:43:16 and shows session still running and operating on Target GCVS RX And.  The dome is open and positioned with shutter at Az 93deg and slaved to Telescope. The telescope is tracking and at Az 90 deg, Alt 51 deg. Conditions are good.

AstroGuard (S795)
AstroGuard log shows the dome opening at 23:15. Later on (under User Intevention) the log shows the dome closing and parking at 03:23

  Dome Safety                  Alert     2020-07-17 23:15 (Local)
  Dome Safety                  Info      Dome is opening

  Dome Safety                  Ok        2020-07-17 23:15 (Local)
  Dome Safety                  Ok        Shutter Can Open
  Dome Safety                  Ok        Shutter is opening
  Dome Safety                  Ok        Shutter has opened (42s)
  Close Dome                   Ok        Command Issued

  Dome Safety                  Info      2020-07-18 03:23 (Local)
  Dome Safety                  Info      Dome is closing
  Dome Safety                  Ok        Shutter has closed (47s)

Park Dome                               2020-07-18 03:23 (Local)

 

Data (S740)

Program appears to freeze at precisely the same point at start of closing (07:06)

Data (S763)

Program appears to freeze at precisely the same point at start of closing (04:50)

Normal Data (S791)

Although the issue has arisen in S795, S763 and S740, in the vast majority of sessions the issue hasn't arisen. Therefore it must be concluded that the bug is subtle and is condition or timing dependant in some way.

Operation...                  Completed

Session Closing                         2020-06-11 01:54  (Local)

  Begin Shutdown              Ok        2020-06-10 S00791 (Session)

  Close Dome                            
  Checking Dome...            Ok        Dome is already closed (closed at 0058, closing time 49s)

  Park Dome                             
  Turn off Dome Slaving...    Ok        Dome Slaving is OFF
  Slew Dome to Az 90 ...      Ok        Dome moved to Az 90 deg (Park Position)
  Dome Speed:                 Info      0.3 deg/s         (45.9 degs in 136s)
  Park Dome...                Ok        Dome is Parked (136s)

  PHD2                                  
  Disconnect PHD2 ...         Ok

  Park Telescope                        
  Turn On Tracking..          Ok        Telescope Tracking is ON
  Slew Scope to Pre-Park      Ok        Preparing to move scope to its Pre-Park Location
  Slewing ...                 Ok        
  Scope Speed:                Info      23.8 deg/s        (91.4 degs, 4s)
  Park Telescope...           Parking   Parking Scope
  Park Telescope...           Alert     Telescope may have failed to park correctly
  Park Telescope...           Ok        Telescope is Parked (50s)

  Turn Off Scope                        
  Waiting                     Ok        Powering scope off in 30s
  Switch Off Telescope        Ok        Telescope power has been switched off (01:58:47)

  Close Camera                          
  Turnoff CCD Cooling ...     Ok        CCD Cooling is OFF
  Turnoff CCD Fan ...         Ok        CCD Fan is OFF
  Wait for CCD to re-warm...            CCD Temperature : -15.2°C
  Wait for CCD to re-warm...  Ok        CCD Temperature : -6.5°C
  Disconnect Camera ...       Ok        Camera is disconnected

  Stop Night Observatory Services       
  TelePosition:               Ok        Stopped
  DeviceHub.Telescope:        Ok        Stopped
  PHD2 Client                 Ok        Stopped
  SharpCap Client             Ok        Stopped

  Shutter Stats                         
  - Opening                   Info      Open Dome Requests:  1 (Completed: 1)
  - Closing                   Info      Close Dome Requests: 1 (Completed: 1)
  - Unexpected Closures       Info      Unexpected Closures: 0

  Other Stats                           
  - Rogue Jogs                Info      Num. of Rogue Jogs:  0
  - Cloud Sensor              Info      Num. of Bad Records: 0 
 

01:54:51.45 | GCVS SS Cyg CheckObsState Ok | IamAlive: ExecuteQueue
01:54:57.55 | Job Executor Completed Info | Job Queue has completed
01:54:58.52 | GCVS SS Cyg StopPHD2Guiding Info | Checking PHD2 App State (Result=Stopped)
01:54:58.58 | Job Executor Finish TakeFrameJobsQSOInfo | Setting RunningFrameJobs to False & Finishing Thread
01:54:59.67 | **************************************************************************************************
01:54:59.67 | Observatory Manager Change State Info | Session Closing
01:55:04.62 | Observatory Manager Dome Info | Park Dome
01:55:04.63 | Observatory Manager Dome Info | Set Dome Slaving OFF
01:55:53.61 | Observatory Worker Set DewHeaters Ok | Setting dew heaters to 80%
01:56:53.02 | Observatory Worker Check DewHeaters Ok | Leaving dew heaters at 80%
01:57:20.52 | Observatory Manager SlewDomeToAz Info | Dome Slew Time : 135.9s
01:57:21.04 | DOME Get DomeAzimuth Info | Dome Azimuth After Slew 90.00
01:57:21.05 | Observatory Manager Get DomeSlewSpeed Info | Dome Speed: 0.3 deg/s (45.9 degs in 136s)
01:57:21.07 | Observatory Manager Dome Info | Dome is Parked (136s)
01:57:25.14 | Observatory Manager StopPHD2Guiding Info | Checking PHD2 App State (Result=Stopped)
01:57:25.45 | Observatory PHD2 Ok | Disconnect PHD2 Devices
01:57:25.45 | Observatory Manager Telescope Info | Park Telescope
01:57:26.87 | Observatory Manager Scope.Tracking Ok | IamAlive: SetTrackingOn, TurnOnTracking
01:57:27.88 | Observatory Manager Continue Ok | IamAlive: SetTrackingOn
01:57:27.88 | Observatory Manager Telescope Info | Set Tracking ON
01:57:27.88 | Observatory Services Slew ScopeToAltAz Info | Moving Scope to Near Park Location using Scope.SlewScopeToAzAlt()

Code Review

 Sub SetState_Closing()
'================

' Give one final chance for Job Queue to finish running
' ----------------------------------------------------
If RunningFrameJobs Then
  If jobAbort = False Then
    objConsole.AbortJobExplicit()
  End If

  Sleep(4) ' << give time for Job To finishing Aborting

End If

' Switch State to Closing
' -----------------------
SessionState = SessionState.Closing

WriteLogFile(StarBreak)
WriteLogFileRecord("Observatory Manager", "Info", "Change State", "Session Closing")   ' <<<< Executed okay

Session.DeltaMinsFromPlan = vcNull

' Set Session End Time
' --------------------
Session.EndTime = Now()

' Report Session State
' --------------------
ReportLine()
ReportTitle("Session Closing")        ' <<<< Executed okay
UpdateStatusNote("Session Closing...")    ' routine calls two invoke methods so should be okay

ReportComment("")    ' <<<< Not executed  (or at least not written to file)
ReportComment(LAlign2_Special(Tab2 + "<u>" + FillText("Begin Shutdown") + "</u>", 37) _
   + LPad10("Ok") + LPad18(Session.Name) + "(Session)")     ' <<<< Not executed  (or at least not written to file)


' Event
' --------
StoreSessionEvent("Session Closing", 1, FlagState.Green, "Session closing")     ' <<<< Not executed (at least not written to database)
SetFlagChanged("Session", 0) ' Signal to AstroPlan to upload revised ObservingResult Chart

' Reset Variables
' ---------------
ParkingInitiated = False
bParkingDome = False
bParkingScope = False

ClosingStageNo = 0
FinalCloseShutterAttempts = 0

Scope.ResetLastGetRaDecException()

End Sub

Session freezes before SetState_Closing is finished,  but there doesn't seem to a bug in the code executed, or obvious point where execution would obviously need to be wait for  significant time or to freeze waiting on other process.   The Obs.Manager has 10 points within the main loop from where SetState_Closing () can be called, so if SetState_Closing() did freeze it would have the affect of freezing the Obs.Manager.

Another possibility is that a freeze to the UI (objConsole) could cause UpdateStatusNote () to freeze.

Another possibility is that another thread (ObsWorker, etc) freezes when it mets a specific condition when  SessionState = SessionState.Closing

Conclusion
.

Recommendation

- Image Add trace code to manager.vb that allow execution of each and every line in SetState_Closing () to be followed   (More Data).   Done 2020-07-20 (AstroMain 3.26)

- Image See if it possible to replicate frozen program but special tests that cycles from running to closing multiple times  (More Data)

- Image Consider always starting Live Sessions from a clean program start (Potential Prevention)

- Image Alter Obs.Overseer code so that if Obs.Manger becomes frozen during Closing, then this situation is passed to AstroGuard so that it can take the appropriate action to close and park dome and park scope.   (Mitigation)

Back to Top