bugrdiff-backup - Bugs: bug #17851, Crash on x86_64: OverflowError...

 
 

bug #17851: Crash on x86_64: OverflowError [Python Bug]

Submitter:  Darryl Dixon <esrever_otua>
Submitted:  Tue 26 Sep 2006 12:15:52 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 18 Mar 2008 10:54:53 PM UTC, comment #6: 

The fix has been comitted to Python:

http://svn.python.org/view?rev=61540&view=rev  (trunk)
http://svn.python.org/view?rev=61542&view=rev  (2.5.x)

and will be available in the forthcoming Python 2.5.3 and subsequent releases.

For the record, the upstream Python bug became:
http://bugs.python.org/issue1747858

Andrew Ferguson <owsla>
Group administrator
Wed 04 Jul 2007 03:07:17 PM UTC, comment #5: 
Andrew Ferguson <owsla>
Group administrator
Mon 13 Nov 2006 09:07:01 PM UTC, comment #4: 

Now that I have a Savannah account, I want to mention that I posted comment #3.

Andrew Ferguson <owsla>
Group administrator
Mon 13 Nov 2006 03:29:35 AM UTC, comment #3: 

This is quite clearly a Python bug. chown takes a uid_t and fstat returns a uid_t -- both are defined as an unsigned int on 32-bit and 64-bit Linux. Python, however, uses a signed int which is the source of the bug.

It happens that the bug is being hit for users because RHEL assigns the nfsnobody user a uid and gid greater than 2^31.

Anonymous
Wed 18 Oct 2006 01:27:28 AM UTC, comment #2: 

Do you have some files owned by nfsnobody? On RHEL it has UID 4294967294.

In python 2.4.1:

>>> os.chown('foobar', 4294967294, 4294967294)

OverflowError: signed integer is greater than maximum

It seems that while os.stat returns an unsigned integer, os.chown expects a signed 32-bit integer, i.e. within range of -2^31+1 .. +2^31.

Anonymous
Tue 26 Sep 2006 12:24:37 AM UTC, comment #1: 

Crash when using 1.1.5 in the same scenario also:
[root@akcux500 DOCS]# rdiff-backup --never-drop-acls -v4 /mnt/DOCS/ /files/DOCS/
-----------------------------------------------------------------
Detected abilities for source (read only) file system:
  Access control lists                         On
  Extended attributes                          On
  Case sensitivity                             On
  Mac OS X style resource forks                Off
  Mac OS X Finder information                  Off
-----------------------------------------------------------------
Extended attributes not supported by filesystem at /files/DOCS/rdiff-backup-data/rdiff-backup.tmp.0
-----------------------------------------------------------------
Detected abilities for destination (read/write) file system:
  Ownership changing                           On
  Hard linking                                 On
  fsync() directories                          On
  Directory inc permissions                    On
  High-bit permissions                         On
  Extended filenames                           On
  Access control lists                         On
  Extended attributes                          Off
  Case sensitivity                             On
  Mac OS X style resource forks                Off
  Mac OS X Finder information                  Off
-----------------------------------------------------------------
Starting mirror /mnt/DOCS to /files/DOCS
Exception 'signed integer is greater than maximum' raised of class 'exceptions.OverflowError':
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 295, in error_check_Main
    try: Main(arglist)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 315, in Main
    take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 271, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 337, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 38, in Mirror
    DestS.patch(dest_rpath, source_diffiter)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 218, in patch
    ITR(diff.index, diff)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rorpiter.py", line 281, in _call_
    last_branch.fast_process(*args)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 515, in fast_process
    if self.patch_to_temp(mirror_rp, diff_rorp, tf):
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 541, in patch_to_temp
    rpath.copy_attribs(diff_rorp, new)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py", line 161, in copy_attribs
    rpout.chown(*rpout.conn.user_group.map_rpath(rpin))
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py", line 857, in chown
    else: os.chown(self.path, uid, gid)

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 295, in error_check_Main
    try: Main(arglist)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 315, in Main
    take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 271, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 337, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 38, in Mirror
    DestS.patch(dest_rpath, source_diffiter)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 218, in patch
    ITR(diff.index, diff)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rorpiter.py", line 281, in _call_
    last_branch.fast_process(*args)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 515, in fast_process
    if self.patch_to_temp(mirror_rp, diff_rorp, tf):
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 541, in patch_to_temp
    rpath.copy_attribs(diff_rorp, new)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py", line 161, in copy_attribs
    rpout.chown(*rpout.conn.user_group.map_rpath(rpin))
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py", line 857, in chown
    else: os.chown(self.path, uid, gid)
OverflowError: signed integer is greater than maximum

Darryl Dixon <esrever_otua>
Tue 26 Sep 2006 12:15:52 AM UTC, original submission:  

Using rdiff-backup-1.0.4 on RHEL4 x86_64:

[root@akcux500 files]# rdiff-backup --never-drop-acls -v4 /mnt/DOCS/ /files/DOCS/
-----------------------------------------------------------------
Detected abilities for source (read only) file system:
  Access control lists                         On
  Extended attributes                          On
  Mac OS X style resource forks                Off
  Mac OS X Finder information                  Off
-----------------------------------------------------------------
Extended attributes not supported by filesystem at /files/DOCS/rdiff-backup-data/rdiff-backup.tmp.0
-----------------------------------------------------------------
Detected abilities for destination (read/write) file system:
  Characters needing quoting                   ''
  Ownership changing                           On
  Hard linking                                 On
  fsync() directories                          On
  Directory inc permissions                    On
  High-bit permissions                         On
  Access control lists                         On
  Extended attributes                          Off
  Mac OS X style resource forks                Off
  Mac OS X Finder information                  Off
-----------------------------------------------------------------
Starting mirror /mnt/DOCS to /files/DOCS
Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 285, in Main
    take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 255, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 308, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 38, in Mirror
    DestS.patch(dest_rpath, source_diffiter)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 218, in patch
    ITR(diff.index, diff)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rorpiter.py", line 285, in _call_
    last_branch.fast_process(*args)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 490, in fast_process
    if self.patch_to_temp(rp, diff_rorp, tf):
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/backup.py", line 517, in patch_to_temp
    rpath.copy_attribs(diff_rorp, new)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py", line 155, in copy_attribs
    if Globals.change_ownership: rpout.chown(*user_group.map_rpath(rpin))
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py", line 790, in chown
    else: os.chown(self.path, uid, gid)
OverflowError: signed integer is greater than maximum
Exception exceptions.TypeError: "'NoneType' object is not callable" in <bound method GzipFile.__del__ of <gzip open file '/files/DOCS/rdiff-backup-data/access_control_lists.2006-09-26T12:00:18+12:00.snapshot.gz', mode 'wb' at 0x2a9849c490 0x2a99b5ce60>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callable" in <bound method GzipFile.__del__ of <gzip open file '/files/DOCS/rdiff-backup-data/extended_attributes.2006-09-26T12:00:18+12:00.snapshot.gz', mode 'wb' at 0x2a9849c340 0x2a99b5cdd0>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callable" in <bound method GzipFile.__del__ of <gzip open file '/files/DOCS/rdiff-backup-data/file_statistics.2006-09-26T12:00:18+12:00.data.gz', mode 'wb' at 0x2a955e4030 0x2a99b5ccf8>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callable" in <bound method GzipFile.__del__ of <gzip open file '/files/DOCS/rdiff-backup-data/error_log.2006-09-26T12:00:18+12:00.data.gz', mode 'wb' at 0x2a9848a420 0x2a99b5bdd0>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callable" in <bound method GzipFile.__del__ of <gzip open file '/files/DOCS/rdiff-backup-data/mirror_metadata.2006-09-26T12:00:18+12:00.snapshot.gz', mode 'wb' at 0x2a9849c3b0 0x2a99b5cd40>> ignored

Darryl Dixon <esrever_otua>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by owsla (Updated the item)
  •  

    There are 0 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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-03-18 owsla StatusWont Fix Fixed
        Open/ClosedOpen Closed
    2006-11-28 owsla StatusNone Wont Fix
        SummaryCrash on x86_64: OverflowError Crash on x86_64: OverflowError [Python Bug]

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code