From: Jason T. <jt...@zx...> - 2012-11-16 21:59:57
|
Hi Frank, Thanks for the quick reply. After investigating further, I think I see the real cause of this issue for me: The configure script for netatalk does a check for the existence of pthread_sigmask. However, on my system (FreeBSD 9), libc contains no-op stubs for many of the pthread_* functions. As a result, the AC_SEARCH_LIBS macro returns "none required" and when I run make, pthread does not get linked to the afpd binary. Any calls to pthread_sigmask in afpd will just be calling the stub function in libc instead of actually setting the signal mask. As an alternative to using AC_SEARCH_LIBS, maybe a better solution is to use this autoconf macro: http://www.gnu.org/software/autoconf-archive/ax_pthread.html What do you think? Thanks, Jason On Nov 16, 2012, at 9:14 AM, Frank Lahm wrote: > follow-up to netatalk-devel please. > > 2012/11/15 Jason Teska <jt...@zx...>: >> I've been having some trouble getting netatalk 3.0.1 to work on FreeBSD 9. It appears that a signal mask set by netatalk (netatalk.c line 272) is getting interited by afpd after a fork/exec. As a result, SIGALRM is blocked, and the timer function alarm_handler() in afp_dsi.c is not getting run. Since there are no tickles getting sent from the server, my client (Mac OS 10.6) is killing connections after 2 minutes. Other important signals are blocked as well. >> >> I'm a little surprised that no one else has reported this issue, so hopefully I'm not missing something obvious. If I remove the call to sigprocmask, the problem goes away. Does anyone else have a similar issue or have any thoughts on the matter? > > etc/afp/main.c, line 243 set the signal mask with pthread_sigmask. > > Recently I committed a fix which makes sure the signal _handlers_ are > in place once an authenticated session is running, it seems I missed > the signal _mask_. Damn! > Cf etc/afp/afp_dsi.c, line 466 call to afp_over_dsi_sighandlers(). > -f |