PDA

View Full Version : Account Won't Log Out After SD! Scheduled Backup


Kurt Todoroff
04-18-2016, 09:37 AM
SD! performs a scheduled backup, on my two iMacs, at 1 AM every day. The target backup disks are encrypted. Both iMacs restart, automatically, at 6 AM, every day. I have used this arrangement, successfully, for years.

When I upgraded OS X to Yosemite on my two iMacs, both of them would not logout of the User account, from time to time. This problem persists with El Capitan, and, it occurs to the present. This occurs when I attempt to restart the iMac, and, when OS X attempts to perform an automatically scheduled daily restart. The display is black. The arrow is visible (Although, after five minutes (the screensaver turn-on setting) the arrow disappears. It reappears on the black display, if I bump the trackball.). The computer does not respond to keyboard input (including the restart key commands). The arrow does respond to trackball input, with movement. I cannot access the iMac through Screen Sharing / VNC, when the iMac is in this state. I have allowed this state to persist, for over 72 hours. When this problem occurs, the only recourse is to perform a hard power off.

I have investigated this problem, on and off, for the past couple of years, unsuccessfully. About six weeks ago, I disabled all SD! scheduled backups on both iMacs. The restart problem stopped occurring, entirely. After one month, I reenabled SD! scheduled backups. The failure to restart problem has reoccurred. During this six week period, the external encrypted backup drives have remained attached to their respective iMacs. Some of them connect through Firewire. Some of them connect through USB.

Finally, a few months ago, I purchased a new iMac to replace my home iMac. The old [replaced] home iMac display went black, permanently. The estimated repair costs exceed $750. I attached an inexpensive display to this old iMac, in order to gain access to it, until I decide its future. This new iMac restarted automatically, every day. It began to exhibit the failure to restart problem, once I enabled SD! automatically scheduled backups. The problem ceased occurring, once I disabled SD! automatically scheduled backups.

I run a minimalist system configuration on my iMacs. Very very little non-Apple software: MSO, DiskWarrior, SuperDuper!, Canvas Draw, a couple of other reputable applications. No Flash, Shockwave, Adobe Reader.

I request your assistance. I will provide SD! logs and console logs, if necessary.

Thank you.

dnanian
04-18-2016, 02:23 PM
Kurt, honestly, we have no kernel components. When we're not running, we're not running. We don't interact with the system in any unusual way. The schedules are fired with either cron or launchd, in an entirely standard manner, and you can even look at the schedule drivers, since we supply them in source form. They're written in Applescript. Applescript can't cause your system to hang on shutdown either.

So, something else is clearly going on.

What happens if you start up in Safe Boot, then set a schedule to run a few minutes from "now", then shut down?

Kurt Todoroff
04-18-2016, 05:14 PM
Hello, Dave.

I want to start this message by stating that I am confident that SD! is not causing this problem, nor, did I attempt to imply so. My respect for SD! is without peer. I only stated my observations. My primary observation was that my new iMac was working flawlessly, for many weeks, until I enabled SD! scheduled daily backups. Then, the problem ceased on three iMacs, when I disabled SD! scheduled daily backups on all of them. Furthermore, this problem started when I installed Yosemite.

I will try your suggestion. Since the problem does not occur with every restart attempt, if it does not occur while in Safe Boot, then, its absence will not be conclusive evidence of a specific problem. I could attempt repetitive Safe Boot / SD! backup / Restart attempts. This presents the problem of when to terminate this testing, if I cannot reproduce the problem while in this configuration.

From another perspective, I recall reading a posting about a User's inability to eject a disk, after an SD! backup. You stated that Spotlight might be using the disk. This being said, could OS X be doing something to the disk (Spotlight, et al.), post SD! backup? I'm still wondering about encryption's possible role in this.

dnanian
04-18-2016, 06:14 PM
Certainly, the spotlight daemon should be killed during shutdown like every other daemon, so that shouldn't be an issue.

You may want to try booting in "verbose" mode (cmd+v during poweron). That also does a verbose shutdown, which may provide you with clues as to what's failing or hanging during the shutdown process.

Can't see what encryption would have to do with it.

Note that Jason Snell (http://www.sixcolors.com) had a very similar sounding problem that ended up being caused by Adobe Creative Cloud...

Kurt Todoroff
04-18-2016, 09:20 PM
Hello, Dave.

Information 1:

I neglected to add some information, in my original posting. After each time that the scheduled morning restart (or, other manual restart) fails, due to inability to log out (thus, requiring me to perform a hard restart), I open the hard drive. It contains a file that uses the filename TEST.txt. I open the file. It contains the word Test (or, Testing; I don’t remember which one). I close this file, and then, I delete it. I check the hard drive, nearly every day. This file is not present, after I delete it. The next time that this problem occurs, and, the system won’t log out / restart, and, I perform another hard restart, this file appears on the hard drive, again. Delete it. Repeat.



Information 2:

I performed a Verbose Mode boot. Then, I opened Terminal. I typed

sudo dmesg >> ~/Desktop/kernlog.txt

I opened this file. It contained interesting information. However, it exceeds my abilities, and, I am unable to decipher its meaning.



Information 3:

I performed five consecutive Safe Mode reboots, followed by SD! scheduled backups to both a small internal volume, and, to an external encrypted USB hard drive. I have provided the results, below.

Restart 1
Shift key
Safe Mode
SD! Scheduled Backup to a small internal volume, and, to an external encrypted USB hard drive
SD! Automatically Quit

Restart 2
Shift key
Black display with visible arrow, for five minutes.
Typed Username and Password, in the blind.
Pressed Return, in the blind.
Safe Mode
SD! Scheduled Backup to a small internal volume, and, to an external encrypted USB hard drive
SD! Automatically Quit

Restart 3
Shift key
Safe Mode
SD! Scheduled Backup to a small internal volume, and, to an external encrypted USB hard drive
SD! Automatically Quit

Restart 4
Shift key
Safe Mode
SD! Scheduled Backup to a small internal volume, and, to an external encrypted USB hard drive
SD! Automatically Quit

Restart 5
Shift key
Safe Mode
SD! Scheduled Backup to a small internal volume, and, to an external encrypted USB hard drive
SD! Automatically Quit

Restart 6
Normal reboot to the system.



As shown here, I performed five Safe Mode restarts. I performed ten SD! scheduled backups (two per SM restart). The system restarted normally, every time.

I plan to leave the SD! scheduled restarts disabled for one week. Then, if no restart failures occur, I will reenable SD! scheduled restarts, and, I will monitor restart performance.

Here is something else, that I was considering. Let’s suppose that after SD! performs a scheduled backup, at 11:30 PM or 12:45 AM, sometimes OS X Spotlight does its thing on the two backup drives. I don’t remember the time that the daily / weekly / monthly maintenance scripts run. Suppose that OS X attempts to run one or more of these scripts, while Spotlight is doing its thing to the two backup drives. I’ve seen the silliest, seemingly innocent concurrent processes, bring my Quad-Core i7 right to a halt. Suppose that the combination of Spotlight and the maintenance scripts slows the system down so much, that, both processes are still running when the system attempts its 6 AM scheduled restart. What would the system do, when it attempted log out of my account (for a scheduled restart), while the Spotlight and d/w/m maintenance scripts were still running?

dnanian
04-19-2016, 07:29 AM
Is "TEST.txt" something that's on the source? If not...well, *something* is creating it, and it's not us.

I can't see how any normal Spotlight or maintenance script could prevent logging out or restart, given those daemons would be killed normally. I really wouldn't hard power off, though. Have you tried running

sudo shutdown -r now

in Terminal when you can't log out? Have you looked at the Activity Monitor to see what might not be actually exiting?

Kurt Todoroff
04-19-2016, 09:02 AM
Hello, Dave.

I should have stated that the file TEST.txt appears on the source hard drive, after I perform a hard shutdown.

I have no choice, but, to perform a hard shutdown, when this situation occurs. The display is black. The arrow is either visible and moveable, or, it becomes visible and moveable after I move the trackball. I cannot launch a Terminal session, Activity Monitor, or any other applications. I have waited for up to 72 hours for it to finish the logout, and, commence the restart. But, it doesn't. So, I perform a hard shutdown.

I have read about Crash Logs, but, I have never looked at them. Is this an avenue that I could pursue? Would it/they reveal what the CPU is executing, when the display goes black, and, the iMac becomes unresponsive?

dnanian
04-19-2016, 09:53 AM
Not necessarily, no. But it also was "black" during a normal boot (#2 above)?

Kurt Todoroff
04-19-2016, 01:29 PM
Hello, Dave.

I don't know what happened during restart number two. The iMac was responsive, seeing how I entered my login credentials in the blind, successfully. Also, all five Safe Mode boots had different appearances, insofar as the rippling blinds effect that transversed up the screen, and, the timing of startup events. I'll write that one off as a one time glitch.

If you don't recommend Crash Logs and Console Logs to aid in uncovering this problem, then, I will wait for one week, with SD! automatic scheduled backups disabled.

Thank you.

dnanian
04-19-2016, 02:17 PM
This all feels rather unusual, Kurt. Perhaps you have a hardware problem that's manifesting itself in unusual ways? Certainly, you should never boot to a black screen with just a cursor, and that's distressing close to your shutdown scenarios as well.

Kurt Todoroff
04-19-2016, 02:54 PM
I agree that this feels unusual. However, it is unlikely that the problem is hardware-based, seeing how this identical problem affects three different Macintoshes (2009, 2010, 2015). I attempt to maintain the operating system and the application complement identical on all three computers. The singular noteworthy difference is that my small business office McIntosh includes Parallels, while the two home Macintoshes do not.

When I purchased my new iMac, a couple months ago, this was the last thing that I expected to happen. In fact, given my minimalist, lean and mean, software philosophy, I have installed even less software on this new iMac, than is on my previous two iMacs. Once I had completed configuring my new iMac, I had planned to erase the internal boot drives of the other two iMacs, and then, use SuperDuper! to copy the new iMac boot drive backup (even leaner and meaner) to the other two iMac internal boot drives.

Are you familiar with MacTeX/TeXShop? I have installed it on all three iMacs. I have used LaTeX for thirty years, starting with VAX/VMS. I can't imagine not having it installed on my Macs, yet, sometimes I wonder if it is the culprit, since it installs at the UNIX level. I can't put my finger on it. I guess that I am searching in the dark.

dnanian
04-19-2016, 03:12 PM
I'm certainly familiar with TeX, but I haven't used it since the early 80s.

I'm hunting in the dark, too. Safe Boot, though, should disable everything but Apple kexts, and it's strange that you'd end up with a blank login. Certainly not something I've ever seen...

Kurt Todoroff
04-19-2016, 03:45 PM
Going forward, if you give this problem any thought from time to time, remember that this problem started when I upgraded to Yosemite. Prior to that, my Macs worked almost flawlessly for years.

Thank you, Dave.

dnanian
04-19-2016, 03:54 PM
I'll certainly keep a look out for others who are reporting similar issues; that's why I pointed you to Jason's site.

Kurt Todoroff
04-19-2016, 05:50 PM
I read your most recent message, and, I decided to perform more than a perfunctory review of Jason Snell's article.

I booted into Verbose mode.
I launched SD!.
I performed two backups of the internal hard drive.
I quit SD!.
I restarted the system.

The display became black, immediately. The arrow remained on the screen. Five minutes later, the arrow disappeared. I wiggled the trackball. The arrow reappeared on the black display.

Interesting note, with the arrow visible on the black screen, if I wiggle the trackball quickly, the arrow becomes large, as I would expect it to during normal operations. It seem that, despite a black display and a visible arrow, the system has not logged out of my User account. I wonder if the Finder is running, or, has quit, at this point.

I waited fifteen minutes. The iMac still had not restarted. Then, I performed a hard power down. Up to this point, I had not seen any verbose mode data on the display during shutdown.

Thirty seconds later, I powered the iMac up.

I launched the console. I clicked on SYSTEM LOG QUERIES > All Messages.

I scrolled down to the time index that I remembered commencing the restart. I'm not familiar with the log entries. Would you like to take a look at them? Some of them contain references to SD! I can send the entire log, or, I can send a small snapshot of the few seconds before and the few seconds after the restart event.

dnanian
04-19-2016, 06:03 PM
Send (to the support email) a few seconds before to where the restart happens and I'll take a look to see if there's anything that might be useful there.

Another thing to try, by the way, since it seems like what's wrong is the window server, is to ssh into the machine, rather than hard powering down...