Subject: Odd AFP death under Solaris 2.5.1

From: Tim Rand <[email-masked]>
Date: Mon, 16 Jun 1997 09:14:17 -0500

I have another problem with 1.4b2 that I wanted to raise.  After about a day or so, Chooser refuses to talk to the SUN.

Environment:
   Solaris 2.5.1, Sparc Ultra 140

After the failure, the server entry shows up in the chooser list, but then when you go to pick it, I get a response back of: "No response from server. Please try again."

Restarting the SUN fixes the problem for another 48 hours or so and then things hang again.

I do see this in my /var/adm/messages:

 >May 21 17:44:13 stlouis afpd[12290]: afp_die: asp_shutdown: Connection timed out
 >May 21 17:44:14 stlouis afpd[205]: main: asp_getsession: Resource temporarily unavailable

Also, it seems like I don't have any AFP processes running now:
 >> ps -ef | grep atalk
 >    root   193     1  0   May 20 ?        0:00 /opt/local/atalk/etc/atalkd
 >    root   203     1  0   May 20 ?        0:01 /opt/local/atalk/etc/papd -p
 >/etc/printcap.atalk

Until this problem is resolved, a manual work-around is:

   nbpunrgstr 'stlouis:AFPServer@*'    # Where stlouis is your node name
   /opt/local/atalk/etc/afpd

---

From: [email-masked]
Date: Mon, 16 Jun 1997 11:06:07 -0400

> From:    Tim Rand <[email-masked]>
> To:      [email-masked]

> afpd[205]: main: asp_getsession: Resource temporarily unavailable

Find the fix attached.  Solaris adds/changes some fairly standard
return values for certain functions, as part of the difference between
Berkeley and AT&T signals.

:wes
#text/plain	[add EAGAIN check]	/tmp/asp_getsess.c.diffs

---

From: [email-masked]
Date: Mon, 16 Jun 1997 11:14:35 -0400

:wes
*** libatalk/asp/asp_getsess.c-	Sat Oct 19 17:13:22 1996
--- libatalk/asp/asp_getsess.c	Thu Nov  7 18:18:22 1996
***************
*** 191,197 ****
  	atpb.atp_rreqdata = rdata;
  	atpb.atp_rreqdlen = sizeof( rdata );
  	if ( atp_rreq( asp->asp_atp, &atpb ) < 0 ) {
! 	    if ( errno == EINTR ) {
  		continue;
  	    }
  	    return( NULL );
--- 191,197 ----
  	atpb.atp_rreqdata = rdata;
  	atpb.atp_rreqdlen = sizeof( rdata );
  	if ( atp_rreq( asp->asp_atp, &atpb ) < 0 ) {
! 	    if ( errno == EINTR || errno == EAGAIN ) {
  		continue;
  	    }
  	    return( NULL );