| Summary: | WPE / cog potential memory leak | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marek Vasut <marex+webkit> |
| Component: | WPE WebKit | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro, philn |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Other | ||
| OS: | Linux | ||
|
Description
Marek Vasut
2023-11-15 16:31:04 PST
Furthermore, mesa 23.2.1 (etnaviv driver, so gles2), Linux 6.1.62 (mainline + a couple of DT patches). > Currently I am looking for a way to narrow the leak down, is there some tool for that purpose that would be part of Webkit ?
I'm not aware of specific tooling for this. Would be nice to have though!
I understand people generally try to debug such issues using sysprof, or maybe massif. (That said, I don't think I've ever successfully debugged an issue like this ever, so....) This turned out to be a memory leak in Cairo 1.16.y , fixed in 1.18.y , see https://gitlab.freedesktop.org/cairo/cairo/-/issues/805 and similar fixes in the Cairo git tree. Thanks for all the input. Massif helped narrow it down in the end. Resolved . For future reference: $ valgrind --tool=massif --depth=8 --trace-children=yes cog http://link ... $ ms_print massif.out.20 -------------------------------------------------------------------------------- Command: /usr/libexec/wpe-webkit-1.1/WPEWebProcess 10 24 Massif arguments: --depth=8 ms_print arguments: massif.out.20 -------------------------------------------------------------------------------- MB 121.2^ # | @@@# | :@@@@@# | @@@:::@@@@@# | :::@@ :::@@@@@# | @:@@:: @@ :::@@@@@# | :@@:@:@ :: @@ :::@@@@@# | @@@@::@ :@:@ :: @@ :::@@@@@# | :::@@ @::@ :@:@ :: @@ :::@@@@@# | :::::::@@ @::@ :@:@ :: @@ :::@@@@@# | ::::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | @::::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | :::@: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | @:::::: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | @::@::: :: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | @@@:@: @::: :: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | @@::@@ :@: @::: :: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | :::::@ : @@ :@: @::: :: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | :::: :::@ : @@ :@: @::: :: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# | : :: :::@ : @@ :@: @::: :: @: ::: ::: : :::@@ @::@ :@:@ :: @@ :::@@@@@# 0 +----------------------------------------------------------------------->Ti 0 1.022 ... 74.04% (21,015,725B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->31.00% (8,799,962B) 0x9F5CDFD: strdup (strdup.c:42) | ->20.62% (5,851,900B) 0xA0CA5C3: _cairo_font_options_init_copy (cairo-font-options.c:90) | | ->10.31% (2,925,825B) 0xA105792: _cairo_scaled_font_init_key (cairo-scaled-font.c:665) | | | ->10.31% (2,925,825B) 0xA105792: cairo_scaled_font_create (cairo-scaled-font.c:1064) ... |