[#396148] Facebook Group — Moses Aronov <mosesaro@...>

There is a facebook group that was recently created so we could all communicate with other fellow developers

13 messages 2012/06/05
[#396178] Re: Facebook Group — Chad Perrin <code@...> 2012/06/06

On Wed, Jun 06, 2012 at 01:55:48AM +0900, Moses Aronov wrote:

[#396186] Inexplicable Argument Error — Doug Jolley <lists@...>

I am encountering a very strange argument error. I simplified my code

12 messages 2012/06/06

[#396229] Thread#kill is not rescued by "rescue Exception" — Iñaki Baz Castillo <ibc@...>

Hi, let me show this easy code:

13 messages 2012/06/07

[#396333] Is "a,b=c,d" atomic? or do I need a Mutex? — Iñaki Baz Castillo <ibc@...>

Hi, I have two methods that could be called by different threads and

10 messages 2012/06/10

[#396357] ffi - Popping image on top of the screen — "Damián M. González" <lists@...>

Ey guys, how are you? I`m developing an application in Ruby, using

12 messages 2012/06/11

[#396373] Why should I learn ruby? — Kasper Steensig <lists@...>

I have wondered whether I should learn ruby or python hence they are

16 messages 2012/06/11

[#396503] Syntax Highlighter — Intransition <transfire@...>

Would you agree that Ruby shouldn't lack for a syntax highlighting library

18 messages 2012/06/14

[#396589] Unsubcripe — Suresh Rajkumar <sureshrajchennai@...>

Unsubcipe my mail address from the group.

13 messages 2012/06/18

[#396615] Symbols and Strings... — Hal Fulton <rubyhacker@...>

Hello, all...

29 messages 2012/06/18
[#396620] Re: Symbols and Strings... — Eric Hodel <drbrain@...7.net> 2012/06/18

On Jun 18, 2012, at 15:09, Hal Fulton wrote:

[#396641] Re: Symbols and Strings... — Robert Klemme <shortcutter@...> 2012/06/19

On Tue, Jun 19, 2012 at 12:31 AM, Eric Hodel <drbrain@segment7.net> wrote:

[#396643] Re: Symbols and Strings... — Hal Fulton <rubyhacker@...> 2012/06/19

Personally, I don't have a problem with "reducing the contract"

[#396646] Re: Symbols and Strings... — Robert Klemme <shortcutter@...> 2012/06/19

On Tue, Jun 19, 2012 at 5:17 PM, Hal Fulton <rubyhacker@gmail.com> wrote:

[#396659] Re: Symbols and Strings... — Hal Fulton <rubyhacker@...> 2012/06/19

> > Freezing an object also reduces its contract.

[#396678] Re: Symbols and Strings... — Robert Klemme <shortcutter@...> 2012/06/20

On Tue, Jun 19, 2012 at 10:12 PM, Hal Fulton <rubyhacker@gmail.com> wrote:

[#396701] Re: Symbols and Strings... — Henry Maddocks <hmaddocks@...> 2012/06/20

[#396702] Re: Symbols and Strings... — Bartosz Dziewoński <matma.rex@...> 2012/06/20

2012/6/20 Henry Maddocks <hmaddocks@me.com>:

[#396703] Re: Symbols and Strings... — Henry Maddocks <hmaddocks@...> 2012/06/20

[#396710] Re: Symbols and Strings... — Jeremy Bopp <jeremy@...> 2012/06/20

On 06/20/2012 03:58 PM, Henry Maddocks wrote:

[#396627] Does ERB have recursive template support? — Todd Wei <lists@...>

I want to use ERB template library to do some code generation. It

10 messages 2012/06/19

[#396649] Looking for a better way to add a method to a core class than monkey patching — Iain Barnett <iainspeed@...>

Hi all,

17 messages 2012/06/19
[#396670] Re: Looking for a better way to add a method to a core class than monkey patching — Avdi Grimm <groups@...> 2012/06/20

Please do not monkey patch core libraries in gems, unless the *purpose* of

[#396685] Benchmark obsession? — "Jan E." <lists@...>

Hi,

23 messages 2012/06/20
[#396709] Re: Benchmark obsession? — Ryan Davis <ryand-ruby@...> 2012/06/20

[#396815] Array#sample is Set#sample and not Array#sample ! — Michel Demazure <lists@...>

Arrays are ordered, sets are not. Sampling an array should give random

11 messages 2012/06/25

[#396877] CSV.open problem, help please — Kaye Ng <lists@...>

This code doesn't seem to work

21 messages 2012/06/27

[#396896] Copying text from MS Word and wrapping in HTML - help please — Adam Holloway <lists@...>

Hi,

11 messages 2012/06/27

[#396966] Interactions between 'new' and 'initialize' ? — Cees Zeelenberg <lists@...>

In JRuby, I am extending an existing Java Class with a Ruby initialising

9 messages 2012/06/28

[#396975] stack level too deep for quicksort code — bei zhao <lists@...>

Hi, below is my quicksort implementation in ruby(using the first element

12 messages 2012/06/28

[#396996] Accessor Methods with a Twist — Doug Jolley <lists@...>

I am surprised that the code shown below returns, 'Doug'. I would

15 messages 2012/06/29

[#397001] ruby performance — anaray anaray <lists@...>

Hi,

33 messages 2012/06/29
[#397007] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/06/29

The MRI is, unfortunately, slow as balls, and there's not much you can

[#397008] Re: ruby performance — Hans Mackowiak <lists@...> 2012/06/29

Bartosz Dziewoナгki wrote in post #1066673:

[#397010] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/06/29

2012/6/29 Hans Mackowiak <lists@ruby-forum.com>:

[#397011] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/06/29

2012/6/29 Hans Mackowiak <lists@ruby-forum.com>:

[#397047] Re: ruby performance — "Andreas S." <lists@...> 2012/07/01

Bartosz Dziewoński wrote in post #1066681:

[#397048] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/07/01

2012/7/1 Andreas S. <lists@ruby-forum.com>:

[#397068] Re: ruby performance — Robert Klemme <shortcutter@...> 2012/07/02

On Sun, Jul 1, 2012 at 1:42 PM, Bartosz Dziewoナгki <matma.rex@gmail.com> wrote:

[#397086] Re: ruby performance — Dan Connelly <lists@...> 2012/07/02

Here's my contribution:

Deadlock in large vm_xmalloc while doing backtrace

From: Bill Paulson <lists@...>
Date: 2012-06-05 18:52:38 UTC
List: ruby-talk #396152
I work on a fairly large Ruby application that runs as a daemon,
accepting requests for test jobs and distributing them. It runs on Ruby
1.9.1-p429 currently on Linux Redhat 5. The job scheduler ("foreman")
occasionally locks up in one site or another with a stack trace for the
main thread that looks like the following (many levels of stack elided):

Thread 4 (process 5488):
#0  0x00d4d410 in __kernel_vsyscall ()
#1  0x00d1a0b9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00d15834 in _L_lock_92 () from /lib/libpthread.so.0
#3  0x00d1534a in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x0811d82e in native_mutex_lock (lock=0xfffffffc) at
thread_pthread.c:36
#5  0x081226a6 in rb_thread_call_with_gvl (func=0x8062b40 <gc_with_gvl>,
data1=0x81954e0) at thread.c:984
#6  0x0806282e in garbage_collect_with_gvl (objspace=0x81954e0) at
gc.c:598
#7  0x080628a6 in vm_xmalloc (objspace=0x81954e0, size=160796684) at
gc.c:624
#8  0x080de09e in rb_str_buf_new (capa=128) at string.c:722
#9  0x080d29bb in rb_enc_vsprintf (enc=0x0, fmt=0x81552ac "%s:%d:in
`%s'", ap=0xbf8f95e4 "X!?\t\"") at sprintf.c:1125
#10 0x080d2a50 in rb_vsprintf (fmt=0x81552ac "%s:%d:in `%s'",
ap=0xbf8f95e4 "X!?\t\"") at sprintf.c:1154
#11 0x080d2a7b in rb_sprintf (format=0x81552ac "%s:%d:in `%s'") at
sprintf.c:1164
#12 0x0810ef01 in vm_backtrace_each (th=<value optimized out>,
limit_cfp=0xb7fbea98, cfp=0xb7fbed98, file=0x9a42158
"/local/pete/current/com.rb", line_no=34, ary=174937756) at vm.c:714
#13 0x0810fd32 in rb_f_caller (argc=0, argv=0xb7f3f1f8) at vm.c:746
#14 0x0810dea6 in call_cfunc (func=0x810fca0 <rb_f_caller>,
recv=165378108, len=128, argc=-4, argv=0xb7f3f1f8) at
vm_insnhelper.c:286

The foreman's apparently trying to lock the Global Vm Lock to do a
malloc().
Several questions:
1) How to tell which thread owns the global_vm_lock? In gdb, printing
th->blocking_region_buffer for the main thread returns a pointer to
something, while another thread returns a zero value for
blocking_region_buffer. This suggests that the other thread owns the
global_vm_lock. On the other hand, if I dump the actual global_vm_lock,
the __data.__owner is 5488, the thread id for the main thread. I'm
thinking that this thread is trying to lock the GVL when it already has
it, but I'm not sure.
2) in frame 8, the rb_str_buf_new should be requesting 129 bytes, yet
the size parameter in frame 7 is more than 160 Megabytes! This huge
allocation appears to be what triggers garbage collection with gvl. How
this happens is a complete mystery.
3) within gdb, is it possible to figure out what the content of the
backtrace would be if it didn't hang? I know that ruby's backtrace stack
is somewhat complex - any pointers to simple-ish ways to find out where
the ruby interpreter is?

Thanks,
Bill Paulson

-- 
Posted via http://www.ruby-forum.com/.

In This Thread

Prev Next