pane icon indicating copy to clipboard operation
pane copied to clipboard

[0.2.1] examples/window.ts - Segmentation fault on Ubuntu 21.04

Open danaugrs opened this issue 3 years ago • 5 comments

$ deno run -Ar --unstable https://deno.land/x/[email protected]/examples/window.ts

fails with

Segmentation fault (core dumped)

PS: Pane is exactly what I was looking for! :tada: Looking forward to getting it working/playing with it :smile:

danaugrs avatar May 19 '21 23:05 danaugrs

Interesting, would you mind running it with RUST_BACKTRACE=1 and posting the log if there is any.

eliassjogreen avatar May 20 '21 08:05 eliassjogreen

Nothing additional is printed - apparently that's expected (see here, quoted below):

RUST_BACKTRACE only prints out a backtrace for Rust-generated panics. A segfault is a lower-level failure than a panic. You will need to use a debugger (GDB, LLDB, WinDbg, etc.) to investigate the failure.

I went a bit deeper and here's what I found. I ran Winit's basic example and it started the event loop but showed no window and a few moments later it froze/crashed Ubuntu :cry: and I had to restart. So I figured this has something to do with Ubuntu 21.04 having switched from Xorg to Wayland. I started Ubuntu in Xorg mode and then the Winit example worked, except for the window not showing up when it's maximized and some other glitches.

I ran pane on Xorg and it now successfully created the window, but it segfaults after a few seconds or earlier if I move the window.

danaugrs avatar May 20 '21 17:05 danaugrs

Same here, deno run -Ar --unstable https://deno.land/x/[email protected]/examples/window.ts crashing after a few seconds (sometimes enough time to move the window around for a bit).

Running on Ubuntu 20.04, deno installed from source with cargo install deno --locked .

FWIW I've tried to look at the core dump with gdb, but I have no idea what to do there, and it seems it's looking for the v8 source in some location on my file system to show me where the crash happened, but I don't have that (and the path traversal would go two levels up from my root).

GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from deno...
[New LWP 288042]
[New LWP 288043]
[New LWP 288044]
[New LWP 288045]
[New LWP 288046]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `deno run -Ar --unstable https://deno.land/x/[email protected]/examples/window.ts'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fccde06a209 in v8::internal::tracing::TraceEventHelper::GetTracingController() () at ../../../../v8/src/tracing/trace-event.cc:20
20	../../../../v8/src/tracing/trace-event.cc: Datei oder Verzeichnis nicht gefunden.
[Current thread is 1 (Thread 0x7fcce0779b40 (LWP 288042))]
(gdb) quit

trollkotze avatar Jun 12 '21 11:06 trollkotze

Sadly it looks like plugins are getting removed due to them segfaulting and the implementation being flaky: #10908.

eliassjogreen avatar Jun 12 '21 12:06 eliassjogreen

What a shame 😢

danaugrs avatar Jun 12 '21 14:06 danaugrs