On Fri, 27 May 2016 16:04:46 +1200
Carlin Bingham <c...@viennan.net> wrote:

> On Fri, May 27, 2016 at 01:07:09AM +0200, Theo Buehler wrote:
> > On Thu, May 26, 2016 at 05:54:30PM -0400, Andre Smagin wrote:
> > > On Sat, 14 May 2016 21:01:29 +0200 (CEST)
> > > danj+o...@chown.me wrote:
> > > 
> > > > >Synopsis:      radeon(4) drm crashing on current/amd64
> > > [...]
> > > > drm:pid77501:radeon_fence_wait_empty_locked *ERROR* error waiting for 
> > > > ring[3] to become idle (-1601868)
> > > 
> > > 
> > > I am seeing the same issue, very infrequently (may be once every week or 
> > > two):
> > > 
> > > drm:pid55825:radeon_fence_wait_empty_locked *ERROR* error waiting for 
> > > ring[3] to become idle (-6007676)
> > > i3(49392): syscall 97 "inet"
> > > 
> > > Not sure what happens to i3 as X crashes, but I get that pledge message 
> > > every time.
> > > (Previously mentioned i3 to dcoppa, but before realizing it was related 
> > > to radeon issue.)
> > 
> > I combed through the i3 source code hoping to get an indication what
> > might be the cause for that socket(2) call breaking a pledge promise i3.
> > I couldn't find anything: all socket calls are with AF_LOCAL that should
> > be covered by the "unix" pledge.
> > 
> > Without seeing a ktrace output, I don't think I can make any progress
> > here.
> > 
> 
> i3's restore_xcb_check_cb() (src/restore_layout.c), if it sees that the
> connection to X has been lost, it calls restore_connect() which calls
> libxcb's xcb_connect().
> 
> In libxcb that calls xcb_connect_to_display_with_auth_info() which calls
> _xcb_open(), which calls _xcb_open_unix() and ususally that would be it,
> but if opening the unix socket fails (beause X has fallen over) it tries
> again to connect by calling _xcb_open_tcp() which sets up an AF_INET
> addrinfo and passes that to _xcb_socket()... and you can probably guess
> what happens next.
> --
> Carlin


The backtrace from the i3 core file seems to show exactly that.
(did not think about posting it, had a tunnel vision about the radeon crash)

(gdb) bt
#0  0x000000bceb60267a in socket () at <stdin>:2
#1  0x000000bd55bf8bfb in _xcb_socket (family=2, type=1, proto=6) at 
/build/openbsd/current/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_util.c:315
#2  0x000000bd55bf8d2e in _xcb_open_tcp (host=0xbd55cfdd78 "localhost", 
protocol=Variable "protocol" is not available.
) at 
/build/openbsd/current/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_util.c:387
#3  0x000000bd55bf91cd in xcb_connect_to_display_with_auth_info 
(displayname=Variable "displayname" is not available.
) at 
/build/openbsd/current/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_util.c:302
#4  0x000000ba6354885d in ipc_new_client () from /usr/local/bin/i3
#5  0x000000ba63548a51 in ipc_new_client () from /usr/local/bin/i3
#6  0x000000bd56d54fae in ev_invoke_pending () from /usr/local/lib/libev.so.3.1
#7  0x000000bd56d595e5 in ev_run () from /usr/local/lib/libev.so.3.1
#8  0x000000ba6352bea8 in memmem () from /usr/local/bin/i3
#9  0x000000ba63512b12 in ?? () from /usr/local/bin/i3
#10 0x0000000000000000 in ?? ()
Current language:  auto; currently asm 

Reply via email to