r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[RAMBO] The REBOL bug and enhancement database

Anton
12-May-2007
[2899]
:-) I don't know. I kept notes in a file, but don't feel it's developed 
enough to publish. I have a vague desire for a new function which 
handles this case (as well as other, more general, set operations).
Henrik
17-May-2007
[2900x2]
I'm hitting something that causes "invalid datatype during recycle" 
sometimes. I don't know yet what it is, but I thought the recycle 
bug was gone?
this is on View 1.3.2
Sunanda
17-May-2007
[2902]
Not gone entirely, but happens far less frequenty.

Which makes it hard to debug. Very deeply nested blocks with many 
inserts and removes can trigger it.
Henrik
17-May-2007
[2903]
I see. Unfortunately it seems I hit it close to every time I do a 
specific operation, but I have no time to debug it...
Sunanda
17-May-2007
[2904]
It's annoying!

Sometimes just moving code around can fix it. Try making some local 
words global, for example.
Henrik
17-May-2007
[2905]
it's actually a showstopper for me and exactly this code needs to 
be working in front of a customer in about 5 hours....
Oldes
17-May-2007
[2906]
I think it would be good to have an example with this bug for sending 
it to Carl
Henrik
17-May-2007
[2907x2]
the thing is that its db synchronization code (I'll think out loud 
here) and it's used in 5-6 different places. only in one place does 
it crash.
it seems to be accumulative, since it does not happen in exactly 
the same spot every tine and is possibly related to Rugby's do-every 
function, because it seems to happen whenever the do-every is executed.
Sunanda
17-May-2007
[2909]
To tell the truth, I don't know what I did with previous versions 
that actually worked. But doing *something* that affected garbage 
colection seemd to move the bug around. eg
-- global words not local words
-- xx: make block! 1000 not  xx: copy []
Henrik
17-May-2007
[2910x3]
http://rebol.hmkdesign.dk/db-sync.r<-- the db sync code is here.
sunanda, repeated clears of a block perhaps?
I had adopted the techinque of clearing a block before reusage instead 
of using a new make block! [] Maybe that's a bad idea.
Sunanda
17-May-2007
[2913]
Clear -- It's probably a good idea for this reason: the block will 
grow to its maximum size after repeated uses, and so saves time in 
memory allocation / block extension.
May be a bad idea if that max size is causing problems :-)
Henrik
17-May-2007
[2914]
allocated 100000 to the first block in the code and it's still running...
Sunanda
17-May-2007
[2915]
Let's hope that gets you through the demo....Good luck!
Henrik
17-May-2007
[2916x2]
it crashed again :-(
I think I'll panic and allocate 100000 elements to every single block 
in the database
Volker
17-May-2007
[2918]
i had such a problem with massive gui and async. Workarounded the 
following way: recycle is off permanently. there is a thread (do-every 
or such) which checks how much memory was allocated and when it is 
to much it recycled. crashing stopped.
Oldes
17-May-2007
[2919x2]
you may try  recycle/off   and do it yourself
:)
Volker
17-May-2007
[2921]
;like

if 20 * 1000 * 1000 + stats > last-mem [  recycle .  last-mem: stats 
]
;and that every 0.01 second or so.
Oldes
17-May-2007
[2922x2]
anyway.... using   make block! []  is quite useless
allocating 100000 elements for each block will slow down performance 
too much I guess
Volker
17-May-2007
[2924]
Its only for demo, and 3:30 left. better waste memory than a contract..
Henrik
17-May-2007
[2925]
with recycle forced off, it seems to be running OK for now
Oldes
17-May-2007
[2926]
just make sure you recycle sometimes... if it's long running process
Henrik
17-May-2007
[2927x2]
it will not run more than 2-3 hours today :-)
ok, it ran perfectly. the demo was approved and the product goes 
live on Wednesday.
Sunanda
17-May-2007
[2929]
Good news!
So you have a few days to fix the recycle problem for real :-)
Henrik
17-May-2007
[2930x2]
actually I'm going to look at a printerserver, which deadlocks, if 
two people are trying to print too close to eachother.
it's quite simple, I think it was based on some cookbook code. moving 
to ports for that...
Graham
18-May-2007
[2932]
this is an annoyance ... but 'to-local-file drops the trailing slash 
for directories
Henrik
18-May-2007
[2933]
confirmed under OSX
Graham
18-May-2007
[2934]
Rambo it ??
Henrik
18-May-2007
[2935]
yep
Graham
18-May-2007
[2936]
Ok
Henrik
18-May-2007
[2937]
it's not a problem the other way around, so yes, it's inconsistent.
Graham
18-May-2007
[2938]
Done.
Sunanda
19-May-2007
[2939]
Henrik, I see regular "Crash Should not happen" on one of my scripts, 
so you are not alone.
Gabriele
19-May-2007
[2940]
anyone willing to find a way to reproduce it?
Sunanda
19-May-2007
[2941]
I don't have anything trivial that will trigger the bug. It's a big 
application that can run for a while before crashing....And the code 
has been tweaked to minimise the occurrence of the problem.
Gabriele
19-May-2007
[2942x2]
i feel the pain - same problem i had with chord.
but at this point (focused on R3) RT does not have enough resources 
to debug a big app.
Henrik
19-May-2007
[2944]
well, if it's about memory allocation and clean up, would there not 
be a way to torture it? What's the worst possible way to stress the 
garbage collector?
Gabriele
19-May-2007
[2945x2]
recycle/torture
but i guess it won't show in that case...
Henrik
19-May-2007
[2947]
something that randomly creates a large amount of blocks, inserts, 
deletes, manipulates, copies and does various other things.
Oldes
19-May-2007
[2948]
just found, that youtube do not respect HTTP1.0 protocol => sends 
HTTP1.1 303 response even if client require HTTP1.0 (which is Rebol 
case). As there is no response specified for 303 in Rebol's http 
handler, it can be fixed using:

use [tmp][

 tmp: select second get in system/schemes/http/handler 'open to-set-word 
 'response-actions
	if none? find tmp 303
	insert tmp reduce [303 select tmp 302]
]