[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

stack level too deep on ia64

Eric Schwartz

11/10/2003 9:33:00 PM

I'm working on an ia64 box to develop a MySQL/Ruby app, and I'm
getting not very helpful SystemStackError traces:

/usr/lib/ruby/1.8/thread.rb:325: stack level too deep (SystemStackError)
from /usr/lib/ruby/1.8/DBD/Mysql/Mysql.rb:34:in `require'
from /usr/lib/ruby/1.8/DBD/Mysql/Mysql.rb:34
from /usr/lib/ruby/1.8/dbi/dbi.rb:465:in `require'
from /usr/lib/ruby/1.8/dbi/dbi.rb:465:in `load_driver'
from /usr/lib/ruby/1.8/dbi/dbi.rb:459:in `each'
from /usr/lib/ruby/1.8/dbi/dbi.rb:459:in `load_driver'
from /usr/lib/ruby/1.8/dbi/dbi.rb:393:in `_get_full_driver'
from /usr/lib/ruby/1.8/dbi/dbi.rb:373:in `connect'
... 19 levels...
from /usr/lib/lts/cgi-bin/newplan:169:in `displayNewPlan'
from /usr/lib/lts/cgi-bin/newplan:168:in `out'
from /usr/lib/lts/cgi-bin/newplan:168:in `displayNewPlan'
from /usr/lib/lts/cgi-bin/newplan:275

so far, my efforts to reproduce this in a simple testcase have failed,
possibly due to my ignorance of what those missing 19 levels are. How
can I force ruby to display them?

-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
4 Answers

Eric Schwartz

11/10/2003 10:12:00 PM

0

Eric Schwartz <emschwar@pobox.com> writes:
> I'm working on an ia64 box to develop a MySQL/Ruby app, and I'm
> getting not very helpful SystemStackError traces:

Okay, to follow up on my own post, I did this in irb:

irb(main):001:0> begin
irb(main):002:1* raise SystemStackError
irb(main):003:1> rescue SystemStackError => sse
irb(main):004:1> $sse = sse
irb(main):005:1> end

and played with $sse and found it has a backtrace() method. So on a
wild guess, I tried:

begin
code_that_raises_sse()
rescue SystemStackError => sse
puts "Caught SystemStackError. Backtrace:"
sse.backtrace.each { |line|
puts line.to_s
}
puts "end of backtrace"
end

Unfortunately, all that shows is that the missing 19 lines are a
perfectly ordinary backtrace that has a bunch of nested calls to a CGI
object for output. This exact same code works fine on i386, leading
me to believe this might be somehow related to the thread in:

http://lists.debian.org/debian-powerpc/2003/debian-powerpc-200310/msg...

Specifically, this looks suspicious:

"It's fine as long as the limit on the stacksize is <= 4194303 KiB,
but dies instantly if the stack size is 4194304 KiB or higher. This
is the point where more than 32 bits are needed to store an address."

(in http://lists.debian.org/debian-powerpc/2003/debian-powerpc-200310/msg...)

I've tried setting the ulimit at 4194303 as suggested, but it still
fails. Suggestions of how to approach this are welcome.

$ ruby -v
ruby 1.8.0 (2003-10-05) [ia64-linux]

-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.

ts

11/11/2003 12:35:00 PM

0

>>>>> "E" == Eric Schwartz <emschwar@pobox.com> writes:

E> I've tried setting the ulimit at 4194303 as suggested, but it still
E> fails. Suggestions of how to approach this are welcome.

What is the value of STACK_LEVEL_MAX ?

See the macro CHECK_STACK in gc.c


--

Guy Decoux

Eric Schwartz

11/11/2003 6:00:00 PM

0

ts <decoux@moulon.inra.fr> writes:
>>>>>> "E" == Eric Schwartz <emschwar@pobox.com> writes:
>
> E> I've tried setting the ulimit at 4194303 as suggested, but it still
> E> fails. Suggestions of how to approach this are welcome.
>
> What is the value of STACK_LEVEL_MAX ?

49152 (see below)

> See the macro CHECK_STACK in gc.c

I suspect the interesting bit is actually in Init_stack(), where there
is this section:

#ifdef __ia64__
/* ruby crashes on IA64 if compiled with optimizer on */
/* when if STACK_LEVEL_MAX is greater than this magic number */
/* I know this is a kludge. I suspect optimizer bug */
#define IA64_MAGIC_STACK_LIMIT 49152
if (STACK_LEVEL_MAX > IA64_MAGIC_STACK_LIMIT)
STACK_LEVEL_MAX = IA64_MAGIC_STACK_LIMIT;
#endif

-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.

library101

12/14/2010 4:34:00 PM

0

On Dec 13, 6:22 pm, Kangaroo Court Australia
<illusionz.ad...@gmail.com> wrote:
> On Dec 14, 3:35 am, library101 <h.s.nair...@gmail.com> wrote:
>
>
>
>
>
> > On Dec 13, 7:13 am, Kangaroo Court Australia <nwn.webmas...@gmail.com>
> > wrote:
>
> > >http://www.youtube.com/watch?v=a...
>
> > > The young perish and the old linger, withering" -Tolkien
>
> > > Where the old fails the young must succeed.
>
> > > Severn Suzuki addresses a failing United Nations
>
> > > ==================================http://kangaroocourtaustralia.x24hr.com/cms/index.php?/topi......
>
> > Don't worry. The situation is not that bad. These conferences are
> > symbolic in what they do. Not necessarily what they say. Nature is not
> > about to disappear. It has not disappeared all this time in history.
> > More life will be created where something disappears for whatever
> > reason. The disparity in the world is there because everybody is not
> > equal. But everyone has a way of improving their situation and getting
> > ahead if they follow the 'rules'. I believe that is the best possible
> > solution to inequality. Keep searching for answers like you are doing
> > now. There is nothing wrong with that. - HSN.
>
> following their rules is like Lucy trick on charlie brown- Hide quoted text -
>
> - Show quoted text -

I am talking about rules for going 'higher' in life (towards God). The
path is full of traps for the naive and unprepared searcher. Some
people fall into all the traps. It is not easy at all. That is why the
'rules' are there. To save you the grief of falling into all the traps
laid on the way. Regards, - HSN.