Re: openrsync out of memory

2019-08-19 Thread Sebastian Benoit
Olivier Antoine(olivier.anto...@gmail.com) on 2019.08.19 11:34:06 +0200: > Hi, > On i386: before patch: > $ dd if=/dev/urandom of=in bs=1M count=2k > $ openrsync --rsync-path=/usr/bin/openrsync -av in localhost:out > Transfer starting: 1 files > sender.c:551: error: in: mmap: Cannot allocate memo

Re: openrsync out of memory

2019-08-19 Thread Olivier Antoine
Hi, On i386: before patch: $ dd if=/dev/urandom of=in bs=1M count=2k $ openrsync --rsync-path=/usr/bin/openrsync -av in localhost:out Transfer starting: 1 files sender.c:551: error: in: mmap: Cannot allocate memory client.c:85: error: rsync_sender receiver.c:345: error: poll: hangup server.c:145:

Re: openrsync out of memory

2019-08-17 Thread Sebastian Benoit
Joe Davis(m...@jo.ie) on 2019.08.16 12:26:36 +0100: > By the looks of it, openrsync does attempt to map the entire file, from > usr.bin/rsync/uploader.c: > > mapsz = st.st_size; > map = mmap(NULL, mapsz, PROT_READ, MAP_SHARED, *fileinfd, 0); > > The likely reason for your out of memory er

Re: openrsync out of memory

2019-08-16 Thread Theo de Raadt
Christian Weisgerber wrote: > On 2019-08-16, Jan Stary wrote: > > >> Does that mean openrsync tries to mmap() the entire file? > >> The machine only has 256MB of memory, but it does transfer > >> a test file of 300MB, so that can't be it. > > > > I forgot about 1GB swap, so that's why it works

Re: openrsync out of memory

2019-08-16 Thread Christian Weisgerber
On 2019-08-16, Jan Stary wrote: >> Does that mean openrsync tries to mmap() the entire file? >> The machine only has 256MB of memory, but it does transfer >> a test file of 300MB, so that can't be it. > > I forgot about 1GB swap, so that's why it works > for files up to around 1.2G, but not large

Re: openrsync out of memory

2019-08-16 Thread Jan Stary
On Aug 16 10:43:41, h...@stare.cz wrote: > Does that mean openrsync tries to mmap() the entire file? > The machine only has 256MB of memory, but it does transfer > a test file of 300MB, so that can't be it. I forgot about 1GB swap, so that's why it works for files up to around 1.2G, but not larger

Re: openrsync out of memory

2019-08-16 Thread Theo de Raadt
Joe Davis wrote: > By the looks of it, openrsync does attempt to map the entire file, from > usr.bin/rsync/uploader.c: > > mapsz = st.st_size; > map = mmap(NULL, mapsz, PROT_READ, MAP_SHARED, *fileinfd, 0); > > The likely reason for your out of memory error is the default datasize > in

Re: openrsync out of memory

2019-08-16 Thread Joe Davis
By the looks of it, openrsync does attempt to map the entire file, from usr.bin/rsync/uploader.c: mapsz = st.st_size; map = mmap(NULL, mapsz, PROT_READ, MAP_SHARED, *fileinfd, 0); The likely reason for your out of memory error is the default datasize in login.conf. IIRC on some arches it'

openrsync out of memory

2019-08-16 Thread Jan Stary
This is 6.5-current on an old ALIX (dmesg bellow). I am syncing its backups to a remote machine with openrsync. It works on all files except one that is big: 196M/backup/gw.stare.cz/dump.home.0 32.0K /backup/gw.stare.cz/dump.home.1 32.0K /backup/gw.stare.cz/dump.home.2 32.0K /backup/gw.