Skip to content

SIGABRT at startup on Ubuntu 26 #121

Description

@nosemeocurrenada

When trying to view a pdf, the process gets killed with SIGABRT, and the Kitty terminal is left in an unusable state

Steps

  1. Clone the v.0.4.1 tag
git clone --depth=1 --branch 'v0.4.1' https://github.com/freref/fancy-cat.git
  1. Build
git submodule update --init --recursive && zig build
  1. Got a small pdf
pdflatex <<EOF
\documentclass{article}
\begin{document}
\paragraph{Hello.}
  fancy-kitty
\end{document}
EOF
  1. Ran fancy-cat with the pdf
fancy-cat/zig-out/bin/fancy-cat texput.pdf

After a while, it writes stuff on the terminal, aborts, and leaves the terminal unusable. See the screencast:
https://imgur.com/a/VZQMpRG

edit: after the process got killed I pressed the keys abcdshift-ctrl-altR

Versions

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 26.04 LTS
Release:	26.04
Codename:	resolute
$ zig version
0.14.1
$ clang --version
Ubuntu clang version 21.1.8 (6ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-21/bin

Additional context

The latest version of zig available on the Ubuntu repositories is 0.14.1 and snap provides the version 0.16.0, on master the minimum zig version is 0.15.2, the latest tag that supports 0.14 is v0.4.1

When installing with --release=small the behavior the same except that the signal is SIGILL

Dumps

fancy-cat

key_value: json.dynamic.Value{ .string = { 99, 111, 108, 111, 110 } }, key: colon, codepoint: 58
key_value: json.dynamic.Value{ .string = { 101, 115, 99, 97, 112, 101 } }, key: escape, codepoint: 27
key_value: json.dynamic.Value{ .string = { 101, 110, 116, 101, 114 } }, key: enter, codepoint: 13
info(vaxis): pixel mouse capability detected
info(vaxis): color_scheme_updates capability detected
info(vaxis): explicit width capability detected
info(vaxis): kitty keyboard capability detected
info(vaxis): kitty graphics capability detected
debug(vaxis): enabling mouse mode: pixel coordinates
debug(vaxis): resizing screen: width=144 height=39
debug(vaxis): resizing screen: width=144 height=39
Illegal instruction at address 0x17c39a5
/home/cristian/.cache/zig/p/fastb64z-1.0.0-AAAAAPufAAC1oOmqjUybDgnEHsOlgJKIjnUWwFy3i3TJ/src/shuffle.zig:13:5: 0x17c39a5 in encodeBytesVectorized (fancy-cat)
    return asm ("vpshufb %[mask], %[src], %[dst]"
    ^
/home/cristian/.cache/zig/p/fastb64z-1.0.0-AAAAAPufAAC1oOmqjUybDgnEHsOlgJKIjnUWwFy3i3TJ/src/fastb64.zig:112:47: 0x179cb67 in encode (fancy-cat)
                vector64.encodeBytesVectorized(source, dest, encoder.shift_lookup, idx, out_idx);
                                              ^
/home/cristian/Repos/fancy-cat/src/handlers/PdfHandler.zig:211:45: 0x179c25b in renderPage (fancy-cat)
        const encoded = base64Encoder.encode(b64_buf, samples[0..sample_count]);
                                            ^
/home/cristian/Repos/fancy-cat/src/handlers/DocumentHandler.zig:68:43: 0x179f0d9 in renderPage (fancy-cat)
    return try self.pdf_handler.renderPage(page_number, window_width, window_height);
                                          ^
/home/cristian/Repos/fancy-cat/src/Context.zig:227:67: 0x17a0315 in getPage (fancy-cat)
        const encoded_image = try self.document_handler.renderPage(
                                                                  ^
/home/cristian/Repos/fancy-cat/src/Context.zig:264:49: 0x17a1a95 in drawCurrentPage (fancy-cat)
            self.current_page = try self.getPage(
                                                ^
/home/cristian/Repos/fancy-cat/src/Context.zig:331:33: 0x17a569c in draw (fancy-cat)
        try self.drawCurrentPage(win);
                                ^
/home/cristian/Repos/fancy-cat/src/Context.zig:145:26: 0x17b308f in run (fancy-cat)
            try self.draw();
                         ^
/home/cristian/Repos/fancy-cat/src/main.zig:60:16: 0x17b413a in main (fancy-cat)
    try app.run();
               ^
/usr/lib/zig0.14/lib/std/start.zig:660:37: 0x17b4d07 in main (fancy-cat)
            const result = root.main() catch |err| {
                                    ^
../sysdeps/nptl/libc_start_call_main.h:59:16: 0x7cbfdb02a600 in __libc_start_call_main (../sysdeps/x86/libc-start.c)
../csu/libc-start.c:360:3: 0x7cbfdb02a717 in __libc_start_main_impl (../sysdeps/x86/libc-start.c)
???:?:?: 0x12fe564 in ??? (???)
???:?:?: 0x0 in ??? (???)

GDB backtrace

[New LWP 6472]
[New LWP 6475]
[New LWP 6473]

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./fancy-cat /home/cristian/fancy-cat-test/texput.pdf'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
[Current thread is 1 (Thread 0x7cbfdb239780 (LWP 6472))]
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
#3  0x00007cbfdb045b7e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007cbfdb0288ec in __GI_abort () at ./stdlib/abort.c:77
#5  0x00000000016e6c31 in posix.abort () at /usr/lib/zig0.14/lib/std/posix.zig:710
#6  0x00000000017c9adc in debug.handleSegfaultPosix (sig=4, info=0x7ffcfa112330, ctx_ptr=0x7ffcfa112200) at /usr/lib/zig0.14/lib/std/debug.zig:1456
#7  <signal handler called>
#8  shuffle.shuffle () at /home/cristian/.cache/zig/p/fastb64z-1.0.0-AAAAAPufAAC1oOmqjUybDgnEHsOlgJKIjnUWwFy3i3TJ/src/shuffle.zig:13
#9  shuffle.lookup_ByteVector () at /home/cristian/.cache/zig/p/fastb64z-1.0.0-AAAAAPufAAC1oOmqjUybDgnEHsOlgJKIjnUWwFy3i3TJ/src/shuffle.zig:31
#10 vector64.encodeBytesVectorized (src=..., dst=..., shift_lookup=..., sp=0, dp=0) at /home/cristian/.cache/zig/p/fastb64z-1.0.0-AAAAAPufAAC1oOmqjUybDgnEHsOlgJKIjnUWwFy3i3TJ/src/vector64.zig:97
#11 0x000000000179cb68 in fastb64.Base64Encoder.encode (encoder=0x1219cb0 <__anon_30033>, dest=..., source=...) at /home/cristian/.cache/zig/p/fastb64z-1.0.0-AAAAAPufAAC1oOmqjUybDgnEHsOlgJKIjnUWwFy3i3TJ/src/fastb64.zig:112
#12 0x000000000179c25c in handlers.PdfHandler.renderPage (self=0x7ffcfa11c228, page_number=0, window_width=1296, window_height=666) at /home/cristian/Repos/fancy-cat/src/handlers/PdfHandler.zig:211
#13 0x000000000179f0da in handlers.DocumentHandler.renderPage (self=0x7ffcfa11c228, page_number=0, window_width=1296, window_height=666) at /home/cristian/Repos/fancy-cat/src/handlers/DocumentHandler.zig:68
#14 0x00000000017a0316 in Context.Context.getPage (self=0x7ffcfa11c120, page_number=0, window_width=1296, window_height=666) at Context.zig:227
#15 0x00000000017a1a96 in Context.Context.drawCurrentPage (self=0x7ffcfa11c120, win=...) at Context.zig:264
#16 0x00000000017a569d in Context.Context.draw (self=0x7ffcfa11c120) at Context.zig:331
#17 0x00000000017b3090 in Context.Context.run (self=0x7ffcfa11c120) at Context.zig:145
#18 0x00000000017b413b in main.main () at main.zig:60
#19 0x00000000017b4d08 in start.callMain () at /usr/lib/zig0.14/lib/std/start.zig:660
#20 start.callMainWithArgs () at /usr/lib/zig0.14/lib/std/start.zig:620
#21 start.main (c_argc=2, c_argv=0x7ffcfa11caf8, c_envp=0x7ffcfa11cb10) at /usr/lib/zig0.14/lib/std/start.zig:635

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions