Sublime Forum

[Ubuntu][build 4180] Crash in libpango

#1

For some time now (around a month maybe), my setup on build 4180 is crashing. The crash also happens with

    subl --safe-mode

There is a bit of difference between how the crash happens in safe v/s usual mode.

Here’s a stack of the thread raising SIGSEGV from gdb:

$ gdb --args /opt/sublime_text/sublime_text --safe-mode
...
...
   Thread 3.1` "sublime_text" received signal SIGSEGV, Segmentation fault.
    0x00007ffff5a086f4 in pango_coverage_get () from /lib/x86_64-linux-gnu/libpango-1.0.so.0
    t 3.1
    [Switching to thread 3.1 (Thread 0x7ffff7a1afc0 (LWP 1218133))]
    #0  0x00007ffff5a086f4 in pango_coverage_get () from /lib/x86_64-linux-gnu/libpango-1.0.so.0
    (gdb) bt
    #0  0x00007ffff5a086f4 in pango_coverage_get () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #1  0x00007ffff5a026ef in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #2  0x00007ffff59fe87a in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #3  0x00007ffff55d6509 in ??? () at /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
    #4  0x00007ffff5a02b73 in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #5  0x00007ffff5a03e3d in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #6  0x00007ffff5a17fae in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #7  0x00007ffff5a0d08e in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #8  0x00007ffff55e9a89 in ??? () at /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
    #9  0x00007ffff5a16a75 in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #10 0x00007ffff5a175c8 in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #11 0x00007ffff5a0cb86 in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #12 0x00007ffff5a0cf82 in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #13 0x00007ffff5a0d24f in pango_layout_get_size () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #14 0x00007ffff5a19dad in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #15 0x00007ffff5a1a9a8 in ??? () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #16 0x00007ffff5a1aa6c in pango_layout_get_iter () at /lib/x86_64-linux-gnu/libpango-1.0.so.0
    #17 0x0000555555af444f in ??? ()
    #18 0x0000555555c1b7df in ??? ()
    #19 0x0000555555a8c1c2 in ??? ()
    #20 0x0000555555a9dd75 in ??? ()
    #21 0x0000555555a9d752 in ??? ()
    #22 0x0000555555a9da57 in ??? ()
    #23 0x0000555555a9fae8 in ??? ()
    #24 0x0000555555a9fd48 in ??? ()
    #25 0x0000555555a9fd48 in ??? ()
    #26 0x0000555555a9fd48 in ??? ()
    #27 0x0000555555a89c6d in ??? ()
    #28 0x0000555555a899d8 in ??? ()
    #29 0x0000555555ab494e in ??? ()
    #30 0x0000555555ab15b6 in ??? ()
    #31 0x0000555555ad72ad in ??? ()
    #32 0x0000555555cb012d in ??? ()
    #33 0x0000555555cdf92f in ??? ()
    #34 0x0000555555cdf539 in ??? ()
    #35 0x0000555555cd328b in ??? ()
    #36 0x0000555555cd5f86 in ??? ()
    #37 0x00005555559618cd in ??? ()
    #38 0x0000555555971495 in ??? ()
    #39 0x0000555555a0e52f in ??? ()
    #40 0x0000555555cca1d0 in ??? ()
    #41 0x0000555555a75ac5 in ??? ()
    #42 0x0000555555ae11a0 in ??? ()
    #43 0x0000555555af59c3 in ??? ()
    #44 0x0000555555af5a2c in ??? ()
    #45 0x00007ffff7e4a522 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #46 0x00007ffff7e4948e in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #47 0x00007ffff7ea8717 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #48 0x00007ffff7e49f77 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #49 0x00007ffff4bfeb45 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0
    #50 0x0000555555afd3f5 in ??? ()
    #51 0x0000555555934523 in ??? ()
    #52 0x00007ffff782a1ca in __libc_start_call_main (main=main@entry=0x555555930e40, argc=argc@entry=3, argv=argv@entry=0x7fffffffd098) at ../sysdeps/nptl/libc_start_call_main.h:58
    #53 0x00007ffff782a28b in __libc_start_main_impl (main=0x555555930e40, argc=3, argv=0x7fffffffd098, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd088) at ../csu/libc-start.c:360
    #54 0x00005555558b28c9 in ??? ()

I’m not sure if I can provide any more details that can help in investigating the issue.

0 Likes

#2

Have you changed the system fonts? If so what fonts are you using?

0 Likes

#3

Would you please help me with some way/command to list the font/list you’re looking for. My fc-list output is around 3800 lines and I can’t find a way to upload a text file here. Should I just paste it?

Here’s the screenshot from my settings page in case it helps -

0 Likes

#4

Thanks, I’ve tried that font locally (ubuntu 24.04) but was unable to reproduce any crash. Does the crash only happen when you open specific files or folders or immediately?

0 Likes

#5

The crash happens when I hover over a symbol e.g. if the tab only contains plain text, then I can keep on working. But if open up a folder of my project which is largely C++ files and hover over a symbol (variable, function name) then it crashes. I don’t know if language/folder/tooltip is causing the issue.

At one time I tried attaching libpango source too and it seemed like the font/locale combination might be the issue - but I didn’t post it just yet as I wasn’t sure if I was chasing a red herring. My system is setup in India - maybe that’s a missing link:

$ env | grep -i LANG
LANGUAGE=en_IN:en
LANG=en_US.utf8
0 Likes

#6

Would you be willing to run a custom build with debug symbols? If so can I send it to the email address you use for this forum?

1 Like

#7

Sure, please!

0 Likes

#8

@bschaaf, I’ve replied to your email with backtrace and other information collected from the build with debug symbols.

1 Like

#9

Thanks @bschaaf for the support over emails. Quoting him below:

The crash happens when ST tries to measure/shape this 3-byte glyph: ◨. We do so using a pango layout.

On your system this glyph falls back to the “Symbola” font. I wasn’t able to reproduce the issue using the same font (and environment variables) on my end.

In order to measure this glyph pango attempts to measure every letter in the alphabet as part of _pango_cairo_font_get_metrics, using the phrase “The quick brown fox jumps over the lazy dog.”.

So I would guess that any usage of the Symbola font on your system would end in a crash, since simply getting font metrics for that font causes the crash.

Consequently, I first disabled and them removed fonts-symbola (and other related packages). This has resolved the issue for me.

2 Likes

#10

Opened https://gitlab.gnome.org/GNOME/pango/-/issues/825 for libpango.

2 Likes