[#5219] Segmentation fault in timeout.rb — Michel Pastor <K@...>

Hi,

18 messages 2005/06/16
[#5220] Re: Segmentation fault in timeout.rb — Eric Hodel <drbrain@...7.net> 2005/06/16

[#5221] Re: Segmentation fault in timeout.rb — Michel Pastor <K@...> 2005/06/16

On Fri, 17 Jun 2005 05:03:18 +0900

[#5223] Re: Segmentation fault in timeout.rb — nobu.nokada@... 2005/06/17

Hi,

[#5296] Subversion — Shugo Maeda <shugo@...>

Hi,

64 messages 2005/06/30
[#5297] Re: Subversion — Curt Hibbs <curt@...> 2005/06/30

Shugo Maeda wrote:

[#5298] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/06/30

Curt Hibbs wrote:

[#5301] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, Nikolai Weibull

[#5304] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/06/30

Austin Ziegler wrote:

[#5305] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, Nikolai Weibull

[#5307] Re: Subversion — mathew <meta@...> 2005/06/30

Austin Ziegler wrote:

[#5308] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, mathew <meta@pobox.com> wrote:

[#5311] Re: Subversion — mathew <meta@...> 2005/07/01

Austin Ziegler wrote:

[#5323] Re: Subversion — Austin Ziegler <halostatue@...> 2005/07/01

On 7/1/05, mathew <meta@pobox.com> wrote:

[#5325] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/07/01

Austin Ziegler wrote:

Re: Segmentation fault in timeout.rb

From: Michel Pastor <K@...>
Date: 2005-06-17 16:55:01 UTC
List: ruby-core #5239
On Fri, 17 Jun 2005 11:51:07 +0900
nobu.nokada@softhome.net wrote:

> Do you have the core file at that time?
> If you have, try to run `gdb /usr/bin/ruby core' and check
> curr_thread, curr, *curr_thread, *curr and ruby_current_node in
> rb_thread_schedule().

Unfortunately ruby doesn't aborts when compiled with debug => no core
but

> gdb ruby
Starting program: /usr/bin/ruby script/server
=> Rails application started on http://0.0.0.0:3000
[2005-06-17 18:47:06] INFO  WEBrick 1.3.1
[2005-06-17 18:47:06] INFO  ruby 1.8.2 (2004-12-25) [i686-linux]
[2005-06-17 18:47:06] INFO  WEBrick::HTTPServer#start: pid=4501 port=3000
[Thread debugging using libthread_db enabled]
[New Thread -1209562464 (LWP 4501)]
[New Thread -1221100624 (LWP 4504)]
[New Thread -1229493328 (LWP 4505)]
[Thread -1229493328 (LWP 4505) exited]
[Thread -1221100624 (LWP 4504) exited]
X.X.X.X - - [17/Jun/2005:18:47:12 CEST] "GET /films/list HTTP/1.1" 500 5539
- -> /films/list
deadlock 0xb75dae98: run:-  -:0
deadlock 0xb7e73798: sleep:ST(1119026834.110121) (main) - /usr/lib/ruby/1.8/webrick/server.rb:88
deadlock 0xb774d0a0: sleep:T(1119026863.012682)  - /usr/lib/ruby/1.8/timeout.rb:41

Program received signal SIGINT, Interrupt.
[Switching to Thread -1209562464 (LWP 4501)]
0x080573f6 in rb_thread_save_context (th=0x83cf058) at eval.c:9837
9837        MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);

(gdb) bt
#0  0x080573f6 in rb_thread_save_context (th=0x83cf058) at eval.c:9837
#1  0x08058141 in rb_thread_schedule () at eval.c:10394
#2  0x08065ab0 in ruby_cleanup (ex=0) at eval.c:11723
[...]

(gdb) up
#1  0x08058141 in rb_thread_schedule () at eval.c:10394
10394           if (THREAD_SAVE_CONTEXT(curr)) {

(gdb) p curr_thread
$1 = 0x83cf058

(gdb) p curr
$2 = 0x83cf058

(gdb) p *curr_thread
$3 = {next = 0x8108f38, prev = 0x8108f38, context = {{__jmpbuf = {1, 0, 135302968, -1073811592, 
        -1073812112, 134578514}, __mask_was_saved = 0, __saved_mask = {__val = {1869888032, 
          1767862116, 1936549236, 1866080300, 1919247474, 540949792, 1936683042, 1869182057, 664174, 
          0, 0, 0, 0, 0, 953, 138212728, 3086547368, 1701060640, 1852383334, 1634301033, 1702521196, 
          744778024, 1835101728, 1075849573, 1025533033, 996436256, 1634615328, 1025533293, 
          1835101728, 1852121189, 3070233188, 1852121120}}}}, result = 0, stk_len = 17395, 
  stk_max = 21683, stk_ptr = 0x86bd1e8, stk_pos = 0xbffeed2c, frame = 0xbffef360, scope = 0xb75daec0, 
  dyna_vars = 0x0, block = 0x8976660, iter = 0xbffeef90, tag = 0xbffeefa0, klass = 3085002688, 
  wrapper = 0, cref = 0xb7e16784, flags = 1024, node = 0xb7e176e8, tracing = 0, errinfo = 4, 
  last_status = 4, last_line = 4, last_match = 4, safe = 0, status = THREAD_TO_KILL, wait_for = 0, 
  fd = 0, readfds = {__fds_bits = {256, 0 <repeats 31 times>}}, writefds = {__fds_bits = {
      0 <repeats 32 times>}}, exceptfds = {__fds_bits = {0 <repeats 32 times>}}, select_value = 1, 
  delay = 1119026863.012682, join = 0x0, abort = 0, priority = 0, thgroup = 0, locals = 0x83cf450, 
  thread = 3077886112}

(gdb) p *curr
$4 = {next = 0x8108f38, prev = 0x8108f38, context = {{__jmpbuf = {1, 0, 135302968, -1073811592, 
        -1073812112, 134578514}, __mask_was_saved = 0, __saved_mask = {__val = {1869888032, 
          1767862116, 1936549236, 1866080300, 1919247474, 540949792, 1936683042, 1869182057, 664174, 
          0, 0, 0, 0, 0, 953, 138212728, 3086547368, 1701060640, 1852383334, 1634301033, 1702521196, 
          744778024, 1835101728, 1075849573, 1025533033, 996436256, 1634615328, 1025533293, 
          1835101728, 1852121189, 3070233188, 1852121120}}}}, result = 0, stk_len = 17395, 
  stk_max = 21683, stk_ptr = 0x86bd1e8, stk_pos = 0xbffeed2c, frame = 0xbffef360, scope = 0xb75daec0, 
  dyna_vars = 0x0, block = 0x8976660, iter = 0xbffeef90, tag = 0xbffeefa0, klass = 3085002688, 
  wrapper = 0, cref = 0xb7e16784, flags = 1024, node = 0xb7e176e8, tracing = 0, errinfo = 4, 
  last_status = 4, last_line = 4, last_match = 4, safe = 0, status = THREAD_TO_KILL, wait_for = 0, 
  fd = 0, readfds = {__fds_bits = {256, 0 <repeats 31 times>}}, writefds = {__fds_bits = {
      0 <repeats 32 times>}}, exceptfds = {__fds_bits = {0 <repeats 32 times>}}, select_value = 1, 
  delay = 1119026863.012682, join = 0x0, abort = 0, priority = 0, thgroup = 0, locals = 0x83cf450, 
  thread = 3077886112}

(gdb) p ruby_current_node
$5 = (struct RNode *) 0xb7e176e8

thx
- Michel

In This Thread