GithubHelp home page GithubHelp logo

Comments (11)

baskerville avatar baskerville commented on June 21, 2024

Grab this patch and apply it to the standard Git PKGBUILD.

Install the package generated from this patched PKGBUILD.

(Afterwards, check that file $(which bspwm) ends with not stripped.)

In a virtual terminal (without X running):

ulimit -c unlimited
startx
sudo systemd-coredumpctl gdb bspwm
set logging on
bt full
q

And post the content of gdb.txt.

from bspwm.

baskerville avatar baskerville commented on June 21, 2024

Might be fixed by 48d181f.

from bspwm.

andornaut avatar andornaut commented on June 21, 2024

I'm still experiencing the same issues with 48d181f.

I'm using Ubuntu which doesn't use PKGBUILD and also doesn't include systemd-coredumpctl. startx in the above instructions fails, though. Maybe I could try something else?

I did try installing via make debug && sudo make install. Now the /var/log/Xorg.0.log output contains:

import monitors
add monitor ...
add monitor ...
add desktop ...
xinit: connection to X server lost

I thought that perhaps this issue might be related so I checked the version of some dependencies:

When I install xcb-util-wm 0.3.9 from fedora 19, bspwm can start without segfaulting.

My advice to other Fedora users: Get the newest xcb-util-wm packages and 'make clean all' in bspwm.

On Ubuntu, xcb-util-wm is a source package which is used to build libxcb-ewmh-dev and libxcb-ewmh2.

It looks like my system already has version 0.3.9 of the above installed, as suggested in the above quotation:

Package: libxcb-ewmh2
Source: xcb-util-wm
Version: 0.3.9-2

Package: libxcb-ewmh-dev
Source: xcb-util-wm
Version: 0.3.9-2

Here are some other xcb package versions:

Package: libxcb-keysyms1-dev
Source: xcb-util-keysyms
Version: 0.3.9-1

Package: libxcb-keysyms1
Source: xcb-util-keysyms
Version: 0.3.9-1

Package: libx11-xcb-dev
Source: libx11
Version: 2:1.5.0-1ubuntu1

Package: libxcb1
Source: libxcb
Version: 1.8.1-2ubuntu2

Package: libxcb-util0-dev
Source: xcb-util
Version: 0.3.8-2build1

from bspwm.

andornaut avatar andornaut commented on June 21, 2024

This issue only occurs when I have a second monitor connected. If I disconnect my second monitor and run startx, then bspwm works as expected.

from bspwm.

andornaut avatar andornaut commented on June 21, 2024

This is the first commit with which I experience this issue: 80caab4

I've reverted to this commit, which works as expected: 1ef4d4f

from bspwm.

baskerville avatar baskerville commented on June 21, 2024

Can you make it crash by plugging your secondary monitor?

If so, you could run this in a virtual terminal (while bspwm is running):

su -c 'echo 0 > /proc/sys/kernel/yama/ptrace_scope'
gdb bspwm $(pgrep -x bspwm)
set logging on
c

Then go back to X and plug the second monitor.

Switch back to the virtual terminal holding gdb and issue:

bt full
q
y

from bspwm.

andornaut avatar andornaut commented on June 21, 2024

Can you make it crash by plugging your secondary monitor?

Nope. The second monitor isn't initialized though.

I can start Xorg with only exec xterm in .xinitrc then run gdb on bspwm, though:

Starting program: /usr/local/bin/bspwm 
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
Program received signal SIGSEGV, Segmentation fault.
0x0000000000413f63 in ?? ()
#0  0x0000000000413f63 in ?? ()
No symbol table info available.
#1  0x000000090061a550 in ?? ()
No symbol table info available.
#2  0x00007fff00000000 in ?? ()
No symbol table info available.
#3  0x0000000000619280 in ?? ()
No symbol table info available.
#4  0x000001f2000001f1 in ?? ()
No symbol table info available.
#5  0x31706f746b736544 in ?? ()
No symbol table info available.
#6  0x00007fffffff9b00 in ?? ()
No symbol table info available.
#7  0x0000000000000005 in ?? ()
No symbol table info available.
#8  0x00007fffffff9b20 in ?? ()
No symbol table info available.
#9  0x00007fffffff9af0 in ?? ()
No symbol table info available.
#10 0x0000000000000005 in ?? ()
No symbol table info available.
#11 0x00007fffffff9b40 in ?? ()
No symbol table info available.
#12 0x0000000000000000 in ?? ()
No symbol table info available.
A debugging session is active.
    Inferior 1 [process 12735] will be killed.
Quit anyway? (y or n) 

Here's the process I followed:

git clone https://github.com/baskerville/bspwm.git
cd bspwm
make debug
sudo make install
# startx with only exec xterm in .xinitrc
# In the xterm
gdb
set logging on
target exec /usr/local/bin/bspwm
run
# Segfaults here
bt full
q
y

from bspwm.

baskerville avatar baskerville commented on June 21, 2024

This: target exec /usr/local/bin/bspwm doesn't load the symbols table, use file /usr/local/bin/bspwm instead.

from bspwm.

andornaut avatar andornaut commented on June 21, 2024

use file /usr/local/bin/bspwm instead.

Done. Here's the gdb.txt:

Starting program: /usr/local/bin/bspwm 
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
Program received signal SIGSEGV, Segmentation fault.
0x0000000000413f63 in ewmh_update_desktop_names () at ewmh.c:80
80              for (j = 0; d->name[j] != '\0' && (i + j) < sizeof(names); j++)
#0  0x0000000000413f63 in ewmh_update_desktop_names () at ewmh.c:80
        d = 0x1f2000001f1
        m = 0x619280
        names = "Desktop1\000\235\377\377\377\177\000\000\005\000\000\000\000\000\000\000\340\235\377\377\377\177\000\000\260\235\377\377\377\177\000\000\005\000\000\000\000\000\000\000\000\236\377\377\377\177", '\000' , "/\\\214\367\377\177\000\000\022\000\a\000\003\002\000\000\227\001\000\000\006\000\000\000 \000\000\000\001", '\000' , "\260\235\377\377\377\177\000\000\225\214\336\367\377\177\000\000\001", '\000' , "\b\235\377\377\377\177\000\000\000\000\000\000\000\000\000\000\350A\255\367\377\177\000\000\000\000\000\000\000\000\000\000\240\235\377\377\377\177\000\000\000\000\000\000\000\000\000\000\350A\255\367\377\177\000\000\000\000\000\000\000\000\000\000"...
        i = 9
        j = 0
        names_len = 32767
#1  0x00000000004061f4 in add_desktop (m=0x621da0, d=0x621d00) at desktop.c:120
No locals.
#2  0x0000000000405bd8 in import_monitors () at monitor.c:300
        sres = 0x621910
        m = 0x621da0
        mm = 0x619280
        num = 2
        len = 6
        outputs = 0x621940
        cookies = 0x7fffffff9de0
        gpo = 0x620390
#3  0x00000000004042d3 in setup () at bspwm.c:224
        mask = 2048
        values = {64}
        net_atoms = {404, 395, 410, 407, 368, 405, 367, 372, 375, 378, 442, 
          387, 429, 428, 438, 434, 432, 430}
        qep = 0x6203f0
        ifo = 0x7ffff78b9b40
#4  0x000000000040396d in main (argc=1, argv=0x7fffffffe338) at bspwm.c:73
        descriptors = {__fds_bits = {0 }}
        socket_path = '\000' 
        fifo_path = 0x0
        sock_fd = 0
        ret_fd = 0
        dpy_fd = 0
        sel = 0
        n = 0
        sock_address = {sun_family = 0, sun_path = '\000' }
        rsp_len = 0
        msg = '\000' 
        rsp = '\000' 
        event = 0x0
        opt = -1 '\377'
        sp = 0x0
A debugging session is active.
    Inferior 1 [process 17165] will be killed.
Quit anyway? (y or n)

from bspwm.

baskerville avatar baskerville commented on June 21, 2024

Should be fixed by 6ae7601.

from bspwm.

andornaut avatar andornaut commented on June 21, 2024

Should be fixed by 6ae7601.

Confirmed. Thanks!

from bspwm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.