Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault while deleting things #749

Closed
bsilver8192 opened this issue Oct 3, 2023 · 1 comment
Closed

Segfault while deleting things #749

bsilver8192 opened this issue Oct 3, 2023 · 1 comment

Comments

@bsilver8192
Copy link

This may share a root cause with #748. It's the same project but a very different action and the stacktrace looks different to me, but if this is memory corruption then who knows.

I opened my project (feel free to look to debug this, but I'd like to avoid the name being indexed by search engines), selected the region shown in this screenshot with the shown selection filter, hit delete, and then it segfaulted. I can reproduce this every time I select roughly the same region with the same selection filter. I'm using 2.5.0-1 from https://mirror.selfnet.de/horizon-eda/debian-bullseye bullseye/main amd64.

Here's the stacktrace, along with a patch_key that looks fishy to me:

0x00007f616cd1b96f in __GI___poll (fds=0x56337a4de0f0, nfds=5, timeout=8427) at ../sysdeps/unix/sysv/linux/poll.c:29
29	../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb) set pagination off
(gdb) cont
Continuing.
[Thread 0x7f61560f9700 (LWP 180431) exited]
[New Thread 0x7f61560f9700 (LWP 180543)]

Thread 7 "horizon-imp" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f61560f9700 (LWP 180543)]
0x00005633765d0e43 in horizon::CanvasPatch::img_polygon (this=0x7f61560f7e70, ipoly=..., tr=<optimized out>, layer=...) at src/canvas/canvas_patch.cpp:98
98	src/canvas/canvas_patch.cpp: No such file or directory.
(gdb) bt
#0  0x00005633765d0e43 in horizon::CanvasPatch::img_polygon(horizon::Polygon const&, bool, horizon::LayerRange const&) (this=0x7f61560f7e70, ipoly=..., tr=<optimized out>, layer=...) at src/canvas/canvas_patch.cpp:98
#1  0x00005633765cbd00 in horizon::CanvasPatch::img_polygon(horizon::Polygon const&, bool) (this=this@entry=0x7f61560f7e70, ipoly=..., tr=tr@entry=true) at src/canvas/canvas_patch.cpp:89
#2  0x0000563376365b61 in horizon::Canvas::render(horizon::Shape const&, bool) (this=0x7f61560f7e70, shape=..., interactive=<optimized out>) at src/canvas/render.cpp:1069
#3  0x0000563376366c1f in horizon::Canvas::render(horizon::Padstack const&, bool) (this=this@entry=0x7f61560f7e70, padstack=..., interactive=interactive@entry=false) at src/canvas/render.cpp:1262
#4  0x0000563376366f43 in horizon::Canvas::render(horizon::Via const&, bool) (this=0x7f61560f7e70, via=..., interactive=true) at src/canvas/render.cpp:1508
#5  0x000056337636e15f in horizon::Canvas::render(horizon::Board const&, bool, horizon::Canvas::PanelMode, horizon::Canvas::OutlineMode) (this=0x7f61560f7e70, brd=<optimized out>, interactive=true, mode=horizon::Canvas::PanelMode::SKIP, outline_mode=horizon::Canvas::OutlineMode::INCLUDE) at src/canvas/render.cpp:1702
#6  0x0000563376351316 in horizon::Canvas::update(horizon::Board const&, horizon::Canvas::PanelMode) (this=0x7f61560f7e70, brd=..., mode=horizon::Canvas::PanelMode::SKIP) at src/canvas/canvas.cpp:239
#7  0x000056337672b87c in horizon::Board::update_plane(horizon::Plane*, horizon::CanvasPatch const*, horizon::CanvasPads const*, std::function<void (horizon::Plane const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>, std::atomic<bool> const&) (this=0x56337875cf28, plane=0x563378fcc6a0, ca_ext=ca_ext@entry=0x0, ca_pads_ext=ca_pads_ext@entry=0x0, status_cb=..., cancel=...) at src/board/plane_update.cpp:106
#8  0x0000563376535ba7 in horizon::PlaneUpdateDialog::plane_update_thread(horizon::Board&, horizon::Plane*) (this=0x7ffc23ec7310, brd=<optimized out>, plane=<optimized out>) at src/dialogs/plane_update.cpp:130
#9  0x00007f6171214ed0 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007f617131aea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007f616cd27a2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) p patch_key
$1 = {type = horizon::PatchType::VIA, layer = {m_start = -3, m_end = -3}, net = {static size = 16, uu = "\000\000\000\000\020r\017Va\177\000\000\220r\017V"}}
@bsilver8192
Copy link
Author

Looks like this was NVIDIA driver problems, sorry for the noise.

After doing some further debugging, my X11 session crashed... Pretty sure it's buggy NVIDIA GPU drivers corrupting userspace memory. I thought I had gotten those into a working state recently, but it was annoying enough I had an AMD GPU ready to install. After swapping to the AMD GPU, I can no longer reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant