Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't do backup, burp quits with SIGSEGV #612

Closed
marcin-github opened this issue Sep 28, 2017 · 8 comments
Closed

Can't do backup, burp quits with SIGSEGV #612

marcin-github opened this issue Sep 28, 2017 · 8 comments

Comments

@marcin-github
Copy link

Hi!
Client - burp-2.1.18 (also with 2.1.12 I'm getting segfault) - x86
server - burp-2.1.12 - amd64
protocol - 1

First full backup finished without problem but problem happens when I do next backup.

# gdb -q /usr/sbin/burp
Reading symbols from /usr/sbin/burp...Reading symbols from /usr/lib/debug//usr/sbin/burp.debug...done.
done.
(gdb) set args -at
(gdb) run
Starting program: /usr/sbin/burp -at

Program received signal SIGSEGV, Segmentation fault.
0xb7c9ee11 in rs_search_for_block (weak_sum=1944554509, inbuf=0x8019a6da "", block_len=3968, sig=0x800bd6a0, stats=0x800bd5dc, match_where=0xbfffeee8) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/search.c:224
224             if (weak_sum != b->weak_sum)
(gdb) bt
#0  0xb7c9ee11 in rs_search_for_block (weak_sum=1944554509, inbuf=0x8019a6da "", block_len=3968, sig=0x800bd6a0, stats=0x800bd5dc, match_where=0xbfffeee8) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/search.c:224
#1  0xb7c9ad0d in rs_findmatch (match_len=<synthetic pointer>, match_pos=0x8019d00b, job=0x800bd538) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/delta.c:273
#2  rs_delta_s_scan (job=0x800bd538) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/delta.c:157
#3  0xb7c9c090 in rs_job_work (buffers=0xbffff038, job=0x800bd538) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/job.c:187
#4  rs_job_iter (job=0x800bd538, buffers=0xbffff038) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/job.c:145
#5  0x8003168f in rs_async ()
#6  0x8002da31 in backup_phase2_client_protocol1 ()
#7  0x80021ace in do_backup_client ()
#8  0x80025aaf in backup_wrapper ()
#9  0x80026341 in do_client ()
#10 0x80026744 in client ()
#11 0x800053c4 in main ()
(gdb) bt full
#0  0xb7c9ee11 in rs_search_for_block (weak_sum=1944554509, inbuf=0x8019a6da "", block_len=3968, sig=0x800bd6a0, stats=0x800bd5dc, match_where=0xbfffeee8) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/search.c:224
        i = 16009
        b = 0x80203160
        token = <optimized out>
        strong_sum = "\000\237\216\265", '\000' <repeats 12 times>, "\031\370ɷ8\325\v\200\300\275ɷ8\325\v\200"
        got_strong = 0
        hash_tag = 65524
        bucket = <optimized out>
        l = 3963
        r = <optimized out>
        v = <optimized out>
#1  0xb7c9ad0d in rs_findmatch (match_len=<synthetic pointer>, match_pos=0x8019d00b, job=0x800bd538) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/delta.c:273
No locals.
#2  rs_delta_s_scan (job=0x800bd538) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/delta.c:157
        match_pos = 93415534648
        match_len = 3968
        result = RS_DONE
        test = {count = 2148259568, s1 = 2148200800, s2 = 250}
#3  0xb7c9c090 in rs_job_work (buffers=0xbffff038, job=0x800bd538) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/job.c:187
        result = <optimized out>
#4  rs_job_iter (job=0x800bd538, buffers=0xbffff038) at /var/tmp/portage/net-libs/librsync-2.0.0/work/librsync-2.0.0/src/job.c:145
        orig_in = 16000
        orig_out = 16000
#5  0x8003168f in rs_async ()
No symbol table info available.
#6  0x8002da31 in backup_phase2_client_protocol1 ()
No symbol table info available.
#7  0x80021ace in do_backup_client ()
No symbol table info available.
#8  0x80025aaf in backup_wrapper ()
No symbol table info available.
#9  0x80026341 in do_client ()
No symbol table info available.
#10 0x80026744 in client ()
No symbol table info available.
#11 0x800053c4 in main ()
No symbol table info available.

Last lines in log are:

2017-09-28T09:07:45.825327+02:00 serwerx burp[13258]: Compression level: 9
2017-09-28T09:07:45.825434+02:00 serwerx burp[13258]: do backup client
2017-09-28T09:07:45.825476+02:00 serwerx burp[13258]: Using librsync hash blake2
2017-09-28T09:07:45.825509+02:00 serwerx burp[13258]: Phase 1 begin (file system scan)
2017-09-28T09:07:45.833612+02:00 serwerx burp[13258]: WARNING: Will not descend: file system change not allowed /boot: No data available
2017-09-28T09:07:46.808464+02:00 serwerx burp[13258]: WARNING: Will not descend: file system change not allowed /dane/bazy_danych: No data available
2017-09-28T09:07:51.256128+02:00 serwerx burp[13258]: Phase 1 end (file system scan)
2017-09-28T09:07:51.256488+02:00 serwerx burp[13258]: Phase 2 begin (send backup data)
@trustchk
Copy link
Contributor

Given that it's a gentoo and librsync is mentioned in the stacktrace: have you tried rebuilding librsync and burp? I assume it worked for the full backup because it did not have to check for differences in the very first backup, but if librsync got updated, compiler changed or certain make.conf settings were modified, it is possible that they are no longer compatible because burp was built against a different version. I do have a (gentoo) burp 2.1.12 with net-libs/librsync-2.0.0-r1 running against a (non-gentoo) burp 2.1.8 server without problems.

@grke
Copy link
Owner

grke commented Sep 28, 2017

I have never tried librsync-2.x.x.

@marcin-github
Copy link
Author

I'm running burp on many hosts, most of them are Gentoo, sometimes Debian. I never had such problem like that. It didn't looks like problem when burp is build against different version of librsync. I rebuild both packages to have debugging symbols and segfault still exists. I can see one difference, this problematic client is on x86, all other of my hosts are x86_64.
With librsync-0.9.7 burp made backup succesfully.

@grke
Copy link
Owner

grke commented Sep 29, 2017

Burp doesn't use librsync to do signatures/patches on the first backup, it only uses it on files that have changed.

I cannot tell whether the problem is with burp or librsync 2, or with the linking when you build.

What is the output of 'ldd /usr/sbin/burp' when you think you are using librsync2?

If the problem is with librsync 2, maybe the problem will show up if you run the librsync 2 tests.
Or maybe the problem will show up if you run the librsync 2 rdiff utility to generate a delta from a file?

Usage: rdiff [OPTIONS] signature [BASIS [SIGNATURE]]
             [OPTIONS] delta SIGNATURE [NEWFILE [DELTA]]
            [OPTIONS] patch BASIS [DELTA [NEWFILE]]

@marcin-github
Copy link
Author

I don't know exact parameters used by burp when use librsync, I generated SIGNATURE, DELTA and got new file using rdiff without segfault. I tried both md4 and blake2 hash algorithms.

@marcin-github
Copy link
Author

Found it, this is bug in librsync:
librsync/librsync#50
with patch librsync/librsync@1765ad0
burp finished backup.

@marcin-github
Copy link
Author

@grke
Copy link
Owner

grke commented Oct 11, 2017

Cool, thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants