Re: Do threads conflict?

2003-10-14 Thread Mark
- Original Message -
From: Dan Nelson [EMAIL PROTECTED]
To: Mark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, October 13, 2003 11:38 PM
Subject: Re: Do threads conflict?

 In the last episode (Oct 13), Mark said:

  I just installed Sendmail::Milter, which I believe uses the ithreads
  model for Perl. I created my own Milter (Perl-threaded 5.8.0), and
  everything runs fine... Except that now, when the Milter is running,
  tinyproxy 1.5.0 goes haywire, filling up its log like crazy with this
  message:
 
  Accept returned an error (Resource temporarily unavailable)...
  retrying.
 
  The only thing tinyproxy and the Milter have in common, is that they
  both use threads.
 
  Is there perhaps something that prevents both programs from using
  threads? Perhaps the threads-enabled version of the daemonized perl
  Milter keeps a shared library locked? So, now I can run either one or
  the other, but not both. I use this on FreeBSD 4.7R.

 They shouldn't conflict. That sounds like a libc_r bug; I think the
 wrapper for accept() should retry the accept() call for the user.

 You might want to try updating to 4.8; there were a couple of important
 commits to libc_r that fixed bugs that usually affected threaded daemons:

Thanks for the answer, Dan.

Upgrading to 4.8 is not directly possible on this production server. But can
I not just recompile the kernel with a patch?

 2002-10-22 09:44 fjoe don't allow the uthread kernel pipe to use the same
 descriptors as stdio

This may be the one affecting me. After your hinting me to the problem, I
did some further googling; but it sounds as if 5.1 still suffers from the
same malady; for instance:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/1588

Thanks,

- Mark

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Do threads conflict?

2003-10-14 Thread Dan Nelson
In the last episode (Oct 14), Mark said:
 From: Dan Nelson [EMAIL PROTECTED]
  In the last episode (Oct 13), Mark said:
   I just installed Sendmail::Milter, which I believe uses the
   ithreads model for Perl. I created my own Milter (Perl-threaded
   5.8.0), and everything runs fine... Except that now, when the
   Milter is running, tinyproxy 1.5.0 goes haywire, filling up its
   log like crazy with this message:
  
   Accept returned an error (Resource temporarily unavailable)...
   retrying.
 
  They shouldn't conflict. That sounds like a libc_r bug; I think the
  wrapper for accept() should retry the accept() call for the user.
 
  You might want to try updating to 4.8; there were a couple of
  important commits to libc_r that fixed bugs that usually affected
  threaded daemons:
 
 Upgrading to 4.8 is not directly possible on this production server.
 But can I not just recompile the kernel with a patch?

You don't even need to rebuild the kernel.  Just updating libc and
libc_r should do it (don't forget to reinstall /usr/include too).  I'm
actually runing a 4.8 libc on a 4.4 kernel with no problems on one
machine here (don't want to lose the 400-day uptime :)

 This may be the one affecting me. After your hinting me to the
 problem, I did some further googling; but it sounds as if 5.1 still
 suffers from the same malady; for instance:
 
 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/1588

That's not the same error that you were talking about, so chances are
it's a different issue.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Do threads conflict?

2003-10-13 Thread Mark
I just installed Sendmail::Milter, which I believe uses the ithreads model
for Perl. I created my own Milter (Perl-threaded 5.8.0), and everything runs
fine... Except that now, when the Milter is running, tinyproxy 1.5.0 goes
haywire, filling up its log like crazy with this message:

Accept returned an error (Resource temporarily unavailable) ... retrying.

The only thing tinyproxy and the Milter have in common, is that they both
use threads.

Is there perhaps something that prevents both programs from using threads?
Perhaps the threads-enabled version of the daemonized perl Milter keeps a
shared library locked? So, now I can run either one or the other, but not
both. I use this on FreeBSD 4.7R.

Thank you!

- Mark

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Do threads conflict?

2003-10-13 Thread Dan Nelson
In the last episode (Oct 13), Mark said:
 I just installed Sendmail::Milter, which I believe uses the ithreads
 model for Perl. I created my own Milter (Perl-threaded 5.8.0), and
 everything runs fine... Except that now, when the Milter is running,
 tinyproxy 1.5.0 goes haywire, filling up its log like crazy with this
 message:
 
 Accept returned an error (Resource temporarily unavailable) ... retrying.
 
 The only thing tinyproxy and the Milter have in common, is that they
 both use threads.
 
 Is there perhaps something that prevents both programs from using
 threads? Perhaps the threads-enabled version of the daemonized perl
 Milter keeps a shared library locked? So, now I can run either one or
 the other, but not both. I use this on FreeBSD 4.7R.

They shouldn't conflict.  That sounds like a libc_r bug; I think the
wrapper for accept() should retry the accept() call for the user.

You might want to try updating to 4.8; there were a couple of important
commits to libc_r that fixed bugs that usually affected threaded
daemons:

2002-10-22 09:44  fjoe
don't allow the uthread kernel pipe to use the same descriptors as stdio

2003-06-03 09:09  ru
fix for a stale stdio descriptors flags bugs.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]