Main navigation

The Time Bomb Ticking in Sierra: Grand Central Dispatch is broken

If you are running macOS Sierra – any version from the original 10.12 release to the current 10.12.3 – and leave your Mac running all the time without letting the system sleep, you are likely to encounter a serious bug in its scheduling of tasks. This may make Sierra systems unfit for use as servers, requiring them to be restarted every 10-20 days to work around this bug.

From the early days since Sierra’s release, I have noticed that Time Machine backups can become irregular. At first, I assumed that was intentional, and part of some scheme to make them work on demand, rather than simply by the clock. More recently, I have noticed that this only happened when my iMac had been running continuously, without system sleep, for periods of around 14 days.

Without ready access to Sierra’s new log system, it is extremely difficult to discover what is happening in situations like this. Now that is available with my utility Consolation (available from the Downloads page in the top menu), it was only a matter of time before I would be able to study what happened when backups became irregular. When they did so early yesterday morning, I was ready to obtain some log extracts to discover what had failed.

The next backup did not start until shortly after I woke the iMac from display sleep just before 07:00:07:00:26.301630+0000 backupd: (TimeMachine) [com.apple.TimeMachine.TMLogInfo] Starting automatic backup
07:00:26.316105+0000 backupd: (TimeMachine) [com.apple.TimeMachine.TMLogInfo] Backing up to /dev/disk3s2: /Volumes/PROMISE PEGASUS/Backups.backupdb
and so through to07:06:16.743302+0000 backupd: (TimeMachine) [com.apple.TimeMachine.TMLogInfo] Backup completed successfully.

As is often the case when backups become irregular, another backup was then scheduled too soon after that:07:06:16.811196+0000 backupd-helper: (TimeMachine) [com.apple.TimeMachine.TMLogInfo] Not starting scheduled Time Machine backup: Less than 10 minutes since last backup

For a period of nearly 5 hours, DAS failed to rescore the 72 activities for which it was responsible, and therefore failed to recognise that a backup was due. Thus DAS did not tell CTS to run the backupd-auto command, which in turn resulted in Time Machine’s backups not taking place. It was only when I generated user events by waking the display that DAS was kicked back into action, when it recognised that timed tasks were overdue.

These log extracts also demonstrate how frustrating Apple’s ‘privacy’ protection has become: many log entries are rendered almost completely meaningless because their key content is redacted by <private>.

The only way that I know to restore normal function to DAS, so that it once again will schedule backups and other activities correctly, is to restart. Sure enough, following a restart Time Machine backups returned to normal, and ran almost like clockwork.

Let’s hope that Apple addresses this bug well before macOS 10.13.

If you do leave your Mac running macOS Sierra for more than a few days continuously, watch for backups becoming irregular. As soon as they do, you should restart it, as DAS failure will affect many more tasks than just backups: its list of ‘activities’ above contains 72 members, all of which will have become erratic and unreliable once the bug becomes manifest. It’s not a time machine so much as a time bomb.

Yes. But when turned off, those entries are simply not made in the log, so cannot be retrieved.
It is surely better to use predicate filtering to extract the entries that you are interested in.
Otherwise it defeats the point of having the new log system in the first place, doesn’t it?
Howard.

The best hope is that 10.12.6 fixes it – I don’t know yet, though.
With 10.12.5, I’m afraid that sleep or restarts are the only options. Although Time Machine backups are the most obvious problem, there are around 70 other services run by the same system. Details are given here.
Howard.

Even more concerning was after 20 years of setting up small business mac servers, when I tick Ignore Permission on an External Raid or Hd 24 hours later the tick is Automagically taken off. Is their any hope out there when the Mac OSx is now being programmed by iPad developers? Many of my business users question whether Apple is up to the job now. Further more Apple has watered down third party support by rescinding Apple Dealer Licences, mine was cancelled this week because after 4 years it is much more profitable to run from home, businesses don’t want a retailer and want onsite help but this is not Apple policy.