Skip to content

memory leak for open the url https://bigmodel.cn/glm-coding #44940

Closed

Description

@jsuzsj

windowns 11
servo-x86_64-windows-msvc.zip download 2026-05-14

when open https://bigmodel.cn/glm-coding

then The memory usage increases until system broken

Activity

  1. added
    I-perf-bloat
    I-perf-slow
    on May 15, 2026
  2. jdm commented on May 15, 2026

    @jdm
    Member

    It also is completely unresponsive, with a profiler showing that 43% of all time is spent under MediaList::parse 😕

  3. added
    C-needs-investigation
    on May 15, 2026
  4. jdm commented on May 15, 2026

    @jdm
    Member

    And it spends 13% of time just logging CSS errors 😓

        0:2 Invalid media rule: (, MediaQueryExpectedFeatureName("min-device-width")
    

    from RUST_LOG=script::dom::window=info

  5. jdm commented on May 15, 2026

    @jdm
    Member

    Hilariously, the ballooning memory usage goes away if I comment out

    let _ = self.script_chan.send(ScriptThreadMessage::ReportCSSError(
    self.pipelineid,
    url.0.to_string(),
    location.line,
    location.column,
    error.to_string(),
    ));
    . We appear to be stuck in an infinite loop in JS that's just calling matchMedia with an unsupported media feature, so the script thread never gets a chance to drain the queue of tasks that are reporting CSS errors.

  6. added
    A-content/script
    on May 15, 2026
  7. jsuzsj commented on May 15, 2026

    @jsuzsj
    Author

    Hilariously, the ballooning memory usage goes away if I comment out

    servo/components/script/dom/window.rs

    Lines 3950 to 3956 in f735c23

    let _ = self.script_chan.send(ScriptThreadMessage::ReportCSSError(
    self.pipelineid,
    url.0.to_string(),
    location.line,
    location.column,
    error.to_string(),
    ));
    . We appear to be stuck in an infinite loop in JS that's just calling matchMedia with an unsupported media feature, so the script thread never gets a chance to drain the queue of tasks that are reporting CSS errors.

    When I first opened this website, I didn’t notice that the memory usage was continuously increasing until I couldn’t even open the Task Manager. After restarting my computer, I realized that the resource consumption was too fast. Since I needed to use a proxy, I tested it down from version 0.1 until version 0.0.5 of serve, and the issue still persisted. I haven’t yet verified whether this problem exists on other platforms.

  8. jdm commented on May 15, 2026

    @jdm
    Member

    The following changes implement the device-width and device-height CSS media features, allowing the website to load as expected without any memory consumption issues:

    The branch needs cleanup before it's mergeable:

    • missing documentation
    • consistent screen/device naming
    • propagating changes to device geometry (eg. dragging the window to a different monitor)
  9. added
    C-has-patch
    and removed
    C-needs-investigation
    on May 15, 2026
  10. added a commit that references this issue on Jun 27, 2026
    2173b55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/scriptA-styloC-has-patchI-perf-bloatI-perf-slow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions