Unable to open new log file /var/samba/log.smbd: No such file or directory

Edgar, Bob Bob.Edgar at commerzbankib.com
Wed May 14 12:36:57 GMT 2003


Yes, this is _not_ 64 bit compiled. I'm always reluctant to build things
64 bit that don't require it because they don't get much testing.
Perhaps I wasn't clear with my question:
	Has anyone been running samba 64 bit on Solaris 7, 8, and 9?

The real question: Is samba 64 bit clean? If it is, perhaps it would
be a good thing to add a configure switch to build 64 bit when the
compiler supports it?

I do think that the DEBUG message in debug.c could be fixed to say
the failure was "no more streams" if errno isn't set.
***************
*** 338,343 ****
--- 338,344 ----
  
        pstrcpy(debugf, fname);
  
+       errno = 0;
        if (append_log)
                new_dbf = sys_fopen( debugf, "a" );
        else
***************
*** 345,351 ****
  
        if (!new_dbf) {
                log_overflow = True;
!               DEBUG(0, ("Unable to open new log file %s: %s\n", debugf,
strerror(errno)));
                log_overflow = False;
                if (dbf)
                        fflush(dbf);
--- 346,353 ----
  
        if (!new_dbf) {
                log_overflow = True;
!               DEBUG(0, ("Unable to open new log file %s: %s\n", debugf, 
!                       errno ? strerror(errno) : "no streams available"));
                log_overflow = False;
                if (dbf)
                        fflush(dbf);

-----Original Message-----
From: Eric Boehm [mailto:boehm at nortelnetworks.com]
Sent: Mittwoch, 14. Mai 2003 14:14
To: Edgar, Bob
Cc: 'samba-technical at lists.samba.org'
Subject: Re: Unable to open new log file /var/samba/log.smbd: No such
file or directory


On Wed, May 14, 2003 at 11:57:56AM +0200, Edgar, Bob wrote:
>>>>> "Bob" == Edgar, Bob <Bob.Edgar at commerzbankib.com> writes:

    Bob> I made a small change to debug.c to set errno = 0 before the
    Bob> attempted open.  It now says: May 14 11:51:52 salt
    Bob> smbd[15566]: [2003/05/14 11:51:52, 0, effective(0, 0),
    Bob> real(0, 0)] ../../source/lib/debug.c:(349) May 14 11:51:52
    Bob> salt smbd[15566]: Unable to open new log file
    Bob> /var/samba/log.smbd: Error 0

    Bob> It's using fopen64 and not setting errno. From the man page:

    Bob>      The fopen() function may fail and not set errno if there
    Bob> are no free stdio streams.

    Bob> Has anyone been running samba 64 bit on Solaris 7, 8, and 9?

I've been running it on Solaris 7 and 8. This is a new one on me --
I've only seen this on 32-bit Samba.

Do you have max open files set? or is it the default (10000)?

Is this indeed a 64-bit samba? That is, does 'file smbd' show

/usr/local/samba/bin/smbd:      ELF 64-bit MSB executable SPARCV9 Version 1,
UltraSPARC1 Extensions Required, dynamically linked, not stripped

Just because it calls fopen64 doesn't mean that it is a 64-bit
application. 32-bit applications can call fopen64.

>From the lfcompile64 man page:

     The transitional compilation  environment  exports  all  the
     explicit 64-bit functions (xxx64()) and types in addition to
     all the regular functions (xxx()) and types. Both xxx()  and
     xxx64()  functions  are  available to the program source.
                                                                A
     32-bit application must use the xxx64() functions  in  order
     to  access  large  files.


                                See the lf64(5) manual page for a
     complete listing of the 64-bit transitional interfaces.


Also, in the "Solaris 64-bit Developer's Guide", under "Advanced
Topics: What's New For Applications"

Changes to stdio

In the 64-bit environment, the stdio facility has been extended to
allow more than 256 streams to be open simultaneously. The 32-bit
stdio facility continues to have a 256 streams limit.

Some other document tells you that the number of streams is 65536 but
I can't seem to find it right now.

-- 
Eric M. Boehm                  /"\  ASCII Ribbon Campaign
boehm at nortelnetworks.com       \ /  No HTML or RTF in mail
                                X   No proprietary word-processing
Respect Open Standards         / \  files in mail



More information about the samba-technical mailing list