Re: [AOLSERVER] Segmentation fault

2002-01-18 Thread Jeff Rogers
On Thu, 17 Jan 2002 13:15:51 -0600, Rob Mayoff <[EMAIL PROTECTED]> wrote: >+-- On Jan 17, Daniel P. Stasinski said: >> My second suggestion was meant as humor. The reason that your >> server crashes is because your code is flawed. > >Obviously his infinite-recursion example will always f

Re: [AOLSERVER] Segmentation fault

2002-01-17 Thread Rob Mayoff
+-- On Jan 17, Daniel P. Stasinski said: > My second suggestion was meant as humor. The reason that your > server crashes is because your code is flawed. Obviously his infinite-recursion example will always fail in some way. But his real code might not recurse infinitely. It might simpl

Re: [AOLSERVER] Segmentation fault

2002-01-17 Thread Daniel P. Stasinski
tical Laboratories [EMAIL PROTECTED] - Original Message - From: "Chiriac Petrica Clement" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 17, 2002 3:52 AM Subject: Re: [AOLSERVER] Segmentation fault Thanks for the help, Daniel . I put ns_param s

Re: [AOLSERVER] Segmentation fault

2002-01-17 Thread Chiriac Petrica Clement
Thanks for the help, Daniel . I put ns_param stacksize [expr 128*1024*16] and works. "Daniel P. Stasinski" wrote: > > The only two solutions i see so far is maybe: > > proc x {} { > puts [info level] > if { [catch { x }] } { > return > } > } >

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread David Walker
My test machine crashes on level 34 in my test. The code below prevents the crash. No error is shown because of the catch statement. proc x {} { if {[info level] > 30} { error "recursion level > 30 in [info level [info level]]" } ns_write [info level] catch { x } }

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Peter M. Jansson
I bet this wouldn't catch anything. It looks to me like the segfault happens as a result of blowing the stack, and since the function doesn't do anything that would cause an error, it won't pop the catch. On 1/16/02 12:07 PM, "Daniel P. Stasinski" <[EMAIL PROTECTED]> wrote: > if { [catch

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Patrick Spence
In <006801c19eb0$3684f380$[EMAIL PROTECTED]>, on 01/16/02 at 10:07 AM, "Daniel P. Stasinski" <[EMAIL PROTECTED]> said: >The only two solutions i see so far is maybe: >proc x {} { >puts [info level] >if { [catch { x }] } { >return >} >} >Or, ther

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Daniel P. Stasinski
The only two solutions i see so far is maybe: proc x {} { puts [info level] if { [catch { x }] } { return } } Or, there is always... ns_section "ns/threads" ns_param stacksize \ 1000

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Peter M. Jansson
Do you think the proc you previously sent is an example of the problem, or is it just something else that generates a segmentation fault? The code you previously sent has the error I've mentioned, which will cause a segmentation fault. If you have a similar piece of code, you need to fix it in a

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Chiriac Petrica Clement
I have a template mechanism for generate html static pages. I can't detect where is "Segmentation fault". "Peter M. Jansson" wrote: > > Infinite loops are platform independent. Your code has an infinite loop. > What are you trying to do? > > On 1/16/02 12:38 PM, "Chiriac Petrica Clement" <[EMAI

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Peter M. Jansson
Infinite loops are platform independent. Your code has an infinite loop. What are you trying to do? On 1/16/02 12:38 PM, "Chiriac Petrica Clement" <[EMAIL PROTECTED]> wrote: > My OS is RedHat 7.2. > > Under RedHat 6.2 work best !

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Chiriac Petrica Clement
My OS is RedHat 7.2. Under RedHat 6.2 work best ! Petrica.

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Peter M. Jansson
Your code doesn't do any work -- it's the same as: proc x {} { set somevalue 1 while 1 { puts $somevalue incr somevalue } } Except that my version won't consume the stack until the process breaks. It still doesn't do any work! (You get th

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Chiriac Petrica Clement
My code is an example for real problem. How can change this value "50" ? Why produce Segmentation fault ? "Peter M. Jansson" wrote: > > Don't do that! You have an infinite recursion here. You need to include > some condition in the code which will stop the recursive calls to "x" at > som

Re: [AOLSERVER] Segmentation fault

2002-01-16 Thread Peter M. Jansson
Don't do that! You have an infinite recursion here. You need to include some condition in the code which will stop the recursive calls to "x" at some point (preferably before 50 levels of recursion). On 1/16/02 12:08 PM, "Chiriac Petrica Clement" <[EMAIL PROTECTED]> wrote: > This code produce

[AOLSERVER] Segmentation fault

2002-01-16 Thread Chiriac Petrica Clement
This code produce "Segmentation fault" proc x {} { puts [info level] catch { x } } In log : 1 2 3 4 ... 48 49 50 51 Segmentation fault Who can help me ? Is urgent. -- Petrica Clement Chiriac