Jacob: I am experiencing the exact same problem with Snow Leopard 10.6.8 completely up to date.
If I boot up and the shut down without working with my computer, the shut down works fine. After some Xcode usage, the computer will stall showing the spinning gray wheel on a the blue shutdown background.
I believe this is a software problem, not a hardware one, probably cause by something we have installed. Jacob, do you have Parallels installed? It shows up in the logs, and may be the culprit.
These are the logs for my latest failed shutdown attempt:
system.log
---
Jul 12 22:51:06 baltimore com.apple.launchd.peruser.501[241] ([0x0-0xb00b].com.kainjow.BootChamp[282]): Exited: Killed
Jul 12 22:51:06 baltimore com.apple.launchd.peruser.501[241] (com.apple.AirPortBaseStationAgent[265]): Exited: Killed
Jul 12 22:51:09 baltimore loginwindow[114]: DEAD_PROCESS: 114 console
Jul 12 22:51:09 baltimore auditd[75120]: Auditing enabled
Jul 12 22:51:09 baltimore auditd[75120]: Got low space trigger
Jul 12 22:51:09 baltimore auditd[75120]: auditd_read_dirs(): all audit log directories over soft limit
Jul 12 22:51:09 baltimore auditd[75120]: renamed /var/audit/20110712204814.not_terminated to /var/audit/20110712204814.20110712205109
Jul 12 22:51:09 baltimore auditd[75120]: New audit file is /var/audit/20110712205109.not_terminated
Jul 12 22:51:09 baltimore _locationd[75126]: audit warning: closefile /var/audit/20110712204814.20110712205109
Jul 12 22:51:09 baltimore _locationd[75125]: audit warning: allsoft
Jul 12 22:51:09 baltimore _locationd[75124]: audit warning: soft /var/audit
Jul 12 22:51:13 baltimore shutdown[75128]: reboot by user:
Jul 12 22:51:13 baltimore shutdown[75128]: SHUTDOWN_TIME: 1310503873 368648
Jul 12 22:51:13 baltimore Parallels[75131]: Stopping Parallels Dispatcher Service
Jul 12 22:51:14 baltimore Parallels[75137]: Stopping Parallels networking
Jul 12 22:51:18 baltimore prl_naptd[204]: Exiting Parallels Network Daemon
Jul 12 22:51:21 baltimore Parallels[75190]: Unloading kernel extension prl_netbridge.kext
Jul 12 22:51:21 baltimore Parallels[75213]: Failed to unload kernel extension prl_netbridge.kext
Jul 12 22:51:21 baltimore Parallels[75218]: Unloading kernel extension prl_vnic.kext
Jul 12 22:51:22 baltimore Parallels[75241]: Failed to unload kernel extension prl_vnic.kext
Jul 12 22:51:22 baltimore Parallels[75244]: Parallels Networking was stopped
Jul 12 22:51:22 baltimore DirectoryService[11]: BUG in libdispatch: 10K540 - 1960 - 0x10004004
Jul 12 22:51:23 baltimore WindowServer[165]: hidd died. Reestablishing connection.
Jul 12 22:51:23 baltimore mDNSResponder[18]: mDNSResponder mDNSResponder-258.21 (May 26 2011 14:40:13) stopping
Jul 12 22:51:23 baltimore WindowServer[165]: Unable to create event queue via hidd: (0x10000003)
Jul 12 22:51:24 baltimore prl_naptd[266]: Exiting Parallels Network Daemon
Jul 12 22:51:24 baltimore hdiejectd[36536]: processSIGTERM_DA: calling exit(0)
kernel.log
---
Jul 12 22:51:06 baltimore kernel[0]: systemShutdown true
Jul 12 22:51:10 baltimore kernel[0]: Warning: audit space low (< 5% free)on audit log file-system
Jul 12 22:51:11 baltimore kernel[0]: systemShutdown true
Jul 12 22:51:12 baltimore kernel[0]: Warning: audit space low (< 5% free)on audit log file-system
Jul 12 22:51:14 baltimore kernel[0]: Kext loading now disabled.
Jul 12 22:51:14 baltimore kernel[0]: Kext unloading now disabled.
Jul 12 22:51:14 baltimore kernel[0]: Kext autounloading now disabled.
Jul 12 22:51:14 baltimore kernel[0]: Kernel requests now disabled.
Jul 12 22:51:14 baltimore kernel[0]: Warning: audit space low (< 5% free)on audit log file-system
Jul 12 22:51:21 baltimore kernel[0]: com.parallels.kext.prlnet 6.0.11994.637263 is unloading.
Jul 12 22:51:21 baltimore kernel[0]: Kext unloading is disabled (com.parallels.kext.prl_netbridge).
Jul 12 22:51:21: --- last message repeated 2 times ---
Jul 12 22:51:21 baltimore kernel[0]: com.parallels.kext.vnic 6.0.11994.637263 is unloading.
Jul 12 22:51:21 baltimore kernel[0]: Failed to delete address of interface: 102
Jul 12 22:51:21: --- last message repeated 1 time ---
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic_bus: wait for detach for 0
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic_bus::detach_handler for 0
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic_bus: detached 0
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic: destroyed vnic0
Jul 12 22:51:21 baltimore kernel[0]: Failed to delete address of interface: 102
Jul 12 22:51:21: --- last message repeated 1 time ---
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic_bus: wait for detach for 1
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic_bus::detach_handler for 1
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic_bus: detached 1
Jul 12 22:51:21 baltimore kernel[0]: com_parallels_kext_prl_vnic: destroyed vnic1
Jul 12 22:51:21 baltimore kernel[0]: Kext unloading is disabled (com.parallels.kext.prl_vnic).
Any other light on this matter would be welcomed. Thanks!