Subject: Re: [netatalk-admins] pre-a17 available (my patches to netatalk)

From: Mike Pav <[email-masked]>
Date: Tue, 07 Oct 1997 22:14:32 -0400

At 11:01 AM 10/6/97 -0700, you wrote:
>
>well, here's more from the patch-a-week club. i just want to make sure
>this patchset works before turning it into a "real" a17 with the
>appropriate diffs. the interested can get pre-a17-7.tar.gz from
>ftp.u.washington.edu:/public/asun. it should fix the multicast problem
>under solaris.

I'm testing this under Solaris 2.5.1 using gcc.  Found that in the file
"multicast.c" I needed to add an "#include <sys/sockio.h>" to get some of
the definitions.

Also, I still can not use CodeWarrior on a Mac to open projects from
netatalk on Solaris.  I always get the dreaded "-42 too many files open"
dialog on the Mac. I have experimented with setting fd_max and fd_current
in /etc/system, but no luck.  Funny thing is that if I run netatalk on a
Linux machine, and have it serve a file system that is NFS mounted from
Solaris, all is well.

Seems to me that CodeWarrior can not be opening more than 256 file
simultaneously.  This error occurs in less than 2 seconds. This "-42" error
occurs if I use AppleTalk or TCP as the transport protocol.

I'd be glad to do some debugging if anyone can give me some pointers as to
where I should start looking.

Mike Pav
[email-masked]
http://www.morphtech.com
Developers of Cross Platform Server Side Scripting Engines

---

From: Mario Klebsch DG1AM <[email-masked]>
Date: Wed, 8 Oct 1997 08:23:00 +0200

Hi!

>occurs if I use AppleTalk or TCP as the transport protocol.

Does this mean, you have 256 open files on the solaris server, when
this error occurs? Did you try to increase the number of descriptors
per process on the solaris system?

This is one of the topycs on the squid web cache related mailing
lists, that you have to increase the number of descriptors up to
several tousands to let the cache run in a heavily loaded environment.

So, there is a limit of file descriptors per process in solaris, and
it can be changed. perhaps you are hitting this limit.

>I have experimented with setting fd_max and fd_current
                                  ^^^^^^     ^^^^^^^^^^
>in /etc/system, but no luck.

>From the Solaris FAQ:

  3.43) How can I increase the number of file descriptors per process?
     
   In 2.3 in earlier this requires poking the kernel. In Solaris 2.4+,
   this can be accomplished by adding the following lines to /etc/system:
     
        * set hard limit on file descriptors
        set rlim_fd_max = 4096
            ^^^^^^^^^^^
        * set soft limit on file descriptors
        set rlim_fd_cur = 1024
            ^^^^^^^^^^^
     
   Raising the soft limit past 256 may confuse certain applications,
   especially BCP applications. Raising the limit past 1024 may confuse
   applications that use select().
     
   Programs using stdio or even library calls that use stdio may break
   when they have more than 256 files open as that is the stdio limit.
   Programs using many filedescriptors should try and reserve a number of
   low numbered file descriptors for use by stdio.

Have yoy tried lsof -p <pid of afpserver> when you are hitting the
limit? This way you can find out, how many open descriptors the
afpserver really does have.

73, Mario
-- 
Mario Klebsch, DG1AM, [email-masked]		+49 531 / 391 - 7457
Institut fuer Robotik und Prozessinformatik der TU Braunschweig
Hamburger Strasse 267, 38114 Braunschweig, Germany

---

From: [email-masked]
Date: Wed, 08 Oct 1997 11:07:18 -0400

> From:      [email-masked]

>in /etc/system, but no luck.

The problem is that afpd uses the #define NOFILE to statically allocate
an array for open file forks.  This number is equal to 20 on Solaris,
and we allocate ( NOFILE - 10 ) / 2 = 5 open forks.  The fix is to
dynamically allocate the table at startup.  The latest snap-shot
contains this code.

:wes

---

From: a sun <[email-masked]>
Date: Wed, 8 Oct 1997 12:39:44 -0700 (PDT)

i suspected something like that. i'll have a fix in my patches as
well.

-a

---

From: Walter Wong <[email-masked]>
Date: Thu, 9 Oct 1997 08:42:51 -0400 (EDT)

pre-a17 compiled under Solaris 2.5.1 by adding

	#ifdef __svr4__
	#include <sys/sockio.h>
	#endif /* __svr4__ */

to etc/atalkd/multicast.c.  

The good news is that atalkd, papd, and afpd all start up and are
visible from the chooser.

However, it looks like the Kerberos stuff isn't working right. When I
click on the server, I get the UAM choices but when I chose Kerberos,
the dialog goes away but nothing happens -- Authman doesn't even fire
up if my tickets are expired. I'll go digging around later and post
what I discover.

Walter