[SRU] SIGSEGV in bacula-fd

Bug #227613 reported by Andreas Schultz on 2008-05-07
10
Affects Status Importance Assigned to Milestone
bacula (Debian)
Fix Released
Unknown
bacula (Ubuntu)
Medium
Chuck Short
Hardy
Undecided
Unassigned
Intrepid
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.

Andreas Schultz (aschultz) wrote :
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)

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) on 2008-05-19
Changed in bacula:
status: New → In Progress
importance: Undecided → Medium
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.

Chuck Short (zulcss) wrote :
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in bacula:
status: New → Fix Committed
Andreas Schultz (aschultz) wrote :

tested the -proposed, no change

the backtrace that bacula-fd generates itself is attached

Martin Pitt (pitti) on 2008-06-04
Changed in bacula:
assignee: nobody → zulcss
status: Fix Committed → In Progress
Steve Beattie (sbeattie) on 2008-06-23
description: updated
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!

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

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

Sergio Barjola (sbarjola) wrote :

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

Chuck Short (zulcss) wrote :

Can you attach your bacula-fd.conf please?

Thanks
chuck

Sergio Barjola (sbarjola) wrote :

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

Sergio Barjola (sbarjola) wrote :
Chuck Short (zulcss) wrote :

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

Thanks
chuck

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.

Ante Karamatić (ivoks) wrote :

Could you test my PPA?

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

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.

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!

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 ...

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!

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.

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.

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
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
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

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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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