Bug#940309: tmux: Random segfaults

2019-09-16 Thread Bernhard Übelacker
Dear Maintainer,
just in case it may be of any help.

I guess the dmesg line points to function screen_write_collect_end
in screen-write.c:1240.

Kind regards,
Bernhard

# Bullseye/testing amd64 qemu VM 2019-09-16

apt update
apt dist-upgrade


# testing -> unstable


apt update
apt dist-upgrade

reboot


apt install systemd-coredump fakeroot gdb tmux tmux-dbgsym
apt build-dep tmux


mkdir /home/benutzer/source/tmux/orig -p
cd/home/benutzer/source/tmux/orig
apt source tmux
cd



tmux


gdb -q --pid $(pidof tmux)

set width 0
set pagination off
directory /home/benutzer/source/tmux/orig/tmux-2.9a

info target
...
0x55d3db9adc80 - 0x55d3dba0c921 is .text
...


# [173131.642703] Code: 48 c7 85 30 01 00 00 00 00 00 00 89 45 00 41 8b 47 1c 
48 c1 e0 04 48 03 47 18 bf 01 00 00 00 48 8b 50 08 48 89 95 38 01 00 00 <48> 89 
2a 48 8d 95 30 01 00 00 48 89 50 08 e8 79 55 02 00 8b 55 08
# 48 c7 85 30 01 00 00 00 00 00 00 89 45 00 41 8b 47 1c 48 c1 e0 04 48 03 47 18 
bf 01 00 00 00 48 8b 50 08 48 89 95 38 01 00 00 48 89 2a 48 8d 95 30 01 00 00 
48 89 50 08 e8 79 55 02 00 8b 55 08
# 0x48, 0xc7, 0x85, 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x45, 
0x00, 0x41, 0x8b, 0x47, 0x1c, 0x48, 0xc1, 0xe0, 0x04, 0x48, 0x03, 0x47, 0x18, 
0xbf, 0x01, 0x00, 0x00, 0x00, 0x48, 0x8b, 0x50, 0x08, 0x48, 0x89, 0x95, 0x38, 
0x01, 0x00, 0x00, 0x48, 0x89, 0x2a, 0x48, 0x8d, 0x95, 0x30, 0x01, 0x00, 0x00, 
0x48, 0x89, 0x50, 0x08, 0xe8, 0x79, 0x55, 0x02, 0x00, 0x8b, 0x55, 0x08


(gdb) find /b 0x55d3db9adc80, 0x55d3dba0c921, 0x48, 0xc7, 0x85, 0x30, 
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x45, 0x00, 0x41, 0x8b, 0x47, 
0x1c, 0x48, 0xc1, 0xe0, 0x04, 0x48, 0x03, 0x47, 0x18, 0xbf, 0x01, 0x00, 0x00, 
0x00, 0x48, 0x8b, 0x50, 0x08, 0x48, 0x89, 0x95, 0x38, 0x01, 0x00, 0x00, 0x48, 
0x89, 0x2a, 0x48, 0x8d, 0x95, 0x30, 0x01, 0x00, 0x00, 0x48, 0x89, 0x50, 0x08, 
0xe8, 0x79, 0x55, 0x02, 0x00, 0x8b, 0x55, 0x08
0x55d3db9e417a 
1 pattern found.
(gdb) print/x 0x55d3db9e417a + 42
$1 = 0x55d3db9e41a4

(gdb) b *0x55d3db9e41a4
Breakpoint 1 at 0x55d3db9e41a4: file screen-write.c, line 1240.
(gdb) info break
Num Type   Disp Enb AddressWhat
1   breakpoint keep y   0x55d3db9e41a4 in screen_write_collect_end 
at screen-write.c:1240

(gdb) list screen-write.c:1240
1235if (ci->used == 0)
1236return;
1237ci->data[ci->used] = '\0';
1238
1239ci->x = s->cx;
1240TAILQ_INSERT_TAIL(&ctx->list[s->cy].items, ci, entry);
1241ctx->item = xcalloc(1, sizeof *ctx->item);
1242
1243log_debug("%s: %u %s (at %u,%u)", __func__, ci->used, ci->data, 
s->cx,
1244s->cy);

(gdb) print/x $rdx
$2 = 0x55d3dd642800

(gdb) print ctx->list[1]
$3 = {items = {tqh_first = 0x0, tqh_last = 0x55d3dd642800}}

(gdb) print ctx->s->cy
$4 = 1







Bug#940309: tmux: Random segfaults

2019-09-15 Thread Romain Francoise
Hi,

On Sun, Sep 15, 2019 at 2:12 PM Kamil Jonca  wrote:
> At random moments tmux segfaults, destroying all sessions.
> in dmesg we have: [...]

Thanks for the report. Can you try with 3.0-rc4 from experimental?



Bug#940309: tmux: Random segfaults

2019-09-15 Thread Kamil Jonca
Package: tmux
Version: 2.9a-3
Severity: important

At random moments tmux segfaults, destroying all sessions.
in dmesg we have:

[173131.642689] tmux: server[3258]: segfault at e1 ip 56262a6221a4 sp 
7ffccc134c30 error 6 in tmux[56262a5eb000+6]
[173131.642703] Code: 48 c7 85 30 01 00 00 00 00 00 00 89 45 00 41 8b 47 1c 48 
c1 e0 04 48 03 47 18 bf 01 00 00 00 48 8b 50 08 48 89 95 38 01 00 00 <48> 89 2a 
48 8d 95 30 01 00 00 48 89 50 08 e8 79 55 02 00 8b 55 08

KJ

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_FIRMWARE_WORKAROUND
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), 
LANGUAGE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages tmux depends on:
ii  libc6   2.29-1
ii  libevent-2.1-6  2.1.8-stable-4
ii  libtinfo6   6.1+20190803-1
ii  libutempter01.1.6-3+b1

tmux recommends no packages.

tmux suggests no packages.

-- no debconf information