ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:37754] [Ruby 1.8 - Bug #3779] Threading issues on Debian GNU/kFreeBSD
       [not found] <redmine.issue-3779.20100901192611@ruby-lang.org>
@ 2011-07-03 15:16 ` Lucas Nussbaum
  2011-10-16 20:15 ` [ruby-core:40171] [Backport87 - Backport #3779][Assigned] " Shyouhei Urabe
  1 sibling, 0 replies; 2+ messages in thread
From: Lucas Nussbaum @ 2011-07-03 15:16 UTC (permalink / raw
  To: ruby-core


Issue #3779 has been updated by Lucas Nussbaum.


Hi,

I'm surprised this fix wasn't applied, and backported to 1.8.7...
----------------------------------------
Bug #3779: Threading issues on Debian GNU/kFreeBSD
http://redmine.ruby-lang.org/issues/3779

Author: Lucas Nussbaum
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.8.7


=begin
 Due to incorrect assumptions on sigprocmask in threaded programs, ruby 1.8 doesn't work well on Debian GNU/kFreeBSD (FreeBSD kernel + GNU Libc).
 This was already fixed in Ruby 1.9.
 
 - in process.c (re-)start timer thread (after_exec) only in parent,
   as in child we know for sure that there is only one thread.
   The fix-up in child is performed slightly later in rb_thread_atfork().
   Also unify linux with rest of the systems.
   In 1.9 series the code is completely reworked.
 
 - in signal.c use pthread_sigmask instead of sigprocmask,
   behaviour of sigprocmask is undefined in threaded programs, as stated in POSIX
   (http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html).
   In 1.9 series the code already uses pthread_sigmask:
 
   Sat Apr 24 00:41:52 2010  Yusuke Endoh  <mame@tsg.ne.jp>
 
         * signal.c: use pthread_sigmask() instead of sigprocmask().
           sigprocmask() is unspecified behavior on multi-thread programs.
           [ruby-core:25217]
 
 For more information, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595034
 
 Patch attached. The signal.c part is hackish, and should be done properly in configure. 
 
 Please also backport to 1.8.7.
=end



-- 
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:40171] [Backport87 - Backport #3779][Assigned] Threading issues on Debian GNU/kFreeBSD
       [not found] <redmine.issue-3779.20100901192611@ruby-lang.org>
  2011-07-03 15:16 ` [ruby-core:37754] [Ruby 1.8 - Bug #3779] Threading issues on Debian GNU/kFreeBSD Lucas Nussbaum
@ 2011-10-16 20:15 ` Shyouhei Urabe
  1 sibling, 0 replies; 2+ messages in thread
From: Shyouhei Urabe @ 2011-10-16 20:15 UTC (permalink / raw
  To: ruby-core


Issue #3779 has been updated by Shyouhei Urabe.

Category set to core
Status changed from Open to Assigned

process.c part is OK.

signal.c part is NG.  Ruby 1.8 and under don't always use pthread so depending on environments, your patch might introduce additional dependencies, namely -lpthread.  That's not a good thing to add today.

I'm trying to write fix this.
----------------------------------------
Backport #3779: Threading issues on Debian GNU/kFreeBSD
http://redmine.ruby-lang.org/issues/3779

Author: Lucas Nussbaum
Status: Assigned
Priority: Normal
Assignee: Shyouhei Urabe
Category: core
Target version: 


=begin
 Due to incorrect assumptions on sigprocmask in threaded programs, ruby 1.8 doesn't work well on Debian GNU/kFreeBSD (FreeBSD kernel + GNU Libc).
 This was already fixed in Ruby 1.9.
 
 - in process.c (re-)start timer thread (after_exec) only in parent,
   as in child we know for sure that there is only one thread.
   The fix-up in child is performed slightly later in rb_thread_atfork().
   Also unify linux with rest of the systems.
   In 1.9 series the code is completely reworked.
 
 - in signal.c use pthread_sigmask instead of sigprocmask,
   behaviour of sigprocmask is undefined in threaded programs, as stated in POSIX
   (http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html).
   In 1.9 series the code already uses pthread_sigmask:
 
   Sat Apr 24 00:41:52 2010  Yusuke Endoh  <mame@tsg.ne.jp>
 
         * signal.c: use pthread_sigmask() instead of sigprocmask().
           sigprocmask() is unspecified behavior on multi-thread programs.
           [ruby-core:25217]
 
 For more information, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595034
 
 Patch attached. The signal.c part is hackish, and should be done properly in configure. 
 
 Please also backport to 1.8.7.
=end



-- 
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-16 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-3779.20100901192611@ruby-lang.org>
2011-07-03 15:16 ` [ruby-core:37754] [Ruby 1.8 - Bug #3779] Threading issues on Debian GNU/kFreeBSD Lucas Nussbaum
2011-10-16 20:15 ` [ruby-core:40171] [Backport87 - Backport #3779][Assigned] " Shyouhei Urabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).