On Mon 10 Jan 2005, Francesco Potorti` wrote:
> 
> $ ulimit -S -f 3300
> $ rsync --quiet --partial 
> ftp.es.debian.org::debian-cd/3.0_r4/alpha/debian-30r4-alpha-binary-1.iso .
> rsync: connection unexpectedly closed (53 bytes received so far) [generator]
> rsync error: error in rsync protocol data stream (code 12) at io.c(359)
> 
> rsync dumps core and leaves an incomplete downloaded file whose name
> begins with a dot.  Since the --partial option is used, it should rename
> it to the target file, and obviously should not dump core and print an
> error. 

The "problem" here is that the ulimit causes a signal to be sent to the
process, which causes the core dump. Running under strace will show:


30539 write(4, "\316\357#\337\225\372\354\320\376\235\"n\372\204y\342\363"..., 2
8672) = -1 EFBIG (File too large)
30539 --- SIGXFSZ (File size limit exceeded) @ 0 (0) ---
30538 <... select resumed> )            = 1 (in [4], left {49, 450000})
30538 --- SIGCHLD (Child exited) @ 0 (0) ---
30538 waitpid(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGXFSZ}], WNOHANG) = 30539
30538 waitpid(-1, 0xbfffdef4, WNOHANG)  = -1 ECHILD (No child processes)
30538 sigreturn()                       = ? (mask now [])
30538 read(4, "", 4)                    = 0
30538 write(2, "rsync: connection unexpectedly c"..., 77) = 77


If I stop the rsync before that by hitting ctrl-C, the tmpfile is
correctly renamed before the process exits. Presumably the SIGXFSZ
should be trapped...


Does your script actually set the filesize ulimit? If so, how is the iso
ever to be downloaded?


Paul Slootman


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to