On Monday 17 September 2007 11:44, Marc Schiffbauer wrote:
> * Kern Sibbald schrieb am 17.09.07 um 08:11 Uhr:
> > On Sunday 16 September 2007 23:46, Marc Schiffbauer wrote:
>
> [...]
>
> > > Bingo!
> >
> > Great.
> >
> > > I just commented out the "#define HAV_POSIX_FADVISE" line,
> > > recompiled... No more crashes.
> > >
> > > May this behavior depend on the kernel? The server running bacula is
> > > a debian sarge system, but it is running an older kernel (2.4.20)
> > > than what is in sarge because of a special kernel-module.
> >
> > Hmmm. I *never* expected HAVE_POSIX_FADVISE to be turned on for a 2.4
> > kernel.
> >
> > > So my question is: is posix_fadvise() in sarge bad or is it my
> > > combination of sarge supporting it and that kernel 2.4.20 maybe not
> > > supporting it?
> >
> > I would like to understand why it is turned on on your system.  Did you
> > start your build with a virgin Bacula source directory?  or did you copy
> > it from some previously configured system?
>
> I thought I could explain that:
>
> I have a build-host running a 2.6 kernel. Every build is done in a
> separate dedicated chroot-environment for sarge, etch, edgy, feisty
> and so on. So the kernel at compile may differ from that at
> runtime.

Oh, this is not a very good situation.  It will ultimately lead to these kinds 
of problems.  The basic rule is that you always need to build on a system as 
close as possible to the one that will be running -- generally minor 
differences in kernel versions that would occur with updates should not cause 
problems.

>
> BUT:
> I now moved that sarge chroot to the machine running 2.4.20.
> It still detects posix_fadvise!

The problem is probably in the system include header files, which I imagine 
are not correct for your kernel, and that means that Bacula detects an API 
that either does not exist or is some other API on your system.

>
> Might it be that this test depends on the libc version or something like
> that and not really on the kernel?

Yes, see below.  It looks like your libc is mismatched to your kernel.

>
> [...]
> checking for posix_fadvise... yes
> [...]
> (and its really set in src/config.h after configure)
>
> BTW:
> Debian sarge ships with 2.6 as well as 2.4 kernel-images:
> [EMAIL PROTECTED]:~$ apt-cache policy kernel-image-2.6.8-4-686
> kernel-image-2.6.8-4-686:
>   Installed: (none)
>   Candidate: 2.6.8-17
>   Version Table:
>      2.6.8-17 0
>         500 http://ftp.de.debian.org sarge-proposed-updates/main Packages
>      2.6.8-16sarge7 0
>         500 http://security.debian.org sarge/updates/main Packages
> [EMAIL PROTECTED]:~$ apt-cache policy kernel-image-2.4.27-2-686
> kernel-image-2.4.27-2-686:
>   Installed: (none)
>   Candidate: 2.4.27-10sarge1
>   Version Table:
>      2.4.27-10sarge1 0
>         500 http://security.debian.org sarge/updates/main Packages
> [EMAIL PROTECTED]:~$

Well, I think you are getting close to the problem.  It is probably some 
minor "screw up" of getting the header files correct for each kernel.

>
> > I ask, because I am running Bacula version 2.2.1 on Red Hat 7.1, which is
> > using kernel 2.4.0, and the HAVE_POSIX_FADVISE function is automatically
> > turned off.
>
> That is ok then, but I guess most people install packages instead of
> compiling a software on their. So for sarge this can be either
> kernel.

When you change kernels, you must also change Bacula -- after all the kernel 
API changes, and Bacula automatically adapts during the compile phase not 
during runtime.

>
> Not to forget those people using a distro with all its packages but
> having their own kernels because of special features, different
> configs and the like.

In general if the kernels are close, there is no problem, but if they change 
the kernel API, you may need to rebuild Bacula.

>
> > I'm surprised it even built on your system.   It sounds like to me that
> > your kernel may have an incorrect or incomplete back port of fadvise.
>
> IIRC this is a vanilla 2.4.20 kernel so I don't think there is a
> backport.


Try greping for posix_fcntl in /usr/include. On my version of Linux there are 
parts that come from /usr/include/fcntl.h and bits/fcntl.h.  If it is defined 
there, then you have a big problem of incorrect headers that do not 
correspond to your kernel.

On my system, those header files come from glibc-headers*.rpm package.  Thus 
it appears as you mentioned that you have a libc that does not correspond to 
your kernel.

Regards,

Kern


>
> > Can you see if you get anything when you do "man posix_fadvise".  If you
> > do get something, please send it to me.
>
> No manual entry for posix_fadvise
>
> > > Thanks for helping!
> >
> > Sorry you had so much trouble.
>
> I tend to hit corner cases ;-)
>
> -Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to