[GH-ISSUE #167] Segfault during screen switch immediatly after copying something. #133

Open
opened 2026-05-05 05:21:07 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @interru on GitHub (Oct 31, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/167

Operating Systems

Server: Debian (testing) Linux 4.18.10-2

Client: Arch Linux 4.18.16

Barrier Version

2.1.2

Steps to reproduce bug

Going rampage with copy/paste and immediate screen switch. Seems to cause race conditions?!

Other info

Happens if I have stress at work which mostly means I am handling traces of huge xml files which often ends up in my clipboard. Currently I just start synergy/barrier in a while true loop but that is driving me nuts.

Dmesg Output

[17709.800639] barriers[29963]: segfault at 40 ip 00007fc91245f898 sp 00007ffd2bbe9f50 error 4 in libXi.so.6.1.0[7fc912458000+f000]
[17709.800652] Code: 20 48 8b 53 28 48 89 50 28 48 8b 53 30 48 89 50 30 48 8b 53 38 48 89 50 38 48 8b 53 40 48 89 50 40 e9 d2 fd ff ff 4c 8b 7d 30 <45> 8b 47 40 49 8b 77 48 45 85 c0 0f 84 15 08 00 00 41 8d 40 ff 31 

Backtrace

#0  XInputCopyCookie (dpy=<optimized out>, in=0x7fffffffd3d0, out=0x7fffffffd2e0) at ../../src/XExtInt.c:1490
#1  0x00007ffff77cf7e9 in _XCopyEventCookie () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#2  0x00007ffff77bf393 in XPeekEvent () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#3  0x000055555558d894 in XWindowsScreen::refreshKeyboard (this=this@entry=0x55555563ad10, event=event@entry=0x555555650478) at ./src/lib/platform/XWindowsScreen.cpp:2036
#4  0x000055555558e06b in XWindowsScreen::handleSystemEvent (this=0x55555563ad10, event=...) at ./src/lib/platform/XWindowsScreen.cpp:1392
#5  0x0000555555579d69 in EventQueue::dispatchEvent (this=0x7fffffffd980, event=...) at ./src/lib/base/EventQueue.cpp:284
#6  0x000055555557bf8c in EventQueue::loop() () at ./src/lib/base/EventQueue.cpp:130
#7  0x00005555555871fe in ServerApp::mainLoop() () at ./src/lib/barrier/ServerApp.cpp:760
#8  0x0000555555585537 in ServerApp::runInner(int, char**, ILogOutputter*, int (*)(int, char**)) () at ./src/lib/barrier/ServerApp.cpp:804
#9  0x0000555555583a99 in App::run(int, char**) () at ./src/./lib/barrier/App.h:89
#10 0x0000555555573c72 in main () at ./src/cmd/barriers/barriers.cpp:49
#11 0x00007ffff690bb17 in __libc_start_main (main=0x555555573bf0 <main>, argc=5, argv=0x7fffffffde18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde08)
    at ../csu/libc-start.c:310
#12 0x0000555555573f0a in _start () at /usr/include/c++/8/ext/new_allocator.h:86

Full Backtrace

Originally created by @interru on GitHub (Oct 31, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/167 ### Operating Systems ### Server: Debian (testing) Linux 4.18.10-2 Client: Arch Linux 4.18.16 ### Barrier Version ### 2.1.2 ### Steps to reproduce bug ### Going rampage with copy/paste and immediate screen switch. Seems to cause race conditions?! ### Other info ### Happens if I have stress at work which mostly means I am handling traces of huge xml files which often ends up in my clipboard. Currently I just start synergy/barrier in a while true loop but that is driving me nuts. ### Dmesg Output ### ``` [17709.800639] barriers[29963]: segfault at 40 ip 00007fc91245f898 sp 00007ffd2bbe9f50 error 4 in libXi.so.6.1.0[7fc912458000+f000] [17709.800652] Code: 20 48 8b 53 28 48 89 50 28 48 8b 53 30 48 89 50 30 48 8b 53 38 48 89 50 38 48 8b 53 40 48 89 50 40 e9 d2 fd ff ff 4c 8b 7d 30 <45> 8b 47 40 49 8b 77 48 45 85 c0 0f 84 15 08 00 00 41 8d 40 ff 31 ``` ### Backtrace ### ``` #0 XInputCopyCookie (dpy=<optimized out>, in=0x7fffffffd3d0, out=0x7fffffffd2e0) at ../../src/XExtInt.c:1490 #1 0x00007ffff77cf7e9 in _XCopyEventCookie () from /usr/lib/x86_64-linux-gnu/libX11.so.6 #2 0x00007ffff77bf393 in XPeekEvent () from /usr/lib/x86_64-linux-gnu/libX11.so.6 #3 0x000055555558d894 in XWindowsScreen::refreshKeyboard (this=this@entry=0x55555563ad10, event=event@entry=0x555555650478) at ./src/lib/platform/XWindowsScreen.cpp:2036 #4 0x000055555558e06b in XWindowsScreen::handleSystemEvent (this=0x55555563ad10, event=...) at ./src/lib/platform/XWindowsScreen.cpp:1392 #5 0x0000555555579d69 in EventQueue::dispatchEvent (this=0x7fffffffd980, event=...) at ./src/lib/base/EventQueue.cpp:284 #6 0x000055555557bf8c in EventQueue::loop() () at ./src/lib/base/EventQueue.cpp:130 #7 0x00005555555871fe in ServerApp::mainLoop() () at ./src/lib/barrier/ServerApp.cpp:760 #8 0x0000555555585537 in ServerApp::runInner(int, char**, ILogOutputter*, int (*)(int, char**)) () at ./src/lib/barrier/ServerApp.cpp:804 #9 0x0000555555583a99 in App::run(int, char**) () at ./src/./lib/barrier/App.h:89 #10 0x0000555555573c72 in main () at ./src/cmd/barriers/barriers.cpp:49 #11 0x00007ffff690bb17 in __libc_start_main (main=0x555555573bf0 <main>, argc=5, argv=0x7fffffffde18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde08) at ../csu/libc-start.c:310 #12 0x0000555555573f0a in _start () at /usr/include/c++/8/ext/new_allocator.h:86 ``` [Full Backtrace](https://gist.github.com/interru/69a3badd832c3bd9ed98dc06c4ab0de5)
gitea-mirror added the
bug
linux
labels 2026-05-05 05:21:07 -06:00
Author
Owner

@AdrianKoshka commented on GitHub (Oct 31, 2018):

I'm curious, how big are the XML files you're dealing with?

edit: also I don't think there's a tagged "2.2" release yet, so are you just building form master?

<!-- gh-comment-id:434800897 --> @AdrianKoshka commented on GitHub (Oct 31, 2018): I'm curious, how big are the XML files you're dealing with? edit: also I don't think there's a tagged "2.2" release yet, so are you just building form master?
Author
Owner

@interru commented on GitHub (Oct 31, 2018):

I don't think there's a tagged "2.2"

Ah my mistake :)
That's what the result of barriers --version was on my system.
Seems to be incorrect: https://github.com/debauchee/barrier/blob/v2.1.2/cmake/Version.cmake#L3
The version affected was the server. I used the Debian package which was version 2.1.2
But I think I could reproduce that over a much wider range of versions. Since this is bugging me a long time.

The XML files are mostly at around 2Mb estimated. I wouldn't mind if barrier would deny clipboard entries over a certain size. Most of the times it's just coincidence that I have something in the clipboard since every yank of my vim ends up there. Sometimes I have to deal with 10Gb log files but I wouldn't expect that to work with copy/paste over (wireless) network :D

<!-- gh-comment-id:434851837 --> @interru commented on GitHub (Oct 31, 2018): > I don't think there's a tagged "2.2" Ah my mistake :) That's what the result of `barriers --version` was on my system. Seems to be incorrect: https://github.com/debauchee/barrier/blob/v2.1.2/cmake/Version.cmake#L3 The version affected was the server. I used the Debian package which was version 2.1.2 But I think I could reproduce that over a much wider range of versions. Since this is bugging me a long time. The XML files are mostly at around 2Mb estimated. I wouldn't mind if barrier would deny clipboard entries over a certain size. Most of the times it's just coincidence that I have something in the clipboard since every yank of my vim ends up there. Sometimes I have to deal with 10Gb log files but I wouldn't expect that to work with copy/paste over (wireless) network :D
Author
Owner

@AdrianKoshka commented on GitHub (Oct 31, 2018):

I agree, I think we need:

  • The ability to toggle the clipboard on/off
  • To size limit what is shared between machines
<!-- gh-comment-id:434860469 --> @AdrianKoshka commented on GitHub (Oct 31, 2018): I agree, I think we need: - The ability to toggle the clipboard on/off - To size limit what is shared between machines
Author
Owner

@nlyan2025 commented on GitHub (Jan 10, 2019):

I agree, I think we need:

* The ability to toggle the clipboard on/off
* To size limit what is shared between machines

The Synergy master branch has both of these features, both exposed via the UI.

<!-- gh-comment-id:452929311 --> @nlyan2025 commented on GitHub (Jan 10, 2019): > I agree, I think we need: > > * The ability to toggle the clipboard on/off > * To size limit what is shared between machines The Synergy master branch has both of these features, both exposed via the UI.
Author
Owner

@ghost commented on GitHub (Apr 28, 2019):

I agree, I think we need:

* The ability to toggle the clipboard on/off
* To size limit what is shared between machines

The Synergy master branch has both of these features, both exposed via the UI.

Can someone merge this option to barrier then? Too much clipboard data crashes my server.

<!-- gh-comment-id:487369196 --> @ghost commented on GitHub (Apr 28, 2019): > > I agree, I think we need: > > ``` > > * The ability to toggle the clipboard on/off > > * To size limit what is shared between machines > > ``` > > The Synergy master branch has both of these features, both exposed via the UI. Can someone merge this option to barrier then? Too much clipboard data crashes my server.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#133
No description provided.