[SRU] SIGSEGV in bacula-fd

Bug #227613 reported by Andreas Schultz
10
Affects Status Importance Assigned to Milestone
bacula (Debian)
Fix Released
Unknown
bacula (Ubuntu)
Fix Released
Medium
Chuck Short
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Medium
Chuck Short

Bug Description

Binary package hint: bacula

bacula-fd has a know bug/crash when the strippath option is used.

more information here: http://bugs.bacula.org/view.php?id=1047

The upstream bug has not been fixed in 2.2.8!!

TEST CASE:
1. apt-get install bacula-server bacula-client.
2. Configure and enable the strippath option.

Revision history for this message
Andreas Schultz (aschultz) wrote :
Revision history for this message
Andreas Schultz (aschultz) wrote :

Debian claims this bug to be fixed, however their patch has later been removed from upstream as being wrong (see: http://bacula.svn.sourceforge.net/viewvc/bacula/tags/Beta-2.2.10-b1/bacula/src/filed/backup.c?r1=6391&r2=6508)

Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 227613] [NEW] SIGSEGV in bacula-fd

On Wed, 07 May 2008 06:21:31 -0000
Andreas Schultz <email address hidden> wrote:

> bacula-fd has a know bug/crash when the strippath option is used.

Thanks for information.

Changed in bacula:
status: Unknown → Fix Released
Ante Karamatić (ivoks)
Changed in bacula:
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Chuck Short (zulcss) wrote :

Debian currently ships a patch that we inherited that does not fix this issue. I have backported the patch (attached) to resolve this issue.

TEST CASE:

1. apt-get install bacula-server bacula-client.
2. Configure and ebaled the strippath option.

Note: This should be done with someone who has experience with bacula.

There should be no regressions from this patch. If you have any questions please let me know.

Revision history for this message
Chuck Short (zulcss) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in bacula:
status: New → Fix Committed
Revision history for this message
Andreas Schultz (aschultz) wrote :

tested the -proposed, no change

the backtrace that bacula-fd generates itself is attached

Martin Pitt (pitti)
Changed in bacula:
assignee: nobody → zulcss
status: Fix Committed → In Progress
Steve Beattie (sbeattie)
description: updated
Revision history for this message
Steve Beattie (sbeattie) wrote :

Chuck or anyone else, can you improve the test case by giving a sample configuration for testing this bug fix? This is one of the bugfixes we'd like people to try to verify in the special SRU BugHug day tomorrow: https://wiki.ubuntu.com/UbuntuBugDay/20080624

Thanks!

Revision history for this message
Sergio Barjola (sbarjola) wrote :

I've tested proposed package after upgrade, and I get same error too.

package: ii bacula-fd 2.2.8-5ubuntu7.1

Revision history for this message
Chuck Short (zulcss) wrote :

Hi,

Can you try the package from my archive, before I upload this thing to hady-proposed again:

http://launchpad.net/~zulcss/+archive.

thanks
chuck

Revision history for this message
Sergio Barjola (sbarjola) wrote :

still doesn't work. I attach backtrace but I don't have debug symbols for bacula packages.

Revision history for this message
Chuck Short (zulcss) wrote :

Can you attach your bacula-fd.conf please?

Thanks
chuck

Revision history for this message
Sergio Barjola (sbarjola) wrote :

attached the bacula-fd.conf and bacula-dir.conf (don't worry about passwords)

Revision history for this message
Sergio Barjola (sbarjola) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Can you try the new version in my ppa (bacula_2.2.8-5ubuntu7.2~ppa1).

Thanks
chuck

Revision history for this message
Sergio Barjola (sbarjola) wrote :

sorry but it's not working.
when I run a job copying one file it works. Then i modified the file and rerun the job. The second, third time it crash again.

if I if you need some file or log I'll happy to add it, but I cannot install -dbgsym for add a backtrace.

Revision history for this message
Ante Karamatić (ivoks) wrote :

Could you test my PPA?

deb http://ppa.launchpad.net/ivoks/ubuntu hardy main

Revision history for this message
Kern Sibbald (kern) wrote : Re: [Bug 227613] Re: [SRU] SIGSEGV in bacula-fd

On Wednesday 24 September 2008 20:04:18 Ante Karamatić wrote:

"The upstream bug has not been fixed in 2.2.8!!"

The bug *was* fixed in the 2.2.8 version with two patches. Did you apply
them?

If not an easy way to fix it is to take src/dird/backup.c from either the last
commit to Branch-2.2 or from the current released code (Branch-2.4) rather
than trying to apply the patches.

If you diff src/dird/backup.c from what you are currently shipping in 2.2.8 to
the current 2.4 release and there are differences, it is pretty sure they are
the fixes to the strippath problem as I don't remember making any other fix
there.

Revision history for this message
Ante Karamatić (ivoks) wrote :

On Thu, 25 Sep 2008 20:36:41 -0000
Kern Sibbald <email address hidden> wrote:

> On Wednesday 24 September 2008 20:04:18 Ante Karamatić wrote:
>
> "The upstream bug has not been fixed in 2.2.8!!"

I haven't said that :)

> The bug *was* fixed in the 2.2.8 version with two patches. Did you
> apply them?

We have 2.2.8 version in Ubuntu 8.04, and this bug is filed for 2.2.8.
I think it was fixed later in bacula, not in 2.2.8...

> If not an easy way to fix it is to take src/dird/backup.c from either
> the last commit to Branch-2.2 or from the current released code
> (Branch-2.4) rather than trying to apply the patches.

I guess you are referring to src/filed/backup.c? If yes, that file is
exactly the same in my PPA version and in 2.4.2.

src/dird/backup.c has more differences, but I don't think those are
relevant for this bug.

We'll wait for Sergio to test my PPA version.

Thank you!

Revision history for this message
Kern Sibbald (kern) wrote :

On Saturday 27 September 2008 09:45:11 Ante Karamatić wrote:
> On Thu, 25 Sep 2008 20:36:41 -0000
>
> Kern Sibbald <email address hidden> wrote:
> > On Wednesday 24 September 2008 20:04:18 Ante Karamatić wrote:
> >
> > "The upstream bug has not been fixed in 2.2.8!!"
>
> I haven't said that :)

OK, no problem. I didn't take offense, hope you didn't, but just wanted to
clarify.

>
> > The bug *was* fixed in the 2.2.8 version with two patches. Did you
> > apply them?
>
> We have 2.2.8 version in Ubuntu 8.04, and this bug is filed for 2.2.8.
> I think it was fixed later in bacula, not in 2.2.8...

The bug in the main Bacula 2.2.8 Branch HEAD is fixed because the code is
identical to the current 2.4.2 code. That is if 2.2.8 is fully and correctly
patched with the released patches, it should have this bug and others fixed.
It is possible that there were confusions with the patches in getting from
the first 2.2.8 to the version that is in the SVN.

In any case, what is clear to me is that we have no problems in the 2.4.x base
with this bug and that the 2.4.0 was pulled from the last 2.2.8 and that no
additional strippath changes were made in the 2.4.x versions.

>
> > If not an easy way to fix it is to take src/dird/backup.c from either
> > the last commit to Branch-2.2 or from the current released code
> > (Branch-2.4) rather than trying to apply the patches.
>
> I guess you are referring to src/filed/backup.c? If yes, that file is
> exactly the same in my PPA version and in 2.4.2.

Yes, sorry. I should have said src/filed/backup.c

>
> src/dird/backup.c has more differences, but I don't think those are
> relevant for this bug.

Yes, you are correct.

>
> We'll wait for Sergio to test my PPA version.

OK, if you have a 2.2.8 src/filed/backup.c that is the same as on 2.4.2, then
the bug *should* be fixed. If not, I will be worried ...

By the way, what does PPA mean and where does one find those versions?

Thanks ...

Revision history for this message
Ante Karamatić (ivoks) wrote :

On Sat, 27 Sep 2008 09:25:55 -0000
Kern Sibbald <email address hidden> wrote:

> OK, no problem. I didn't take offense, hope you didn't, but just
> wanted to clarify.

Of course not.

> The bug in the main Bacula 2.2.8 Branch HEAD is fixed because the
> code is identical to the current 2.4.2 code. That is if 2.2.8 is
> fully and correctly patched with the released patches, it should have
> this bug and others fixed. It is possible that there were confusions
> with the patches in getting from the first 2.2.8 to the version that
> is in the SVN.

Oh! Mea culpa... I didn't know 2.2.8 is still getting patches. I'm
checking out source as I write this...

> OK, if you have a 2.2.8 src/filed/backup.c that is the same as on
> 2.4.2, then the bug *should* be fixed. If not, I will be worried ...

I've seen your comments on bug in bacula buglist, but we really need
Sergio to confirm this.

Thank you for the info!

Revision history for this message
Kern Sibbald (kern) wrote :

On Saturday 27 September 2008 12:06:24 Ante Karamatić wrote:
> On Sat, 27 Sep 2008 09:25:55 -0000
>
> Kern Sibbald <email address hidden> wrote:
> > OK, no problem. I didn't take offense, hope you didn't, but just
> > wanted to clarify.
>
> Of course not.
>
> > The bug in the main Bacula 2.2.8 Branch HEAD is fixed because the
> > code is identical to the current 2.4.2 code. That is if 2.2.8 is
> > fully and correctly patched with the released patches, it should have
> > this bug and others fixed. It is possible that there were confusions
> > with the patches in getting from the first 2.2.8 to the version that
> > is in the SVN.
>
> Oh! Mea culpa... I didn't know 2.2.8 is still getting patches. I'm
> checking out source as I write this...

OK. Just to be clear, you can get it from the "branches" Branch-2.2

svn checkout https://bacula.svn.sf.net/svnroot/bacula/branches/Branch-2.2 ...

You might want to subscribe to the Source Forge Bacula bacula-patches
notification. That way, you will see when I post any new patch. In general,
once I post a patch, it means it has been reasonably well tested and usually
verified by the bug submittor (or myself if I found the bug).

Occassionally, and very unusual, as was the case in the original strippath bug
report, I cannot reproduce the problem and the reporter does not respond to
requests to confirm the patch, and the patch may not be totally correct,
which is why we had at least two patches for that bug.

In any case, if you get a bug report, it always best to check if any patches
on it have been released ...

>
> > OK, if you have a 2.2.8 src/filed/backup.c that is the same as on
> > 2.4.2, then the bug *should* be fixed. If not, I will be worried ...
>
> I've seen your comments on bug in bacula buglist, but we really need
> Sergio to confirm this.
>
> Thank you for the info!

Thanks for the description of PPA, pretty cool.

Revision history for this message
Sergio Barjola (sbarjola) wrote :

Hi,
with the latest package in PPA I cannot reproduce the bug.

package version:
bacula 2.2.8-5ubuntu7.1~ivoks3

sorry by the time to reply.

Revision history for this message
Chuck Short (zulcss) wrote :

This has already been fixed for intrepid.

Changed in bacula:
status: In Progress → Fix Committed
Changed in bacula:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in bacula:
status: In Progress → Fix Committed
Revision history for this message
Sergio Barjola (sbarjola) wrote :

I have test the hardy proposed package and I cannot reproduce it.

The default hardy package, bacula-fd crash 1/2 of times that I tested.
With the proposed package, I've test 10 times and it not crash.

ii bacula-fd 2.2.8-5ubuntu7.2

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bacula - 2.2.8-5ubuntu7.2

---------------
bacula (2.2.8-5ubuntu7.2) hardy-proposed; urgency=low

  * Applied upstream's 2.2.8-strippath.patch, modified to compile
    cleanly on hardy. (http://bacula.svn.sourceforge.net/viewvc/bacula?view=rev&revision=6867)
    - Fix strippath bug that created a buffer overrun and crash the FD.
     (LP: #227613)

  [Ante Karamatic]
  * Export $HOME in /etc/bacula/scripts/make_catalog_backup_awk.
    - Thanks to Hanno Stock. (LP: #227410)
  * debian/bacula-director-pgsql.postinst
    - Really compare versions. (LP: #228693)
  * debian/bacula-directory-pgsql.postinst:
    - grant all privileges to new user on the new new database.
  * patches/ubuntu_grant_privileges.patch
    - test if $USER and $db_name are set in grant_postgresql_privileges.

 -- Chuck Short <email address hidden> Fri, 21 Nov 2008 08:15:06 -0500

Changed in bacula:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.