Re: Possible angle on JPL failures

[email protected] ("Bradley M. Kuhn") Tue, 16 Jan 2001 20:15:14 -0500
Newsgroups perl.jpl
Message-ID <[email protected]>
[email protected] <[email protected]> wrote:
 
> Some brute force debugging on my host (Solaris 2.7 host with Perl
> 5.005_03) revealed that the Sample.java core dumps are occurring in the
> embedded interpreter (PerlInterpreter.c):
> 
> PerlInterpreter.c -> perl_parse -> perl.c -> init_postdump_symbols: 
> 
> Here's the scene of the crime in init_postdump_symbols: 
>    for (; *env, env++) {
>      ...
>      fprintf(stderr, "postdump: *s++=\\0 at s='%s'\n",s);   # I added
>      *s++ = '\0';   # core dump
>      ...
>    }
> Apparently Java is no longer tolerant of native code environment 
> diddling... ?

That's a good theory, and the only one I have seen this far.

I can force core dumps with a Kaffe/perl5.6.0 JPL setup, but they seem to be
related to lack of initialization of data structures inside Kaffe's JVM.
(i.e., before any Perl code runs, I have to do a bunch of JNI-related stuff,
otherwise a core dump).

Basically, in any JPL program I add:

BEGIN {

  use JPL::AutoLoader;
  use JPL::Class 'java::lang::StringBuffer';

  my $sb = java::lang::StringBuffer->new__s("STOP KAFFE FROM CRASHING");
}

And it always seem to work, at least for Kaffe.

Give that work around a try and see if it effects your core dumps.

If not, *you* may have the best setup to help us find the bug.  Your
environment-diddling theory has some promise.  Does anyone on this list know
the perl internals enough to see what it would take to have Perl dup the
environment instead of diddling it directly?

(Obviously, this isn't a long term solution, because %ENV would cease to
 work right, but it might be helpful to see what would happen if it didn't,
 to help track down the bug.)
 
> Can someone shed some light?  

I tried my best; I am not really a JPL-hacker, but I play one on this list.
;)

I also don't use non-free software, so I can only test things with Kaffe and
free software operating systems (like GNU/Linux) myself.


-- 
Bradley M. Kuhn  -  http://www.ebb.org/bkuhn
signature.asc (application/pgp-signature, 232 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6ZPIi53XjJNtBs4cRAuzxAJ9incEKgOcGibGiwBm67hY5WjAoGACfVObh
BD14Dy4Jp5uzBYXCT/+nsa8=
=fr47
-----END PGP SIGNATURE-----