swank:debug-stop does not stop process

26 views
Skip to first unread message

richard emberson

unread,
Sep 2, 2013, 2:41:38 PM9/2/13
to ens...@googlegroups.com
I am using:

Starting up Ensime...
Environment:
OS : Linux
Java : Java HotSpot(TM) 64-Bit Server VM 23.25-b01, Java(TM) SE
Runtime Environment 1.7.0_25-b15
Scala : version 2.10.0
Ensime : 0.9.8.9

I start a debugging session:

Handling RPC: (swank:debug-start "com.megaannum.Main")
Using Connector: com.sun.jdi.CommandLineLaunch : Launches target using
Sun Java VM command line and attaches to it
....
Writing: (:return (:ok (:status "success")) 3)
....
Writing: (:debug-event (:type start))


Then I stop the session:

Handling RPC: (swank:debug-stop)
[JDI: Target VM i/f closing event queues]
[JDI: Internal event handler exiting]
Writing: (:return (:ok t) 4)
Writing: (:debug-event (:type disconnect))


But the process that was launched with debug-start is not
killed with debug-stop.
Doing a process status at the command line:
ps axuwww | grep java
shows that it is still there.
It is still there after I stop editing and the
Ensime server is stopped.

Any suggestions as to where I might look to locate the
problem would be greatly appreciated.

Thanks.
Richard Emberson
--
Quis custodiet ipsos custodes

gre...@gmail.com

unread,
Mar 31, 2015, 6:58:16 AM3/31/15
to ens...@googlegroups.com
This still seems to be the case. I guess "Quit" should be renamed to "Disconnect" in the menu, as "Quit" gives the false impression that it will kill the JVM being debugged.

Also, the output buffer is still there, but unlike some emacs buffers which show external processes' outputs, such as *grep*, it does not indicate when the program has finished. So the user is even less likely to spot that they are going to accumulate still-running processes.

Aemon Cannon

unread,
Mar 31, 2015, 8:59:10 AM3/31/15
to ens...@googlegroups.com

Beefing up elisp integration tests for debugging is on my short list of things to do. Once our CI goes green again

--
You received this message because you are subscribed to the Google Groups "ENSIME" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ensime+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rory Graves

unread,
Mar 31, 2015, 4:32:52 PM3/31/15
to ens...@googlegroups.com
Hi Richard,

Thanks for the bug report - I've created https://github.com/ensime/ensime-server/issues/919 for it.

The debug integration needs a lot more attention.  Its relatively high up on my list as a next big part to tackle.
If you fancy taking a peak all of this is handling within the DebugManager class - you can trace the command through - look for DebugStopVMReq you can see it calls vm.dispose()

It looks like we should be calling vm.exit(0) then vm.dispose() (based on a quick scan of https://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/com/sun/jdi/VirtualMachine.html )

Might be a little while before I get to this so feel free to jump in with a test/PR ;)

Cheers

Rory

Sam Halliday

unread,
Mar 31, 2015, 4:57:20 PM3/31/15
to ens...@googlegroups.com
The build should be green ATM, but Shippable blindly reports the last run on its summary page (usually a PR) and I think that's Red.
Reply all
Reply to author
Forward
0 new messages