I posted this on the Apple forums but, as usual, it goes weeks and weeks without answers.
I have strange problem that has happened before but now is many times worse. The issue is that I have a Mac Mini running High Sierra and it will stop publishing its shares to my network after between an hour and four hours (I haven't nailed this down exactly) and every one of my Mac's, regardless of OS version, will be unable to access the shares anymore. If I try to connect to that system in any way from any computer it just tries for a few minutes and tells me it is unavailable. One interesting additional issue is that when the computer stops publishing shares I can also no longer access the sharing preference pane, always getting the message "Preferences Error - Could not load Sharing preference pane".
This has happened before with much less regularity back when I had upgraded my "server" to El Capitan but it seemed to settle down eventually.
Coincidentally when this computer is in this "state" I can no longer shut down or restart, I have to physically power off the system to reboot it and get it to publish shares for another few hours or I can go to terminal and issue a
sudo shutdown -r now and that will reboot it.
This may be unrelated but when this happens there is also a process i see in Activity Monitor that reports that "Login window" is not responding" which cannot be quit or force quit from Activity Monitor but can kill manually with a sudo kill in terminal (but killing this and then it auto starting again doesn't fix the problem).
Before I erase what is my server (so thus a major issue to totally blow it away and start again) I wanted to see if anyone had some ideas. I have booted into safe mode and gone into sharing and then shut down and I have reset the PRAM on the computer.
Today I watched Console as I tried to access the now-locked-up Sharing Preferences and did notice this message (not sure if this is relevant or not):
ERROR: _willSelectSemaphore timeout! (com.apple.preferences.sharing)
Update: Today I've been really logging everything and watching the system constantly and found that if I kill SMB and restart it then everything works again, including unlocking the sharing pane. I use: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist and sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smbd.plist
So it appears to be an SMB issue and I'm not sure what I can do to resolve it. I did add a PLIST script to 'touch' the SMB process but have to wait that out to see if it does any good because it was actually a Mavericks fix that touching SMB would force it to restart. I put it in Library/LaunchDaemon.