bugrdiff-backup - Bugs: bug #26847, Eliminating "AF_UNIX path too...

 
 

bug #26847: Eliminating "AF_UNIX path too long" when backing up sockets

Submitter:  Joe Steele <j_steele>
Submitted:  Fri 19 Jun 2009 08:02:12 PM UTC
Votes: 100
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 12 Feb 2016 08:47:59 AM UTC, comment #4: 

patched committed already.
Please followup on github:
https://github.com/sol1/rdiff-backup

david kempe <davekempe>
Group administrator
Tue 30 Jun 2015 07:49:31 AM UTC, comment #3: 

Hello,

I've had the issue on our server, and it seems that it was making rdiff-backup completely miss the previous backup, thus re-creating all files on each and every backup that happens to hit this bug, i.e. basically all.  This made our backup system save way more than it was supposed to (like 7x more...). I thus consider this an important bug, I don't see why not just using mknod.

Samuel

Samuel Thibault <sthibaul>
Thu 30 Dec 2010 05:52:59 PM UTC, comment #2: 

I had the similiar problem and finally I found solution:
www.tooLongPath.com

bobby lee <bobmarty>
Fri 19 Jun 2009 08:11:53 PM UTC, comment #1: 

Hmm...

The example 114 character path in the original post did not display as intended.  Here it is again (it will probably be wrapped on more than 1 line):

/somewhere-else/my-backup/rdiff-backup-data/increments/somewhere/foo/bar/socket.2009-06-12T19:35:55-04:00.snapshot

Joe Steele <j_steele>
Fri 19 Jun 2009 08:02:12 PM UTC, original submission:  

Currently, rdiff-backup (v. 1.2.8) will attempt to back up socket files by using socket() and bind() to recreate the socket file on the destination system.  I suggest using os.mknod() instead.  The main advantage for mknod() is that it can create socket type files using paths of arbitrary length, whereas bind() is limited to a maximum of 107 characters.  A disadvantage is that os.mknod() is only available for python >= 2.3.

Using mknod() instead of bind() should help to eliminate the error:

SpecialFileError somewhere/foo/bar/socket Socket error: AF_UNIX path too long

I've attached a file to this bug report that contains a patch to rpath.py which seems to work for me.  It's written so that if mknod() fails, the program reverts to its current behavior for creating sockets using bind().

By the way, I don't see where anyone has ever mentioned it, but one of the reasons the "AF_UNIX path too long" error occurs is because, sooner or later, the socket changes (e.g., when a daemon is restarted) and another backup is run, creating an increment/snapshot file that looks something like this:


/somewhere-else/my-backup/rdiff-backup-data/increments/somewhere/foo/bar/socket.2009-06-12T19:35:55-04:00.snapshot


At 114 characters, this path will generate the "AF_UNIX path too long" error when passed to bind(), even though the lengths of the paths for the original socket (/somewhere/foo/bar/socket) and the backup destination (/somewhere-else/my-backup) are not particularly long.

Another approach for eliminating these errors would be to do what the tar command does -- ALWAYS ignore sockets when backing up (don't even permit them to be optionally backed up).  After all, there really isn't much point in backing up sockets.

Joe Steele <j_steele>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #18293:  rpath.py.patch.txt added by j_steele (788B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by davekempe (Posted a comment)
  • -email is unavailable- added by sthibaul (Posted a comment)
  • -email is unavailable- added by sthibaul (Voted in favor of this item)
  • -email is unavailable- added by bobmarty (Posted a comment)
  • -email is unavailable- added by j_steele (Submitted the item)
  •  

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-12 davekempe Open/ClosedOpen Closed
    2015-06-30 sthibaul Carbon-Copy- Added sthibaul
    2009-06-19 j_steele Attached File- Added rpath.py.patch.txt, #18293

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code