Weird problem: "select: Bad file descriptor"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird problem: "select: Bad file descriptor"

Walter Hop
Hello all,

I am having a problem with rdiff-backup, has anyone seen this before?
Any debugging info would be appreciated!

I am trying to back up a FreeBSD 4.11 box to a new FreeBSD 6.0 host. The
initial run (about 25GB) seems to stop at a random moment (on a
different file - sometimes after a few minutes, sometimes after an hour
or so).

The traceback is fairly long but it seems to boil down to "select: Bad
file descriptor" at the server end... How would I debug this?

Cheers!
walter

rdiff_backup.connection.ConnectionReadError: Truncated header string
(problem probably originated remotely)
Exception exceptions.TypeError: "'NoneType' object is not callable" in
<bound method GzipFile.__del__ of <gzip open file
'/home/backup_frits/data/rdiff-backup-data/file_statistics.2005-11-20T12:12:22+01:00.data.gz',
mode 'wb' at 0x81e40b0 0x8320d8c>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callselect:
Bad file descriptor

Versions:

client:
frits:~# python -V
Python 2.4.2
frits:~# uname -a
FreeBSD frits.rb.slikmedia.nl 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Thu
Mar 10 13:42:13 CET 2005    
[hidden email]:/usr/obj/usr/src/sys/transip-UP  i386
frits:~# pkg_info|grep rdiff-backup
rdiff-backup-1.0.2,1 Local/remote mirroring+incremental backup

server:
kip:~# python -V
Python 2.4.2
kip:~# uname -a
FreeBSD kip.mbp.slikmedia.nl 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu
Nov  3 09:36:13 UTC 2005    
[hidden email]:/usr/obj/usr/src/sys/GENERIC  i386
kip:~# pkg_info|grep rdiff-backup
rdiff-backup-1.0.2,1 Local/remote mirroring+incremental backup

Full traceback (is there a way to make these less verbose?)

Processing changed file
usr/compat/linux/usr/share/doc/glibc-common-2.3.2/ChangeLog.1.gz
Processing changed file
usr/compat/linux/usr/share/doc/glibc-common-2.3.2/ChangeLog.10.gz
Processing changed file
usr/compat/linux/usr/share/doc/glibc-common-2.3.2/ChangeLog.11.gz
Processing changed file
usr/compat/linux/usr/share/doc/glibc-common-2.3.2/ChangeLog.12.gz
Traceback (most recent call last):
  File "/usr/local/bin/rdiff-backup", line 23, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/Main.py",
line 284, in Main
    take_action(rps)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/Main.py",
line 254, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/Main.py",
line 307, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 38, in Mirror
    DestS.patch(dest_rpath, source_diffiter)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 445, in __call__
    return apply(self.connection.reval, (self.name,) + args)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 365, in reval
    result = self.get_response(req_num)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 314, in get_response
    try: req_num, object = self._get()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 228, in _get
    header_string = self.inpipe.read(9)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/robust.py",
line 86, in signal_handler
    raise SignalException(signum)
rdiff_backup.robust.SignalException: 15
frits:~# Processing changed file
usr/compat/linux/usr/share/doc/glibc-common-2.3.2/ChangeLog.13.gz
Exception 'Truncated header string (problem probably originated
remotely)' raised of class 'rdiff_backup.connection.ConnectionReadError':
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/robust.py",
line 32, in check_common_error
    try: return function(*args)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 96, in copy
    if rpin.isreg(): copy_reg_file(rpin, rpout, compress)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 118, in copy_reg_file
    rpout.write_from_fileobj(rpin.open("rb"), compress = compress)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 978, in write_from_fileobj
    copyfileobj(fp, outfp)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 58, in copyfileobj
    inbuf = inputfp.read(blocksize)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 1201, in read
    def read(self, length = -1): return self.file.read(length)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/iterfile.py", line
117, in read
    if not self.addtobuffer(): break
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/iterfile.py", line
132, in addtobuffer
    type, data = self.iwf._get()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/iterfile.py", line
401, in _get
    if not self.buf: self.buf += self.file.read()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 513, in read
    return self.connection.VirtualFile.readfromid(self.id, length)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 445, in __call__
    return apply(self.connection.reval, (self.name,) + args)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 365, in reval
    result = self.get_response(req_num)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 314, in get_response
    try: req_num, object = self._get()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 230, in _get
    raise ConnectionReadError("Truncated header string (problem "

Sending back exception Truncated header string (problem probably
originated remotely) of type rdiff_backup.connection.ConnectionReadError:
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 334, in answer_request
    result = apply(eval(request.function_string), argument_list)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 218, in patch
    ITR(diff.index, diff)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/rorpiter.py", line
285, in __call__
    last_branch.fast_process(*args)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 477, in fast_process
    if self.patch_to_temp(rp, diff_rorp, tf):
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/backup.py",
line 498, in patch_to_temp
    (diff_rorp, new)) == 0: return 0
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/robust.py",
line 32, in check_common_error
    try: return function(*args)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 96, in copy
    if rpin.isreg(): copy_reg_file(rpin, rpout, compress)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 118, in copy_reg_file
    rpout.write_from_fileobj(rpin.open("rb"), compress = compress)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 978, in write_from_fileobj
    copyfileobj(fp, outfp)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 58, in copyfileobj
    inbuf = inputfp.read(blocksize)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/rpath.py",
line 1201, in read
    def read(self, length = -1): return self.file.read(length)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/iterfile.py", line
117, in read
    if not self.addtobuffer(): break
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/iterfile.py", line
132, in addtobuffer
    type, data = self.iwf._get()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/iterfile.py", line
401, in _get
    if not self.buf: self.buf += self.file.read()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 513, in read
    return self.connection.VirtualFile.readfromid(self.id, length)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 445, in __call__
    return apply(self.connection.reval, (self.name,) + args)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 365, in reval
    result = self.get_response(req_num)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 314, in get_response
    try: req_num, object = self._get()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 230, in _get
    raise ConnectionReadError("Truncated header string (problem "

Traceback (most recent call last):
  File "/usr/local/bin/rdiff-backup", line 23, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/Main.py",
line 284, in Main
    take_action(rps)
  File "/usr/local/lib/python2.4/site-packages/rdiff_backup/Main.py",
line 252, in take_action
    connection.PipeConnection(sys.stdin, sys.stdout).Server()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 352, in Server
    self.get_response(-1)
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 314, in get_response
    try: req_num, object = self._get()
  File
"/usr/local/lib/python2.4/site-packages/rdiff_backup/connection.py",
line 230, in _get
    raise ConnectionReadError("Truncated header string (problem "
rdiff_backup.connection.ConnectionReadError: Truncated header string
(problem probably originated remotely)
Exception exceptions.TypeError: "'NoneType' object is not callable" in
<bound method GzipFile.__del__ of <gzip open file
'/home/backup_frits/data/rdiff-backup-data/file_statistics.2005-11-20T12:12:22+01:00.data.gz',
mode 'wb' at 0x81e40b0 0x8320d8c>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callselect:
Bad file descriptor


--
  Transip BV | http://www.transip.nl/
  Hoogwaardige Innovatie | Aangename Zekerheid



_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Weird problem: "select: Bad file descriptor"

Ben Escoto
>>>>> Walter Hop <[hidden email]>

>>>>> wrote the following on Sun, 20 Nov 2005 13:50:14 +0100
> Hello all,
>
> I am having a problem with rdiff-backup, has anyone seen this before?
> Any debugging info would be appreciated!
>
> I am trying to back up a FreeBSD 4.11 box to a new FreeBSD 6.0 host. The
> initial run (about 25GB) seems to stop at a random moment (on a
> different file - sometimes after a few minutes, sometimes after an hour
> or so).
...
>     raise SignalException(signum)
> rdiff_backup.robust.SignalException: 15

Actually the first problem may be getting signal 15 (TERM).  Is it
possible something/someone is killing it?  Maybe root (on frits) has a
cronjob setup to periodically "killall rdiff-backup"?  :-O  This would
explain why it happens on random files.


--
Ben Escoto

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Weird problem: "select: Bad file descriptor"

Walter Hop
[in reply to Ben Escoto, 20-11-2005 17:38]

>
>>    raise SignalException(signum)
>>rdiff_backup.robust.SignalException: 15
>>    
>>
>
>Actually the first problem may be getting signal 15 (TERM).  Is it
>possible something/someone is killing it?  Maybe root (on frits) has a
>cronjob setup to periodically "killall rdiff-backup"?  :-O  This would
>explain why it happens on random files.
>

This is going to be very embarassing.. Yes, it turned out to be a
cronjob!! This cronjob restarted Mailman, issuing a "killall python" if
Mailman wouldn't respond to a shutdown quickly enough :)

Hats off to you (and your magic ball!)

Cheers,
walter

--
  Transip BV | http://www.transip.nl/
  Hoogwaardige Innovatie | Aangename Zekerheid



_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki