OpenSolaris

Printable Version Enter a New Search
Bug ID 6650829
Synopsis smb_enable_service() waits in vain
State 10-Fix Delivered (Fix available in build)
Category:Subcategory utility:cifs
Keywords
Responsible Engineer Doug Mccallum
Reported Against snv_79
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_84
Fixed In snv_84
Release Fixed solaris_nevada(snv_84)
Related Bugs 6617183 , 6650816
Submit Date 15-January-2008
Last Update Date 27-February-2008
Description
[dep, 15Jan2008]

  We recently discovered that on some systems adding a share using
  sharemgr took 15 seconds.  This delay was tracked down to
  smb_enable_service(), which includes the following code:

                /* Wait for service to come online */
                for (i = 0; i < WAIT_FOR_SERVICE; i++) {
                        if (smb_isonline()) {
                                ret =  SA_OK;
                                break;
                        } else {
                                ret = SA_BUSY;
                                (void) sleep(1);
                        }
                }

  Diagnosing the problem further showed that smb/server wasn't 
  available.  In particular, it was in the maintenance state, which
  means that until an administrator does something, it will *never* be
  available.  smb_isonline (which is already checking the state of the
  service) should test for that so we can fail quickly.
  
  This problem is exacerbated by the fact that no error is returned to
  the user.  I don't know if that is correct or not (I'd guess no), but
  one outcome is that it takes considerable effort to determine why
  sharemgr is behaving erratically.
Work Around
N/A
Comments
N/A