Re: [rvm-research] Question about Jikes -- RVMThread Termination

Robin Garner <[email protected]> Fri, 2 Mar 2018 14:57:51 +1100
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CADjFg8Q05Vc2Kvu5nV1er-n1ymzgcKZ9yNhcjwYx5sr+NchP7Q@mail.gmail.com>
Hi Khaled,

I'm not entirely sure I follow what you're doing, but if I understand
correctly, you've instrumented the suspend() method to execute some code
just before (after) it blocks (?), and this is working just fine until VM
shutdown ?

Then when the VM is shutting down, you want to catch the suspension of the
last thread, and do some kind of post-processing ?  And this is where it's
failing ?

This isn't an area where I have much experience, but I wouldn't expect all
threads to terminate in a nice clean way.  Have you tried a standard
shutdown hook ?

Runtime.getRuntime().addShutdownHook(thread)

or alternatively instrumenting VM.shutdown() or  the sysExit syscall.


I would imagine that many threads terminate abruptly as part of the OS
cleanup on exit, in which case, you couldn't make any assumptions about the
state of the (Java or Malloc) heap.

Hope I'm not too far from the mark :)

cheers


On Wed, Feb 21, 2018 at 9:09 AM, Khaled Z Mahmoud <[email protected]>
wrote:

> Hi,
>
> In RVMThread, I inserted code in the suspend method to call a C function.
> However, it seems that,  at the point when "the last RVMThread"  suspend
> is called, any allocated heap area is removed at that time.
>
> Any attempt to access Heap Area fro C through pointers results in an ugly
> exception.
> Any ideas ?
>
>
>
> --
> Regards,
> Khaled Mahmoud
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers