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
+-- 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
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
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
> }
> }
>
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
}
}
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
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
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
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
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
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 !
My OS is RedHat 7.2.
Under RedHat 6.2 work best !
Petrica.
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
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
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
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
16 matches
Mail list logo