grke / burp

burp - backup and restore program
http://burp.grke.net
Other
482 stars 77 forks source link

burp[26367] stats file: had an exception #700

Open jirib opened 6 years ago

jirib commented 6 years ago

Hi,

2.1.28 on EL7 and 2.1.30 on w2k8r2/w2k12r2. Should I be worried about my data?

BTW, is there any IRC or mailing-list? I cannot find a reference to it on the project page or here.

# zcat /data/backup/local/burp/brq-w2k12r2/current/log.gz 
2018-03-05 16:42:31 +0100: burp[26367] Client version: 2.1.30
2018-03-05 16:42:31 +0100: burp[26367] Protocol: 1
2018-03-05 16:42:31 +0100: burp[26367] Client is Windows
2018-03-05 16:42:31 +0100: burp[26367] WARNING: Client 'brq-w2k12r2' version '2.1.30' does not match server version '2.1.28'. An upgrade is recommended.
2018-03-05 16:42:31 +0100: burp[26367] Begin phase1 (file system scan)
2018-03-05 16:45:19 +0100: burp[26367] End phase1 (file system scan)
2018-03-05 16:45:19 +0100: burp[26367] Begin phase2 (receive file data)
2018-03-05 16:45:19 +0100: burp[26367] could not open '/data/backup/local/burp/brq-w2k12r2/current/incexc' for reading.
2018-03-05 17:43:13 +0100: burp[26367] End phase2 (receive file data)
2018-03-05 17:43:13 +0100: burp[26367] Backup ending - disconnect from client.
2018-03-05 17:43:13 +0100: burp[26367] Begin phase3 (merge manifests)
2018-03-05 17:43:16 +0100: burp[26367] End phase3 (merge manifests)
2018-03-05 17:43:16 +0100: burp[26367] Begin phase4 (shuffle files)
2018-03-05 17:43:16 +0100: burp[26367] First keep value: 7, backup: 1 (1-1=0)
2018-03-05 17:43:16 +0100: burp[26367] New backup is a hardlinked_archive (0%7=0)
2018-03-05 17:43:16 +0100: burp[26367] Doing the atomic data jiggle...
2018-03-05 17:43:28 +0100: burp[26367] End phase4 (shuffle files)
--------------------------------------------------------------------------------
Start time: 2018-03-05 16:42:31
  End time: 2018-03-05 17:43:28
Time taken: 01:00:57
                         New   Changed Duplicate   Deleted     Total |  Scanned
                   ------------------------------------------------------------
             Files:   122757         0         0         0    122757 |   122757
       Grand total:   122757         0         0         0    122757 |   122757
                   ------------------------------------------------------------

             Messages:             0
             Warnings:             0

      Bytes estimated:   17114956093 (15.94 GB)
      Bytes in backup:   17147826129 (15.97 GB)
       Bytes received:    7739691796 (7.21 GB)
           Bytes sent:      20846961 (19.88 MB)
--------------------------------------------------------------------------------
2018-03-05 17:43:28 +0100: burp[26367] stats file: had an exception
2018-03-05 17:43:28 +0100: burp[26367] Backup completed.
grke commented 6 years ago

The burp-users mailing list is here: https://sourceforge.net/projects/burp/lists/burp-users

Referenced here: http://burp.grke.org/requests.html

What operating system is your server running? Somebody who wanted burp to run on AIX made this code for me:

#ifdef _AIX
                                        /* On AIX, for some weird reason,
                                         * writing the stats file makes the
                                         * socket show up in fse, despite
                                         * everything being fine. We ignore
                                         * it.
                                         */
                                        if(strncmp(asfd->desc, "stats file",
                                                sizeof("stats file")))
                                        {
                                                logp("%s: had an exception\n",
                                                        asfd->desc);
                                                return asfd_problem(asfd);
                                        }
#else
                                        logp("%s: had an exception\n",
                                                asfd->desc);
                                        return asfd_problem(asfd);
#endif /* _AIX */

So, it seems this is not AIX specific. I haven't seen this happen on my Debian or my Pi though.

jirib commented 6 years ago
# rpm -qf /etc/redhat-release 
redhat-release-server-7.4-18.el7.x86_64

# uname -r
3.10.0-693.1.1.el7.x86_64
deajan commented 6 years ago

I do have seen this on recent CentOS 7 x64 too.

trustchk commented 6 years ago

The ifdefs were added in 3cd1f0fcb8b66741739fb8ad24f57826b3873726. I just played around with the status monitor snapshot (-a S).

Setup 1:

Setup 2:

Results:

Error message is as follows, one line for each line it would print without redirecting to a file:

2018-03-06 12:31:32 CET: burp[19333196] stdout: had an exception
ebertland commented 6 years ago

I am seeing the same thing.

2018-03-07 06:32:36 -0800: burp[6004] stats file: had an exception 2018-03-07 06:32:36 -0800: burp[6004] Backup completed.

When it occurs, backup_stats is a zero-length file for that backup.

burp version is 2.1.28 from vshn ppa. The OS is Ubuntu Xenial. deb http://ppa.launchpad.net/vshn/backup/ubuntu xenial main

ebertland commented 6 years ago

Some of my clients are 2.1.30, so at first, I thought that might be the problem. Now, I have also seen it happen with a client that is running 2.1.28.

Another variable is that I have been trying out burp-ui. At first, I was using an older version that I learned is incompatible with recent versions of burp. I have since switched to the development build of burp-ui and it is working better. I think that I saw "stats file: had an exception" both before and after upgrading burp-ui, however.

grke commented 6 years ago

I think the "stats file: had an exception" thing is probably because burp accidentally closes the file descriptor twice. I cannot prove it, because I am unable to reproduce it, but I can put a fix for closing twice in master. Maybe the problem will then disappear for everybody.