Could someone tell me why the file object in Filesystem.Tar (or rather the tar object it resides in I'm guessing) isn't removed immediately.
sizeof(Stdio.get_all_active_fd());
(1) Result: 10
object f=Filesystem.Tar("../../test.tar"); sizeof(Stdio.get_all_active_fd());
(2) Result: 11
destruct(f);
(3) Result: 0
sizeof(Stdio.get_all_active_fd());
(4) Result: 11
Is it removed if you do a gc?
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-23 03:45: Subject: Where's the extra reference.
Could someone tell me why the file object in Filesystem.Tar (or rather the tar object it resides in I'm guessing) isn't removed immediately.
sizeof(Stdio.get_all_active_fd());
(1) Result: 10
object f=Filesystem.Tar("../../test.tar"); sizeof(Stdio.get_all_active_fd());
(2) Result: 11
destruct(f);
(3) Result: 0
sizeof(Stdio.get_all_active_fd());
(4) Result: 11
/ Martin Nilsson (saturator)
First try gives:
e/7.5/src/stralloc.c:971: Fatal error: Pike was in GC stage -1 when this fatal occured: No free is allowed in this gc pass. Backtrace at time of fatal: HilfeInput:1: object(HilfeInput)->___HilfeWrapper() /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1937: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->eva luate("mixed ___HilfeWrapper() { return _locate_references((([mapping(stri ng:object)]___hilfe)->f)); ; }",1) /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1710: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->par se_expression(object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.p mod:727)) /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1332: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->add _buffer("_locate_references(f);") /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1283: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->add _input_line("_locate_references(f);") /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:2061: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->cre ate() /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:88: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod)->StdinHil fe()
/ Martin Nilsson (saturator)
Previous text:
2003-09-23 15:46: Subject: Where's the extra reference.
I can't see any obvious cyclic references. My tip is to use _locate_references() on the interesting objects.
/ Martin Stjernholm, Roxen IS
Bad. Try again now.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-23 21:10: Subject: Where's the extra reference.
First try gives:
e/7.5/src/stralloc.c:971: Fatal error: Pike was in GC stage -1 when this fatal occured: No free is allowed in this gc pass. Backtrace at time of fatal: HilfeInput:1: object(HilfeInput)->___HilfeWrapper() /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1937: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->eva luate("mixed ___HilfeWrapper() { return _locate_references((([mapping(stri ng:object)]___hilfe)->f)); ; }",1) /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1710: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->par se_expression(object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.p mod:727)) /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1332: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->add _buffer("_locate_references(f);") /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1283: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->add _input_line("_locate_references(f);") /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:2061: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->cre ate() /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:88: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod)->StdinHil fe()
/ Martin Nilsson (saturator)
Are you referring to Filesystem.Tar or _locate_references?
As for the information from _locate_references I think it's not that hard to weed out the interesting parts. It'd be really nice to have one that returned the located references in some kind of structure, though.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-23 22:24: Subject: Where's the extra reference.
Now it works. Though I'd say there is a bit too much information to be of any direct help...
/ Martin Nilsson (saturator)
Now it works to use _locate_references on Filesystem.Tar and its subobjects.
/ Martin Nilsson (saturator)
Previous text:
2003-09-23 23:34: Subject: Where's the extra reference.
Are you referring to Filesystem.Tar or _locate_references?
As for the information from _locate_references I think it's not that hard to weed out the interesting parts. It'd be really nice to have one that returned the located references in some kind of structure, though.
/ Martin Stjernholm, Roxen IS
First try gives:
e/7.5/src/stralloc.c:971: Fatal error: Pike was in GC stage -1 when this fatal occured: No free is allowed in this gc pass. Backtrace at time of fatal: HilfeInput:1: object(HilfeInput)->___HilfeWrapper() /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1937: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->eva luate("mixed ___HilfeWrapper() { return _locate_references((([mapping(stri ng:object)]___hilfe)->f)); ; }",1) /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1710: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->par se_expression(object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.p mod:727)) /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1332: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->add _buffer("_locate_references(f);") /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1283: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->add _input_line("_locate_references(f);") /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:2061: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:1982)->cre ate() /home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod:88: object(/home/nilsson/Pike/7.5/lib/modules/Tools.pmod/Hilfe.pmod)->StdinHil fe()
/ Martin Nilsson (saturator)
Previous text:
2003-09-23 15:46: Subject: Where's the extra reference.
I can't see any obvious cyclic references. My tip is to use _locate_references() on the interesting objects.
/ Martin Stjernholm, Roxen IS
pike-devel@lists.lysator.liu.se