Issue #7134 has been updated by gustavoanatoly (Gustavo Anatoly Fernandes Velasquez Solis).


auastro (Andy Kitchen) wrote:
> On Mac OS X, running the attached program causes the exception below about 1/10 times it is run.
> 
> $ ruby hup.rb 
> hup.rb:2:in `write': deadlock; recursive locking (ThreadError)
> 	from hup.rb:2:in `puts'
> 	from hup.rb:2:in `puts'
> 	from hup.rb:2:in `block in <main>'
> 	from hup.rb:6:in `call'
> 	from hup.rb:6:in `write'
> 	from hup.rb:6:in `puts'
> 	from hup.rb:6:in `puts'
> 	from hup.rb:6:in `<main>'
> 
> The expected output is:
> > In Hup Handler
> >Finished...
> 
> or
> 
> > Finished...
> > In Hup Handler
> 
> My ruby is compiled with clang:
> 
> $ clang --version
> Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)
> Target: x86_64-apple-darwin12.2.0
> Thread model: posix

Hi, Andy.

This error it happens when kill is called:

https://gist.github.com/3906937

Followed by:

https://gist.github.com/3906907

But I trying to understand the bug causes.




 

----------------------------------------
Bug #7134: Signal handling bug in Mac OS X
https://bugs.ruby-lang.org/issues/7134#change-30977

Author: auastro (Andy Kitchen)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12]


On Mac OS X, running the attached program causes the exception below about 1/10 times it is run.

$ ruby hup.rb 
hup.rb:2:in `write': deadlock; recursive locking (ThreadError)
	from hup.rb:2:in `puts'
	from hup.rb:2:in `puts'
	from hup.rb:2:in `block in <main>'
	from hup.rb:6:in `call'
	from hup.rb:6:in `write'
	from hup.rb:6:in `puts'
	from hup.rb:6:in `puts'
	from hup.rb:6:in `<main>'

The expected output is:
> In Hup Handler
>Finished...

or

> Finished...
> In Hup Handler

My ruby is compiled with clang:

$ clang --version
Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix



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