smbstatus fails with "Segmentation fault"

Arnold Troeger stssart at
Thu Jun 15 03:49:35 GMT 2000

Arnold Troeger wrote:

> I'm running Samba 2.0.7 on a heavily patched Solaris 2.6 machine.  For
> about 3 minutes after I restart smb and nmb I can run smbstatus (as
> root) with no trouble.  After that though smbstatus starts segfaulting.
> It shows the shares properly, but the locks and memory usage messages do
> not appear.  Have I found a bug in smbstatus?
> Thanks in advance for any suggestions.
> Regards,
> Arnold
> --

Yes, I did find a bug.  The problem is Samba 2.0.x and the 64 bit aspect of
Solaris 2.6 (Sparc, not Intel).  Specifically, it's the configure script that
compiles the program.  The configure script sets CPPFLAGS to
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64.  This evidently screws up the
offset calculations for identifying locks in the locking_shm.c routines.  I
have no idea why you would want to compile large file support into Samba as
neither Windows, nor Linux, can currently handle large files.  Samba compiles
with warning messages about shifting counts being too big (ntrans.c, reply.c,
trans2.c and util.c) when the large file support flags are removed.  What's
more, smbstatus now works.

There should probably be an option in the configure script for removing the
large file support, at least with Solaris 2.6.  Has anyone tried compiling
Samba 2.0.7 in Solaris 8 for Sparc architecture?  Does the 64 bit support
work properly?

Arnold Troeger                          Unocal Thailand
"Microsoft Windows:  for when your machine is just too fast"

More information about the samba mailing list