[{"data":1,"prerenderedAt":964},["ShallowReactive",2],{"post-en-macos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop":3,"surround-en-blog\u002Fen\u002Fblog\u002Fmacos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop.md":951},{"id":4,"title":5,"body":6,"canonical":24,"category":937,"date":133,"description":938,"extension":939,"image":940,"meta":941,"navigation":336,"path":942,"seo":943,"slug":944,"status":945,"stem":946,"tags":947,"translationSlug":944,"__hash__":950},"blog\u002Fen\u002Fblog\u002Fmacos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop.md","macOS Golden Gate 27.0 Beta 2: Fixing appstoreagent at 100% CPU with SIGSTOP",{"type":7,"value":8,"toc":924},"minimark",[9,14,18,76,83,86,90,93,121,124,161,166,198,200,204,214,221,238,241,243,247,250,257,283,290,651,653,657,660,664,671,787,805,809,839,860,864,867,920],[10,11,13],"h2",{"id":12},"_1-symptoms","1. Symptoms",[15,16,17],"p",{},"After upgrading to macOS Golden Gate 27.0 Developer Beta 2 (Build 26A5368g), my MacBook began running extremely hot and the battery drained rapidly. I checked the process status in Terminal:",[19,20,25],"pre",{"className":21,"code":22,"language":23,"meta":24,"style":24},"language-bash shiki shiki-themes github-light github-dark","$ ps aux | grep appstoreagent\n\u003Cusername>       19002 107.0  0.1 488771680  25088   ??  R    12:20AM  14:55.36 \u002FSystem\u002FLibrary\u002FPrivateFrameworks\u002FAppStoreDaemon.framework\u002FSupport\u002Fappstoreagent\n","bash","",[26,27,28,54],"code",{"__ignoreMap":24},[29,30,33,37,41,44,48,51],"span",{"class":31,"line":32},"line",1,[29,34,36],{"class":35},"sScJk","$",[29,38,40],{"class":39},"sZZnC"," ps",[29,42,43],{"class":39}," aux",[29,45,47],{"class":46},"szBVR"," |",[29,49,50],{"class":35}," grep",[29,52,53],{"class":39}," appstoreagent\n",[29,55,57,60,64,67,70,73],{"class":31,"line":56},2,[29,58,59],{"class":46},"\u003C",[29,61,63],{"class":62},"sVt8B","username",[29,65,66],{"class":46},">",[29,68,69],{"class":62},"       19002 107.0  0.1 488771680  25088   ",[29,71,72],{"class":46},"??",[29,74,75],{"class":62},"  R    12:20AM  14:55.36 \u002FSystem\u002FLibrary\u002FPrivateFrameworks\u002FAppStoreDaemon.framework\u002FSupport\u002Fappstoreagent\n",[15,77,78,79,82],{},"Even though the App Store app was not open, the ",[26,80,81],{},"appstoreagent"," daemon continuously consumed more than 100% of one CPU core. Force-quitting it did not help: the process was relaunched immediately and returned to full load.",[84,85],"hr",{},[10,87,89],{"id":88},"_2-tracing-the-logs-and-finding-the-root-cause","2. Tracing the Logs and Finding the Root Cause",[15,91,92],{},"To identify the actual failure, I queried macOS Unified Logging for messages from this process:",[19,94,96],{"className":21,"code":95,"language":23,"meta":24,"style":24},"$ \u002Fusr\u002Fbin\u002Flog show --predicate 'process == \"appstoreagent\" and eventMessage contains \"recent_launch_times\"' --last 5m\n",[26,97,98],{"__ignoreMap":24},[29,99,100,102,105,108,112,115,118],{"class":31,"line":32},[29,101,36],{"class":35},[29,103,104],{"class":39}," \u002Fusr\u002Fbin\u002Flog",[29,106,107],{"class":39}," show",[29,109,111],{"class":110},"sj4cs"," --predicate",[29,113,114],{"class":39}," 'process == \"appstoreagent\" and eventMessage contains \"recent_launch_times\"'",[29,116,117],{"class":110}," --last",[29,119,120],{"class":39}," 5m\n",[15,122,123],{},"The command produced the following error:",[19,125,127],{"className":21,"code":126,"language":23,"meta":24,"style":24},"2026-07-04 00:34:55.462135+0800 0x7969e    Error       0x0                  19002  0    appstoreagent: (libsqlite3.dylib) [com.apple.libsqlite3:logging] no such column: active_launch_events.recent_launch_times in \"SELECT active_launch_events.ROWID, active_launch_events.bundle_id, active_launch_events.containing_bundle_id, active_launch_events.event_source, active_launch_events.is_extension, active_launch_events.launch_end_time, active_launch_events.launch_start_time, active_launch_events.recent_launch_times, active_launch_events.timestamp, active_launch_events.payload FROM active_launch_events\"\n",[26,128,129],{"__ignoreMap":24},[29,130,131,134,137,140,143,146,149,152,155,158],{"class":31,"line":32},[29,132,133],{"class":35},"2026-07-04",[29,135,136],{"class":39}," 00:34:55.462135+0800",[29,138,139],{"class":110}," 0x7969e",[29,141,142],{"class":39},"    Error",[29,144,145],{"class":110},"       0x0",[29,147,148],{"class":110},"                  19002",[29,150,151],{"class":110},"  0",[29,153,154],{"class":39},"    appstoreagent:",[29,156,157],{"class":62}," (libsqlite3.dylib) [com.apple.libsqlite3:logging] no such column: active_launch_events.recent_launch_times in ",[29,159,160],{"class":39},"\"SELECT active_launch_events.ROWID, active_launch_events.bundle_id, active_launch_events.containing_bundle_id, active_launch_events.event_source, active_launch_events.is_extension, active_launch_events.launch_end_time, active_launch_events.launch_start_time, active_launch_events.recent_launch_times, active_launch_events.timestamp, active_launch_events.payload FROM active_launch_events\"\n",[162,163,165],"h3",{"id":164},"what-the-error-indicates","What the error indicates",[167,168,169,185],"ul",{},[170,171,172,176,177,180,181,184],"li",{},[173,174,175],"strong",{},"Root cause:"," while macOS Golden Gate 27.0 Beta 2 builds or migrates the security database schema in memory, its upgrade migration appears to omit the ",[26,178,179],{},"recent_launch_times"," column from the physical ",[26,182,183],{},"active_launch_events"," table.",[170,186,187,190,191,194,195,197],{},[173,188,189],{},"Why CPU usage spikes:"," because the column is missing, the underlying SQLite query repeatedly throws a ",[26,192,193],{},"no such column"," error. After catching the error, ",[26,196,81],{}," immediately retries at high frequency with no delay, creating a query-fail-retry loop that saturates one CPU core.",[84,199],{},[10,201,203],{"id":202},"_3-why-a-normal-kill-does-not-fix-it","3. Why a Normal Kill Does Not Fix It",[15,205,206,207,209,210,213],{},"On macOS, ",[26,208,81],{}," is a user agent managed by the system’s root ",[26,211,212],{},"launchd"," daemon.",[15,215,216,217,220],{},"When you force-quit it with ",[26,218,219],{},"kill -9",":",[222,223,224,227,232],"ol",{},[170,225,226],{},"The process exits and briefly releases the CPU.",[170,228,229,231],{},[26,230,212],{}," detects that the managed service exited unexpectedly and immediately relaunches it.",[170,233,234,235,237],{},"The new ",[26,236,81],{}," instance runs the same database initialization query, hits the missing-schema error again, and returns to 100% CPU usage.",[15,239,240],{},"Force-quitting the process therefore creates a repeated launch-crash-relaunch cycle, adding system overhead and generating large volumes of logs.",[84,242],{},[10,244,246],{"id":245},"_4-a-sigstop-sigcont-workaround","4. A SIGSTOP \u002F SIGCONT Workaround",[15,248,249],{},"Because the system’s read-only volume is protected by SIP (System Integrity Protection), a regular user cannot directly repair the underlying database schema. A temporary behavioral workaround is therefore the practical option.",[15,251,252,253,256],{},"The strategy is to control the process with signals and ",[173,254,255],{},"suspend it",".",[167,258,259,277],{},[170,260,261,262,265,266,269,270,273,274,276],{},"Send ",[26,263,264],{},"SIGSTOP",": this places the process in the ",[26,267,268],{},"T"," (stopped) state. macOS stops scheduling CPU time for it, so ",[173,271,272],{},"CPU usage immediately falls to 0%",". Crucially, ",[26,275,212],{}," still considers the process alive and does not relaunch it.",[170,278,261,279,282],{},[26,280,281],{},"SIGCONT",": when you need the App Store, this signal resumes the process immediately so downloads and updates can work normally.",[15,284,285,286,289],{},"The following Python 3 daemon, ",[26,287,288],{},"guardian.py",", automates this behavior:",[19,291,295],{"className":292,"code":293,"language":294,"meta":24,"style":24},"language-python shiki shiki-themes github-light github-dark","#!\u002Fusr\u002Fbin\u002Fenv python3\nimport subprocess\nimport time\nimport os\nimport sys\nimport signal\n\ndef get_pids(process_name):\n    \"\"\"Return all PIDs for the specified process name.\"\"\"\n    try:\n        output = subprocess.check_output([\"pgrep\", \"-x\", process_name], text=True)\n        return [int(pid.strip()) for pid in output.strip().split(\"\\n\") if pid.strip()]\n    except subprocess.CalledProcessError:\n        return []\n\ndef is_app_store_running():\n    \"\"\"Check whether the App Store GUI client is running.\"\"\"\n    return len(get_pids(\"App Store\")) > 0\n\ndef get_process_state(pid):\n    \"\"\"Return the process state. 'T' means stopped; other values mean running.\"\"\"\n    try:\n        output = subprocess.check_output([\"ps\", \"-o\", \"state\", \"-p\", str(pid)], text=True)\n        lines = output.strip().split(\"\\n\")\n        if len(lines) > 1:\n            return lines[1].strip()\n    except subprocess.CalledProcessError:\n        pass\n    return None\n\ndef main():\n    print(f\"[{time.strftime('%Y-%m-%d %H:%M:%S')}] appstoreagent guardian daemon started.\")\n\n    while True:\n        try:\n            agent_pids = get_pids(\"appstoreagent\")\n            app_store_active = is_app_store_running()\n\n            for pid in agent_pids:\n                state = get_process_state(pid)\n                if not state:\n                    continue\n\n                # Resume appstoreagent when the App Store is open and the process is stopped.\n                if app_store_active:\n                    if 'T' in state:\n                        print(f\"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is running. Resuming appstoreagent (PID {pid})...\")\n                        os.kill(pid, signal.SIGCONT)\n                # Suspend appstoreagent when the App Store is closed and the process is running.\n                else:\n                    if 'T' not in state:\n                        print(f\"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is closed. Suspending appstoreagent (PID {pid}) to save CPU...\")\n                        os.kill(pid, signal.SIGSTOP)\n\n        except Exception as e:\n            print(f\"Error in guardian loop: {e}\", file=sys.stderr)\n\n        time.sleep(5)\n\nif __name__ == \"__main__\":\n    main()\n","python",[26,296,297,302,307,313,319,325,331,338,344,350,356,362,368,374,380,385,391,397,403,408,414,420,425,431,437,443,449,454,460,466,471,477,483,488,494,500,506,512,517,523,529,535,541,546,552,558,564,570,576,582,588,594,600,606,611,617,623,628,634,639,645],{"__ignoreMap":24},[29,298,299],{"class":31,"line":32},[29,300,301],{},"#!\u002Fusr\u002Fbin\u002Fenv python3\n",[29,303,304],{"class":31,"line":56},[29,305,306],{},"import subprocess\n",[29,308,310],{"class":31,"line":309},3,[29,311,312],{},"import time\n",[29,314,316],{"class":31,"line":315},4,[29,317,318],{},"import os\n",[29,320,322],{"class":31,"line":321},5,[29,323,324],{},"import sys\n",[29,326,328],{"class":31,"line":327},6,[29,329,330],{},"import signal\n",[29,332,334],{"class":31,"line":333},7,[29,335,337],{"emptyLinePlaceholder":336},true,"\n",[29,339,341],{"class":31,"line":340},8,[29,342,343],{},"def get_pids(process_name):\n",[29,345,347],{"class":31,"line":346},9,[29,348,349],{},"    \"\"\"Return all PIDs for the specified process name.\"\"\"\n",[29,351,353],{"class":31,"line":352},10,[29,354,355],{},"    try:\n",[29,357,359],{"class":31,"line":358},11,[29,360,361],{},"        output = subprocess.check_output([\"pgrep\", \"-x\", process_name], text=True)\n",[29,363,365],{"class":31,"line":364},12,[29,366,367],{},"        return [int(pid.strip()) for pid in output.strip().split(\"\\n\") if pid.strip()]\n",[29,369,371],{"class":31,"line":370},13,[29,372,373],{},"    except subprocess.CalledProcessError:\n",[29,375,377],{"class":31,"line":376},14,[29,378,379],{},"        return []\n",[29,381,383],{"class":31,"line":382},15,[29,384,337],{"emptyLinePlaceholder":336},[29,386,388],{"class":31,"line":387},16,[29,389,390],{},"def is_app_store_running():\n",[29,392,394],{"class":31,"line":393},17,[29,395,396],{},"    \"\"\"Check whether the App Store GUI client is running.\"\"\"\n",[29,398,400],{"class":31,"line":399},18,[29,401,402],{},"    return len(get_pids(\"App Store\")) > 0\n",[29,404,406],{"class":31,"line":405},19,[29,407,337],{"emptyLinePlaceholder":336},[29,409,411],{"class":31,"line":410},20,[29,412,413],{},"def get_process_state(pid):\n",[29,415,417],{"class":31,"line":416},21,[29,418,419],{},"    \"\"\"Return the process state. 'T' means stopped; other values mean running.\"\"\"\n",[29,421,423],{"class":31,"line":422},22,[29,424,355],{},[29,426,428],{"class":31,"line":427},23,[29,429,430],{},"        output = subprocess.check_output([\"ps\", \"-o\", \"state\", \"-p\", str(pid)], text=True)\n",[29,432,434],{"class":31,"line":433},24,[29,435,436],{},"        lines = output.strip().split(\"\\n\")\n",[29,438,440],{"class":31,"line":439},25,[29,441,442],{},"        if len(lines) > 1:\n",[29,444,446],{"class":31,"line":445},26,[29,447,448],{},"            return lines[1].strip()\n",[29,450,452],{"class":31,"line":451},27,[29,453,373],{},[29,455,457],{"class":31,"line":456},28,[29,458,459],{},"        pass\n",[29,461,463],{"class":31,"line":462},29,[29,464,465],{},"    return None\n",[29,467,469],{"class":31,"line":468},30,[29,470,337],{"emptyLinePlaceholder":336},[29,472,474],{"class":31,"line":473},31,[29,475,476],{},"def main():\n",[29,478,480],{"class":31,"line":479},32,[29,481,482],{},"    print(f\"[{time.strftime('%Y-%m-%d %H:%M:%S')}] appstoreagent guardian daemon started.\")\n",[29,484,486],{"class":31,"line":485},33,[29,487,337],{"emptyLinePlaceholder":336},[29,489,491],{"class":31,"line":490},34,[29,492,493],{},"    while True:\n",[29,495,497],{"class":31,"line":496},35,[29,498,499],{},"        try:\n",[29,501,503],{"class":31,"line":502},36,[29,504,505],{},"            agent_pids = get_pids(\"appstoreagent\")\n",[29,507,509],{"class":31,"line":508},37,[29,510,511],{},"            app_store_active = is_app_store_running()\n",[29,513,515],{"class":31,"line":514},38,[29,516,337],{"emptyLinePlaceholder":336},[29,518,520],{"class":31,"line":519},39,[29,521,522],{},"            for pid in agent_pids:\n",[29,524,526],{"class":31,"line":525},40,[29,527,528],{},"                state = get_process_state(pid)\n",[29,530,532],{"class":31,"line":531},41,[29,533,534],{},"                if not state:\n",[29,536,538],{"class":31,"line":537},42,[29,539,540],{},"                    continue\n",[29,542,544],{"class":31,"line":543},43,[29,545,337],{"emptyLinePlaceholder":336},[29,547,549],{"class":31,"line":548},44,[29,550,551],{},"                # Resume appstoreagent when the App Store is open and the process is stopped.\n",[29,553,555],{"class":31,"line":554},45,[29,556,557],{},"                if app_store_active:\n",[29,559,561],{"class":31,"line":560},46,[29,562,563],{},"                    if 'T' in state:\n",[29,565,567],{"class":31,"line":566},47,[29,568,569],{},"                        print(f\"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is running. Resuming appstoreagent (PID {pid})...\")\n",[29,571,573],{"class":31,"line":572},48,[29,574,575],{},"                        os.kill(pid, signal.SIGCONT)\n",[29,577,579],{"class":31,"line":578},49,[29,580,581],{},"                # Suspend appstoreagent when the App Store is closed and the process is running.\n",[29,583,585],{"class":31,"line":584},50,[29,586,587],{},"                else:\n",[29,589,591],{"class":31,"line":590},51,[29,592,593],{},"                    if 'T' not in state:\n",[29,595,597],{"class":31,"line":596},52,[29,598,599],{},"                        print(f\"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is closed. Suspending appstoreagent (PID {pid}) to save CPU...\")\n",[29,601,603],{"class":31,"line":602},53,[29,604,605],{},"                        os.kill(pid, signal.SIGSTOP)\n",[29,607,609],{"class":31,"line":608},54,[29,610,337],{"emptyLinePlaceholder":336},[29,612,614],{"class":31,"line":613},55,[29,615,616],{},"        except Exception as e:\n",[29,618,620],{"class":31,"line":619},56,[29,621,622],{},"            print(f\"Error in guardian loop: {e}\", file=sys.stderr)\n",[29,624,626],{"class":31,"line":625},57,[29,627,337],{"emptyLinePlaceholder":336},[29,629,631],{"class":31,"line":630},58,[29,632,633],{},"        time.sleep(5)\n",[29,635,637],{"class":31,"line":636},59,[29,638,337],{"emptyLinePlaceholder":336},[29,640,642],{"class":31,"line":641},60,[29,643,644],{},"if __name__ == \"__main__\":\n",[29,646,648],{"class":31,"line":647},61,[29,649,650],{},"    main()\n",[84,652],{},[10,654,656],{"id":655},"_5-running-the-guardian-silently-with-launchd","5. Running the Guardian Silently with launchd",[15,658,659],{},"To keep the guardian running silently in the background, package it as a macOS Launch Agent.",[162,661,663],{"id":662},"_51-create-the-configuration-file","5.1 Create the Configuration File",[15,665,666,667,670],{},"Create ",[26,668,669],{},"com.user.appstoreagent-guardian.plist"," locally:",[19,672,676],{"className":673,"code":674,"language":675,"meta":24,"style":24},"language-xml shiki shiki-themes github-light github-dark","\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003C!DOCTYPE plist PUBLIC \"-\u002F\u002FApple\u002F\u002FDTD PLIST 1.0\u002F\u002FEN\" \"http:\u002F\u002Fwww.apple.com\u002FDTDs\u002FPropertyList-1.0.dtd\">\n\u003Cplist version=\"1.0\">\n\u003Cdict>\n    \u003Ckey>Label\u003C\u002Fkey>\n    \u003Cstring>com.user.appstoreagent-guardian\u003C\u002Fstring>\n    \u003Ckey>ProgramArguments\u003C\u002Fkey>\n    \u003Carray>\n        \u003Cstring>\u002Fusr\u002Fbin\u002Fpython3\u003C\u002Fstring>\n        \u003Cstring>-u\u003C\u002Fstring>\n        \u003Cstring>\u002Fpath\u002Fto\u002Fguardian.py\u003C\u002Fstring>\n    \u003C\u002Farray>\n    \u003Ckey>RunAtLoad\u003C\u002Fkey>\n    \u003Ctrue\u002F>\n    \u003Ckey>KeepAlive\u003C\u002Fkey>\n    \u003Ctrue\u002F>\n    \u003Ckey>StandardOutPath\u003C\u002Fkey>\n    \u003Cstring>\u002Fpath\u002Fto\u002Fguardian.log\u003C\u002Fstring>\n    \u003Ckey>StandardErrorPath\u003C\u002Fkey>\n    \u003Cstring>\u002Fpath\u002Fto\u002Fguardian.err\u003C\u002Fstring>\n\u003C\u002Fdict>\n\u003C\u002Fplist>\n","xml",[26,677,678,683,688,693,698,703,708,713,718,723,728,733,738,743,748,753,757,762,767,772,777,782],{"__ignoreMap":24},[29,679,680],{"class":31,"line":32},[29,681,682],{},"\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",[29,684,685],{"class":31,"line":56},[29,686,687],{},"\u003C!DOCTYPE plist PUBLIC \"-\u002F\u002FApple\u002F\u002FDTD PLIST 1.0\u002F\u002FEN\" \"http:\u002F\u002Fwww.apple.com\u002FDTDs\u002FPropertyList-1.0.dtd\">\n",[29,689,690],{"class":31,"line":309},[29,691,692],{},"\u003Cplist version=\"1.0\">\n",[29,694,695],{"class":31,"line":315},[29,696,697],{},"\u003Cdict>\n",[29,699,700],{"class":31,"line":321},[29,701,702],{},"    \u003Ckey>Label\u003C\u002Fkey>\n",[29,704,705],{"class":31,"line":327},[29,706,707],{},"    \u003Cstring>com.user.appstoreagent-guardian\u003C\u002Fstring>\n",[29,709,710],{"class":31,"line":333},[29,711,712],{},"    \u003Ckey>ProgramArguments\u003C\u002Fkey>\n",[29,714,715],{"class":31,"line":340},[29,716,717],{},"    \u003Carray>\n",[29,719,720],{"class":31,"line":346},[29,721,722],{},"        \u003Cstring>\u002Fusr\u002Fbin\u002Fpython3\u003C\u002Fstring>\n",[29,724,725],{"class":31,"line":352},[29,726,727],{},"        \u003Cstring>-u\u003C\u002Fstring>\n",[29,729,730],{"class":31,"line":358},[29,731,732],{},"        \u003Cstring>\u002Fpath\u002Fto\u002Fguardian.py\u003C\u002Fstring>\n",[29,734,735],{"class":31,"line":364},[29,736,737],{},"    \u003C\u002Farray>\n",[29,739,740],{"class":31,"line":370},[29,741,742],{},"    \u003Ckey>RunAtLoad\u003C\u002Fkey>\n",[29,744,745],{"class":31,"line":376},[29,746,747],{},"    \u003Ctrue\u002F>\n",[29,749,750],{"class":31,"line":382},[29,751,752],{},"    \u003Ckey>KeepAlive\u003C\u002Fkey>\n",[29,754,755],{"class":31,"line":387},[29,756,747],{},[29,758,759],{"class":31,"line":393},[29,760,761],{},"    \u003Ckey>StandardOutPath\u003C\u002Fkey>\n",[29,763,764],{"class":31,"line":399},[29,765,766],{},"    \u003Cstring>\u002Fpath\u002Fto\u002Fguardian.log\u003C\u002Fstring>\n",[29,768,769],{"class":31,"line":405},[29,770,771],{},"    \u003Ckey>StandardErrorPath\u003C\u002Fkey>\n",[29,773,774],{"class":31,"line":410},[29,775,776],{},"    \u003Cstring>\u002Fpath\u002Fto\u002Fguardian.err\u003C\u002Fstring>\n",[29,778,779],{"class":31,"line":416},[29,780,781],{},"\u003C\u002Fdict>\n",[29,783,784],{"class":31,"line":422},[29,785,786],{},"\u003C\u002Fplist>\n",[788,789,790],"blockquote",{},[15,791,792,793,796,797,800,801,804],{},"[!WARNING] Replace ",[26,794,795],{},"\u002Fpath\u002Fto\u002Fguardian.py"," and the other example paths with absolute paths on your Mac. The ",[26,798,799],{},"-u"," option is strongly recommended so Python writes unbuffered output to ",[26,802,803],{},"guardian.log"," immediately.",[162,806,808],{"id":807},"_52-load-and-activate-the-service","5.2 Load and Activate the Service",[222,810,811,817,823,833],{},[170,812,813,814],{},"Make the guardian script executable: ",[26,815,816],{},"chmod +x \u002Fpath\u002Fto\u002Fguardian.py",[170,818,819,820],{},"Copy the configuration file into the user’s LaunchAgents directory: ",[26,821,822],{},"cp com.user.appstoreagent-guardian.plist ~\u002FLibrary\u002FLaunchAgents\u002F",[170,824,825,826,829,830],{},"Load and bootstrap the guardian with ",[26,827,828],{},"launchctl",": ",[26,831,832],{},"launchctl bootstrap gui\u002F$(id -u) ~\u002FLibrary\u002FLaunchAgents\u002Fcom.user.appstoreagent-guardian.plist",[170,834,835,836],{},"Verify the service status: ",[26,837,838],{},"launchctl print gui\u002F$(id -u)\u002Fcom.user.appstoreagent-guardian",[15,840,841,842,845,846,848,849,851,852,855,856,859],{},"If the output shows ",[26,843,844],{},"state = running"," and the expected PID, deployment succeeded. While the App Store is closed, ",[26,847,81],{}," should appear as ",[26,850,268],{}," (stopped) in ",[26,853,854],{},"ps aux",", with CPU usage holding at ",[173,857,858],{},"0.0%",". Opening the App Store immediately wakes the process so it can provide normal service.",[162,861,863],{"id":862},"_53-remove-the-service","5.3 Remove the Service",[15,865,866],{},"After Apple ships a later beta that fixes the schema-migration bug, remove this temporary guardian with the following commands:",[19,868,870],{"className":21,"code":869,"language":23,"meta":24,"style":24},"# Stop the background service\nlaunchctl bootout gui\u002F$(id -u)\u002Fcom.user.appstoreagent-guardian\n\n# Remove the configuration file\nrm ~\u002FLibrary\u002FLaunchAgents\u002Fcom.user.appstoreagent-guardian.plist\n",[26,871,872,878,903,907,912],{"__ignoreMap":24},[29,873,874],{"class":31,"line":32},[29,875,877],{"class":876},"sJ8bj","# Stop the background service\n",[29,879,880,882,885,888,891,894,897,900],{"class":31,"line":56},[29,881,828],{"class":35},[29,883,884],{"class":39}," bootout",[29,886,887],{"class":39}," gui\u002F",[29,889,890],{"class":62},"$(",[29,892,893],{"class":35},"id",[29,895,896],{"class":110}," -u",[29,898,899],{"class":62},")",[29,901,902],{"class":39},"\u002Fcom.user.appstoreagent-guardian\n",[29,904,905],{"class":31,"line":309},[29,906,337],{"emptyLinePlaceholder":336},[29,908,909],{"class":31,"line":315},[29,910,911],{"class":876},"# Remove the configuration file\n",[29,913,914,917],{"class":31,"line":321},[29,915,916],{"class":35},"rm",[29,918,919],{"class":39}," ~\u002FLibrary\u002FLaunchAgents\u002Fcom.user.appstoreagent-guardian.plist\n",[921,922,923],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":24,"searchDepth":56,"depth":56,"links":925},[926,927,930,931,932],{"id":12,"depth":56,"text":13},{"id":88,"depth":56,"text":89,"children":928},[929],{"id":164,"depth":309,"text":165},{"id":202,"depth":56,"text":203},{"id":245,"depth":56,"text":246},{"id":655,"depth":56,"text":656,"children":933},[934,935,936],{"id":662,"depth":309,"text":663},{"id":807,"depth":309,"text":808},{"id":862,"depth":309,"text":863},"coder","1. Symptoms After upgrading to macOS Golden Gate 27.0 D ...","md","\u002Fimages\u002Fposts\u002F2026\u002F07\u002Fblog_cover.jpg",{},"\u002Fen\u002Fblog\u002Fmacos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop",{"title":5,"description":938},"macos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop","publish","en\u002Fblog\u002Fmacos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop",[948,949],"beta","macos","DIivJOAb1d5xXxe31ODvYcEv6S0xmc05fod1X_iDiZw",[952,958],{"title":953,"path":954,"stem":955,"slug":956,"date":957,"children":-1},"Six Cities: Which One Captures the Essence Best?","\u002Fen\u002Fblog\u002Fsix-cities-which-one-is-most-vivid","en\u002Fblog\u002Fsix-cities-which-one-is-most-vivid","six-cities-which-one-is-most-vivid","2026-08-23",{"title":959,"path":960,"stem":961,"slug":962,"date":963,"children":-1},"Chengdu in 3D Miniature","\u002Fen\u002Fblog\u002Fchengdu-in-3d-miniature","en\u002Fblog\u002Fchengdu-in-3d-miniature","chengdu-in-3d-miniature","2025-12-14",1791430076999]