ports/73972: [patch] systutils/rdiff-backup: exception raised on EDEADLK

Charles Ulrich charles at idealso.com
Mon Nov 15 15:40:26 UTC 2004

>Number:         73972
>Category:       ports
>Synopsis:       [patch] systutils/rdiff-backup: exception raised on EDEADLK
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 15 15:40:25 GMT 2004
>Originator:     Charles Ulrich
>Release:        4.10-STABLE
Ideal Solution, LLC
FreeBSD DualAth.atmosphereannealing.com 4.9-STABLE FreeBSD 4.9-STABLE #1: Tue Mar  9 18:16:52 EST 2004     root at DualAth.atmosphereannealing.com:/usr/obj/usr/src/sys/DUALATH  i386
In rdiff-backup's robust.py module, there is a function called catch_error which attempts to "step over" certain operating system errors that should not be fatal to the backup as a whole. In this, EDEADLOCK is listed, but not its BSD equivalent, EDEADLK.
Mount an SMB share via smbfs and use rdiff-backup to back up a directory containing a file that is opened on a Windows machine. Outlook .pst files are the best candidates. rdiff-backup will raise an exception, '[Errno 11] Resource deadlock avoided' upon encountering the file and halt the backup.
To fix this, add the EDEADLK error to catch_error in robust.py. EDEADLK could replace EDEADLOCK in the list as FreeBSD doesn't use the latter (that I can tell), but perhaps the patch will make it upstream. I believe tabs have been preserved properly. If not, it's a two-liner anyway. Thanks for your time.

--- robust.py.orig	2004-11-15 10:08:58.000000000 -0500
+++ robust.py	2004-11-15 10:09:44.000000000 -0500
@@ -53,7 +53,8 @@
 		 errno.errorcode[exc[0]] in ('EPERM', 'ENOENT', 'EACCES', 'EBUSY',
 									 'EINTR', 'ENOTEMPTY', 'EIO', 'ETXTBSY',
-									 'ESRCH', 'EINVAL', 'EDEADLOCK'))):
+									 'ESRCH', 'EINVAL', 'EDEADLOCK',
+									 'EDEADLK'))):
 		return 1
 	return 0

More information about the freebsd-ports-bugs mailing list