Discussion:
[ast-developers] Need fix for memoryleak in ksh
Michal Hlavinka
2014-08-18 10:47:05 UTC
Permalink
Hi,
WIth reference to the post,
http://lists.research.att.com/pipermail/ast-developers/2014q1/003815.html
is there a ksh version with fix for the memory leak issue.
I would be grateful for any help.
Thanks & Regards,
Sujatha
Hi,

as far as I know, latest beta realeases should have the referenced
memory leak fixed, but there is no version that would fix all known
memory leaks.

Michal
Michal Hlavinka
2014-08-19 15:08:30 UTC
Permalink
Yes, I wrote that the reproducer he referenced is fixed in latest
version, but not all reported memory leaks were fixed and as I've tested
it, some were fixed and reappeared later.

See reproducer: test48.sh it tests several leaks.
The reproducers are in the
if [ "$1" = foo ];
sections on top. The rest is just loop and memory meter.

Also if you plan to release stable version, there are still some issues
remaining that I've reported some time ago.

See attached reproducers:

test53.sh - builtins -d foo must be called several times

test54.sh - ksh hangs when pipe buffer is full, can pass on some systems
that has wmem_default set to high values ( sysctl -w
net.core.wmem_default=65536 )

test56.sh - substitution waits for background process, this is change in
behaviour compared to 2012-08-01 (and older), also probably another
incompatibility with fake bash. I'm not sure whether this change was
really intentional and whether you want to keep it that way.

test57.sh - reading file through command substitution does not work when
stdout and/or stderr is closed

test71.sh - unsetting running function from another one crashes ksh

test73.sh - wrong return code after pipe in function

test75.sh - wrong return code after pipe in ``

When I run tests from the sources, following tests fail:

test namespace(shcomp) begins at 2014-08-19+16:29:42
/tmp/tmpgX9z6DF.0By/shcomp-namespace.ksh[127]: .a.b.x_t: not found [No
such file or directory]
/tmp/tmpgX9z6DF.0By/shcomp-namespace.ksh[128]: var.pi: not found [No
such file or directory]
discipline functions for types in namespace not working
/tmp/tmpgX9z6DF.0By/shcomp-namespace.ksh[138]: .com.foo.test1.y_t: not
found [No such file or directory]
/tmp/tmpgX9z6DF.0By/shcomp-namespace.ksh[139]: v.x.pr: not found [No
such file or directory]
shcomp-namespace.ksh[139]: _.__ not working with nested types
in a namespace


test signal begins at 2014-08-19+16:31:16
./shtests[333]: eval: line 1: 26930: Memory fault(coredump)

test treemove(shcomp) begins at 2014-08-19+16:36:25
/home/mhlavink/gitf/kshbeta/ksh-20140625/arch/linux.i386-64/bin/ksh:
line 2: syntax error at line 6: `function' unexpected
[78]: typeset -C c=(objstack_t ost=(typeset -l -i
st_n=1;st[0]=(obj=(typeset -l -i val=5)))) is not idempotent


Also there is one for which I have no reproducer and no backtrace. Since
last year, when I try to compile latest beta release, it fails because
ksh crashes all the time.

Let me know if you need more information to any of those reproducers
I am not showing a leak with 2014-06-25. Here is the output with the
middle lines omitted.
I hope to have an official release this fall so send any problems ASAP.
However, some new features (such as programmable completion and json
input are likely to have errors which will be resolved with a patch.
Version ABIJM 93v- 2014-06-25
total kB 15648 2076 368
0.2324 total kB 15648 2192 396
0.2289 total kB 15648 2192 396
0.2278 total kB 15648 2192 396
....
0.2273 total kB 15648 2196 400
0.2261 total kB 15648 2196 400
0.2263 total kB 15648 2196 400
0.3453 total kB 15648 2196 400
0.2953 total kB 15648 2196 400
On Mon, Aug 18, 2014 at 6:47 AM, Michal Hlavinka <mhlavink at redhat.com
Hi,
WIth reference to the post,
http://lists.research.att.com/__pipermail/ast-developers/__2014q1/003815.html
<http://lists.research.att.com/pipermail/ast-developers/2014q1/003815.html>
is there a ksh version with fix for the memory leak issue.
I would be grateful for any help.
Thanks & Regards,
Sujatha
Hi,
as far as I know, latest beta realeases should have the referenced
memory leak fixed, but there is no version that would fix all known
memory leaks.
Michal
_________________________________________________
ast-developers mailing list
ast-developers at lists.research.__att.com
<mailto:ast-developers at lists.research.att.com>
http://lists.research.att.com/__mailman/listinfo/ast-__developers
<http://lists.research.att.com/mailman/listinfo/ast-developers>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test48.sh
Type: application/x-shellscript
Size: 2517 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test53.sh
Type: application/x-shellscript
Size: 482 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test54.sh
Type: application/x-shellscript
Size: 386 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test56.sh
Type: application/x-shellscript
Size: 496 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test57.sh
Type: application/x-shellscript
Size: 576 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test71.sh
Type: application/x-shellscript
Size: 320 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test73.sh
Type: application/x-shellscript
Size: 546 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test75.sh
Type: application/x-shellscript
Size: 270 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140819/45cf8777/attachment-0015.bin>
Loading...