Recently I had some weird issues with the display manager LXDM to which I had switched over because it was said to avoid the awesome keyboard layout bug. The issue with LXDM (and SLiM as well) was that, when started, it showed nothing but a black screen and blocked for about a minute.

I had absolutely no clue what was going on until I started LXDM with strace. The output showed that the last thing LXDM was doing before blocking is trying to connect to a TCP socket over IPv6 to '::1', which is the IPv6 loopback address:

(...)
socket(PF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 7
setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
connect(7, {sa_family=AF_INET6, sin6_port=htons(6000), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)

Checking my ip6tables I found out that I had forgotten to allow loopback traffic in the INPUT chain, and as I had set the default policy to DROP the connection attempt had to run into the TCP timeout instead of being rejected right away.

Adding the appropriate rule fixed the issue. Without strace I'd never thought of checking my firewall setup...