Skip to content

[Bug] (display-time-mode) results in a WebKit process leak #780

@ben--

Description

@ben--

Thank you for the bug report

  • I am using the latest version of doom-modeline related packages.
  • I checked FAQ.
  • You may also try reproduce the issue using clean environment and minimal configurations with
    the command emacs -Q.

Bug description

With a stock Doom configuration on macos, adding (display-time-mode) to my configuration causes emacs to spawn and leak WebKit processes about 1-2 times a minute. This causes hundreds of WebContext processes to be leaked, eventually causing "Severe Hangs" (MacOS Instruments.app terminology) in at least Emacs and Safari.

$ sudo log stream   --predicate 'subsystem == "com.apple.xpc" AND eventMessage CONTAINS "WebKit.WebContent"'   --info
2025-06-02 22:33:00.079625-0400 0x24b442   Default     0x0                  25888  0    Emacs: (libxpc.dylib) [com.apple.xpc:connection] [0x600001b7ca50] activating connection: mach=false listener=false peer=false name=com.apple.WebKit.WebContent
2025-06-02 22:34:00.015427-0400 0x24b442   Default     0x0                  25888  0    Emacs: (libxpc.dylib) [com.apple.xpc:connection] [0x600001b74d20] activating connection: mach=false listener=false peer=false name=com.apple.WebKit.WebContent
2025-06-02 22:34:00.076770-0400 0x24b442   Default     0x0                  25888  0    Emacs: (libxpc.dylib) [com.apple.xpc:connection] [0x600001b694a0] activating connection: mach=false listener=false peer=false name=com.apple.WebKit.WebContent
2025-06-02 22:35:00.016941-0400 0x24b442   Default     0x0                  25888  0    Emacs: (libxpc.dylib) [com.apple.xpc:connection] [0x600001b74e10] activating connection: mach=false listener=false peer=false name=com.apple.WebKit.WebContent
2025-06-02 22:35:00.082286-0400 0x24b442   Default     0x0                  25888  0    Emacs: (libxpc.dylib) [com.apple.xpc:connection] [0x600001b7cff0] activating connection: mach=false listener=false peer=false name=com.apple.WebKit.WebContent

Steps to reproduce

Given:

brew tap railwaycat/emacsmacport
brew install emacs-mac --with-native-compilation --with-modules
  • current doom emacs
GNU Emacs     v29.1            nil
Doom core     v3.0.0-pre       HEAD -> master 313e8fb4 2025-06-02 17:34:15 +0200
Doom modules  v25.07.0-pre     HEAD -> master 313e8fb4 2025-06-02 17:34:15 +0200

Configure:

  • start with stock doom config
  • add the following line to config.el
(display-time-mode)

Expected behavior

  • emacs runs as normal, no process leak

OS

MacOS

Emacs Version

29 (gccemacs)

Emacs Configurations

Doom Emacs

Error callstack

Anything else

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions