rsync buffer overflow detected

Boris Savelev boris.savelev at
Fri Apr 14 17:22:29 UTC 2017


I use rsync from python on my Debian Jessie amd64 and get this error:
*** buffer overflow detected ***: <snip>/rsync terminated
======= Backtrace: =========

I guess that problem is about too many open fds
STR for this is a small script on python:
import os
import subprocess

F = 'test'
OPENS = 1600

cmd = [
    #'gdb', '--args',

for i in xrange(OPENS):
    fd =, os.O_WRONLY | os.O_CREAT)

I rebuild rsync-3.1.1 from Debian source with debug and -O1 and get bt from gdb:
(gdb) bt
#0  0x00007ffff7859067 in __GI_raise (sig=sig at entry=6) at
#1  0x00007ffff785a448 in __GI_abort () at abort.c:89
#2  0x00007ffff78971b4 in __libc_message (do_abort=do_abort at entry=2,
fmt=fmt at entry=0x7ffff7989cb3 "*** %s ***: %s terminated\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff791caa7 in __GI___fortify_fail
(msg=msg at entry=0x7ffff7989c4a "buffer overflow detected") at
#4  0x00007ffff791acc0 in __GI___chk_fail () at chk_fail.c:28
#5  0x00007ffff791ca17 in __fdelt_chk (d=d at entry=1606) at fdelt_chk.c:25
#6  0x0000555555584c78 in safe_read (fd=fd at entry=1606,
buf=buf at entry=0x7fffffffa810 "\037", len=len at entry=4) at io.c:245
#7  0x0000555555585cfe in read_buf (f=f at entry=1606,
buf=buf at entry=0x7fffffffa810 "\037", len=len at entry=4) at io.c:1815
#8  0x0000555555585ef6 in read_int (f=f at entry=1606) at io.c:1711
#9  0x00005555555876ed in setup_protocol (f_out=1605, f_in=1606) at compat.c:158
#10 0x0000555555576417 in client_run (f_in=1606, f_out=1605,
pid=24793, argc=1, argv=0x5555557d5240) at main.c:1128
#11 0x000055555557795e in start_client (argv=0x5555557d5240, argc=1)
at main.c:1423
#12 main (argc=2, argv=0x5555557d5240) at main.c:1651

It looks like a bug, but I'm not sure)


More information about the rsync mailing list