From: Don L. <netatalk@c.icompute.com> - 2013-11-30 05:50:48
|
I have built Netatalk 3.0.6 on NetBSD 5.2 and on NetBSD 6.0.2. I have also installed and run some initial tests on NetBSD 6.0.2. I can reliably reproduce a problem where if I copy a folder of about 20,000 files to the AFP share, the NetBSD file table fills up, and I can no longer log in to debug it. I was not sure what was causing it, but each time I do the copy, the log messages appear, and it becomes non-responsive to ssh. I don't know of a tool that will tell me who is holding all these open files, but I'm betting it's netatalk based on the fact that when I could not log in, I un-mounted one of the AFP volumes at the client side, and then I could ssh in to the machine. The patches I needed to build/install on NetBSD are very similar to what I did for netatalk 2.2.4. Any suggestions on how to debug this? It's a lot of files. It looks to me like the AFPD is forgetting to close files sometimes. The file table has about 1700 entries, so it's not 1:1. More like one leak per 10 files. --- start Patches: --- ./distrib/initscripts/Makefile.in.orig 2013-10-25 23:39:26.000000000 -0500 +++ ./distrib/initscripts/Makefile.in 2013-10-25 23:39:54.000000000 -0500 @@ -710,7 +710,7 @@ @USE_SUSE_SYSV_TRUE@ rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS) @USE_NETBSD_TRUE@netatalk: rc.netbsd -@USE_NETBSD_TRUE@ cp -f $< $@ +@USE_NETBSD_TRUE@ cp -f rc.netbsd $@ @USE_NETBSD_TRUE@ chmod a+x $@ @USE_NETBSD_TRUE@install-data-hook: --- ./bin/afppasswd/afppasswd.c.orig 2013-10-25 23:20:24.000000000 -0500 +++ ./bin/afppasswd/afppasswd.c 2013-10-25 23:21:33.000000000 -0500 @@ -37,6 +37,11 @@ #include <des.h> +#define Key_schedule DES_key_schedule +#define key_sched(kkkk, ssss) DES_key_sched((kkkk), &(ssss)) +#define ecb_encrypt(nnnn1, nnnn2, ssss, ffff) DES_ecb_encrypt((nnnn1), (nnnn2), &(ssss), (ffff)) +#define C_Block DES_cblock + #ifdef USE_CRACKLIB #include <crack.h> #endif /* USE_CRACKLIB */ --- ./etc/uams/uams_randnum.c.orig 2013-10-25 23:27:50.000000000 -0500 +++ ./etc/uams/uams_randnum.c 2013-10-25 23:28:16.000000000 -0500 @@ -27,6 +27,11 @@ #include <des.h> +#define Key_schedule DES_key_schedule +#define key_sched(kkkk, ssss) DES_key_sched((kkkk), &(ssss)) +#define ecb_encrypt(nnnn1, nnnn2, ssss, ffff) DES_ecb_encrypt((nnnn1), (nnnn2), &(ssss), (ffff)) +#define C_Block DES_cblock + #ifdef USE_CRACKLIB #include <crack.h> #endif /* USE_CRACKLIB */ --- End patches -dgl- |