Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perldiag deficiencies (and a debugger oddity) #661

Closed
p5pRT opened this issue Sep 30, 1999 · 10 comments
Closed

perldiag deficiencies (and a debugger oddity) #661

p5pRT opened this issue Sep 30, 1999 · 10 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Sep 30, 1999

Migrated from rt.perl.org#1541 (status was 'resolved')

Searchable as RT1541$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 30, 1999

From mjtg@cus.cam.ac.uk


Out of memory!
Out of memory!
Callback called exit at bin/cjc.stats line 1, <IN> chunk 9.
END failed--cleanup aborted at bin/cjc.stats line 1, <IN> chunk 9.


a) The message "Out of memory!" is not listed in perldiag in
  perl5.005 onwards, tho' it is still listed in perl5.004_05 . Has
  the entry been removed erroneously, or should the message have been
  replaced by

  "Out of memory during request for %s" ?

b) I don't understand the explanation for "Callback called exit"​:

  (F) A subroutine invoked from an external package via
  perl_call_sv() exited by calling exit.

  My program is pure Perl, with no "external package" involved,
  and no explicit use of "exit".

c) Similarly, I don't understand the last message​:

  END failed--cleanup aborted
  (F) An untrapped exception was raised while executing an
  END subroutine. The interpreter is immediately exited.

  My program contains no END {} subroutine.

Presumably the last two really mean "Perl's internal data structures
are in a twist", and perhaps indicate bugs in Perl. Is it worth
seeing if I can generate a smaller test case?

And the original problem seems to be another example of "debugger causing
space leak", which I previously reported long long ago (but without a
useful test case). The program uses a constant 3784K when not under
debug, and a constant 5256K under debug if no breakpoints are set.
But if conditional breakpoints are set, the size expands steadily until
swap runs out. Research on this continues.

Mike Guy

% perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  Platform​:
  osname=solaris, osvers=2.6, archname=sun4-solaris
  uname=''
  hint=previous, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  Compiler​:
  cc='gcc', optimize='-O', gccversion=2.7.2.3
  cppflags='-I/usr/local/include -I/opt/local/include -DREG_INFTY=22786'
  ccflags ='-I/usr/local/include -I/opt/local/include -DREG_INFTY=22786'
  stdchar='unsigned char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
  libpth=/usr/local/lib /opt/local/lib /lib /usr/lib /usr/ccs/lib
  libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
  libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-fpic', lddlflags='-G -L/usr/local/lib -L/opt/local/lib'

Characteristics of this binary (from libperl)​:
  Built under solaris
  Compiled at Mar 30 1999 14​:22​:18
  @​INC​:
  /home/mjtg/perl5.005_03/lib
  /home/mjtg/perl5.005_03/lib
  /home/mjtg/perl5.005_03/lib
  .

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 30, 1999

From @gsar

On Thu, 30 Sep 1999 14​:31​:28 BST, "M.J.T. Guy" wrote​:

a) The message "Out of memory!" is not listed in perldiag in
perl5.005 onwards, tho' it is still listed in perl5.004_05 . Has
the entry been removed erroneously, [...]

I think so.

[two other errors]

Presumably the last two really mean "Perl's internal data structures
are in a twist", and perhaps indicate bugs in Perl. Is it worth
seeing if I can generate a smaller test case?

Please do.

Sarathy
gsar@​activestate.com

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 30, 1999

From @gsar

On Thu, 30 Sep 1999 14​:31​:28 BST, "M.J.T. Guy" wrote​:

a) The message "Out of memory!" is not listed in perldiag in
perl5.005 onwards, tho' it is still listed in perl5.004_05 . Has
the entry been removed erroneously, or should the message have been
replaced by

  "Out of memory during request for %s"      ?

FYI.

Sarathy
gsar@​activestate.com

Inline Patch
-----------------------------------8<-----------------------------------
Change 4264 by gsar@auger on 1999/09/30 17:59:26

	re-add missing "Out of memory!" entry

Affected files ...

... //depot/perl/pod/perldiag.pod#97 edit

Differences ...

==== //depot/perl/pod/perldiag.pod#97 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod.~1~	Thu Sep 30 10:59:30 1999
+++ perl/pod/perldiag.pod	Thu Sep 30 10:59:30 1999
@@ -2141,6 +2141,12 @@
 For example, if you say "*foo *foo" it will be interpreted as
 if you said "*foo * 'foo'".
 
+=item Out of memory!
+
+(X) The malloc() function returned 0, indicating there was insufficient
+remaining memory (or virtual memory) to satisfy the request.  Perl
+has no option but to exit immediately.
+
 =item Out of memory for yacc stack
 
 (F) The yacc parser wanted to grow its stack so it could continue parsing,
End of Patch.
@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 30, 1999

From [Unknown Contact. See original ticket]

On Thu, 30 Sep 1999 at 11​:18​:05 -0700, Gurusamy Sarathy wrote​:

+=item Out of memory!
+
+(X) The malloc() function returned 0, indicating there was insufficient
+remaining memory (or virtual memory) to satisfy the request. Perl
+has no option but to exit immediately.

Should $^M be mentioned here?

Ian

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 30, 1999

From @gsar

On Thu, 30 Sep 1999 23​:20​:43 BST, Ian Phillipps wrote​:

On Thu, 30 Sep 1999 at 11​:18​:05 -0700, Gurusamy Sarathy wrote​:

+=item Out of memory!
+
+(X) The malloc() function returned 0, indicating there was insufficient
+remaining memory (or virtual memory) to satisfy the request. Perl
+has no option but to exit immediately.

Should $^M be mentioned here?

$^M doesn't change what happens--Perl always exits after emitting the
message.

Sarathy
gsar@​activestate.com

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 30, 1999

From [Unknown Contact. See original ticket]

Ian Phillipps writes​:

On Thu, 30 Sep 1999 at 11​:18​:05 -0700, Gurusamy Sarathy wrote​:

+=item Out of memory!
+
+(X) The malloc() function returned 0, indicating there was insufficient
+remaining memory (or virtual memory) to satisfy the request. Perl
+has no option but to exit immediately.

Should $^M be mentioned here?

Definitely not! This message comes from non-Perl-malloc. $^M is
active with Perl-malloc only.

Ilya

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 1, 1999

From @gsar

On Thu, 30 Sep 1999 21​:21​:15 EDT, Ilya Zakharevich wrote​:

+=item Out of memory!
[...]
This message comes from non-Perl-malloc.

malloc.c​:1016​: PerlIO_puts(PerlIO_stderr(),"Out of memory!\n");

Sarathy
gsar@​activestate.com

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 1, 1999

From [Unknown Contact. See original ticket]

Ilya Zakharevich <ilya@​math.ohio-state.edu> wrote

Definitely not! This message comes from non-Perl-malloc. $^M is
active with Perl-malloc only.

Errr... quoting from my original post​:

  alignbytes=8, usemymalloc=y, prototype=define
  ^^^^^^^^^^^^^

I presume this misconception is the reason why the message was erroneously
removed from perldiag.

Mike Guy

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 1, 1999

From [Unknown Contact. See original ticket]

On Fri, Oct 01, 1999 at 12​:49​:14AM -0700, Gurusamy Sarathy wrote​:

On Thu, 30 Sep 1999 21​:21​:15 EDT, Ilya Zakharevich wrote​:

+=item Out of memory!
[...]
This message comes from non-Perl-malloc.

malloc.c​:1016​: PerlIO_puts(PerlIO_stderr(),"Out of memory!\n");

????!!!!! Who wrote this junk?! I count until three, then start to
shoot every third guy around!

Ilya

P.S. I think this code is not reachable without exercising some of
  compile-time options. Nevertheless, it could be improved.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 8, 1999

From [Unknown Contact. See original ticket]

Gurusamy Sarathy <gsar@​ActiveState.com> wrote

Presumably the last two really mean "Perl's internal data structures
are in a twist", and perhaps indicate bugs in Perl. Is it worth
seeing if I can generate a smaller test case?

Please do.

Turns out I can't reproduce either effect. Sorry.

Mike Guy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant