kohsuke
fb5127ed12
Fixed a problem related to OC4J. See http://www.nabble.com/Hudson-on-OC4J-tt16702113.html
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8632 71c3de6d-444a-0410-be80-ed276b4c234a
2008-04-16 01:58:10 +00:00
kohsuke
f7fb35923b
indentation fix
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8505 71c3de6d-444a-0410-be80-ed276b4c234a
2008-04-11 04:40:33 +00:00
drulli
e416d4dc05
Improved 2nd exception message if which does not find a Jar file.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7705 71c3de6d-444a-0410-be80-ed276b4c234a
2008-03-13 18:10:11 +00:00
drulli
5a3bd196ab
Improved exception message if which does not find a Jar file.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7697 71c3de6d-444a-0410-be80-ed276b4c234a
2008-03-13 14:26:50 +00:00
kohsuke
18816984e4
made more robust. See http://www.nabble.com/How-to-reference-library-JARs-of-a-plugin-at-runtime-%28URL%29-td15601148.html#a15601148
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7619 71c3de6d-444a-0410-be80-ed276b4c234a
2008-03-12 06:42:12 +00:00
kohsuke
f2f9743cd8
accidentally commented out.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6628 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-13 20:00:01 +00:00
kohsuke
e153f3ac61
support sending back exported objects to the caller.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6627 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-13 19:59:00 +00:00
kohsuke
603aeccf6f
typo
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6626 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-13 18:31:39 +00:00
kohsuke
b0d140e376
adding performance counters
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6613 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-13 00:19:14 +00:00
kohsuke
fcc7b1ea24
adding another unwrap method.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6612 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-13 00:18:57 +00:00
kohsuke
54c064bb4e
typo
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6611 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-13 00:08:53 +00:00
kohsuke
5561ebf0f4
adding ping support. For now, only activate them when specified via CLI.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6607 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-12 19:23:53 +00:00
kohsuke
0100f17291
this is needed by hudson.maven.agent.Main.main(Main.java:68)
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6304 71c3de6d-444a-0410-be80-ed276b4c234a
2007-12-16 03:50:31 +00:00
kohsuke
c339b1a7e0
adding trace message.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6296 71c3de6d-444a-0410-be80-ed276b4c234a
2007-12-16 01:59:48 +00:00
kohsuke
7edd9eb192
support the -text option for slaves over binary-unsafe channel.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6287 71c3de6d-444a-0410-be80-ed276b4c234a
2007-12-15 19:43:09 +00:00
kohsuke
da47f62a14
implemented text tranmission mode and mode negotiation.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6286 71c3de6d-444a-0410-be80-ed276b4c234a
2007-12-15 19:40:37 +00:00
kohsuke
f7a8c791f2
implemented streaming base64 encoder/decoder for tunneling connection over binary-unsafe protocol.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6285 71c3de6d-444a-0410-be80-ed276b4c234a
2007-12-15 18:02:33 +00:00
kohsuke
975f36e73a
fixed a bug regarding a roundtrip exporting (where side X exports an object to the other side Y, and Y re-exports that back to X.)
...
When this happens to classloaders (that is, when the master exports its classloader to a remote machine, which re-exports this remote classloader to the master to make a callback), we end up creating a RemoteClassLoader on the master to load a duplicate copy. A duplicate copy happens when we try to load a class from plugins, because ImportedClassLoaderTable creates new RemoteClassLoader with the 'getClass().getClassLoader()' as the parent, which doesn't see the plugin classes.
To fix this problem, RemoteClassLoader is modified to detect the situation where a round-trip re-exporting is about to happen. Upon detecting this, it will arrange things in such a way that the other side will get the original ClassLoader instance back, instead of doubly-proxied RemoteClassLoader.
This fixes the problem discussed in http://www.nabble.com/Help-Kohsuke%21-m2-project-type-and-cobertura-tf4829718.html and http://www.nabble.com/MavenReporter-throws-Serialization-Exception-for-ProjectActions-when-writing-to-build.xml-tf4784290.html#a13687067
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5997 71c3de6d-444a-0410-be80-ed276b4c234a
2007-11-22 02:29:52 +00:00
kohsuke
08d211bc9e
added error diagnostics to find out where the connection is closed.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5434 71c3de6d-444a-0410-be80-ed276b4c234a
2007-10-25 00:48:52 +00:00
kohsuke
4afa2a96fc
when a thread that's waiting for a remote operation is interrupted, also interrupt the remote thread that's executing it, so that the actual operation gets cancelled.
...
(#904 )
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5393 71c3de6d-444a-0410-be80-ed276b4c234a
2007-10-21 23:39:03 +00:00
kohsuke
605ae5d355
missed the crucial part.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4270 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-15 06:02:15 +00:00
kohsuke
5d96a35cab
there are cases where automatic unexporting is undesirable.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4269 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-15 05:59:15 +00:00
kohsuke
cc92e3983d
bug fix.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4258 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-13 22:12:16 +00:00
kohsuke
ab8522ef4a
with automatic unexport operations, the auto close can cause NPE.
...
In any case I think this was a bad behavior for remote streams to cloes the underlying Output/InputStream when it is GC-ed.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4240 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-12 23:40:53 +00:00
kohsuke
b34e2785f6
improved error handling.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4239 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-12 23:33:24 +00:00
kohsuke
13d58a5d4c
bug fix.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4207 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-11 19:19:41 +00:00
kohsuke
d7c8b59223
bug fix.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4206 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-11 19:19:29 +00:00
kohsuke
573dd39220
implemented reference counting and automatic unexporting at the end of synchronous calls.
...
This is to fix http://www.nabble.com/Possible-memory-leak-in-hudson.remoting.ExportTable-tf4218077.html
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4202 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-11 19:09:12 +00:00
kohsuke
f31f0dcc87
implemented reference counting.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4201 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-11 18:48:09 +00:00
kohsuke
3d92fc3acc
added dump command.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4153 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-09 05:20:01 +00:00
kohsuke
fa209b3ff5
added probe points to dig into the leak problem.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4152 71c3de6d-444a-0410-be80-ed276b4c234a
2007-08-09 05:11:00 +00:00
kohsuke
99114bf563
improved error check.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3723 71c3de6d-444a-0410-be80-ed276b4c234a
2007-07-16 22:48:14 +00:00
kohsuke
7321aba356
forgot to commit.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3675 71c3de6d-444a-0410-be80-ed276b4c234a
2007-07-13 00:39:04 +00:00
kohsuke
38f4b8ba4e
preventive measure to forestall memory leak possibility.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3673 71c3de6d-444a-0410-be80-ed276b4c234a
2007-07-12 14:03:34 +00:00
kohsuke
babc31f6f7
reimplemented the shut down sequence to avoid EOFException race condition. ( #595 )
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3668 71c3de6d-444a-0410-be80-ed276b4c234a
2007-07-12 13:10:53 +00:00
kohsuke
75ab95fed3
made protected to allow subclass to perform additional actions (such as killing a process.)
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3187 71c3de6d-444a-0410-be80-ed276b4c234a
2007-04-21 14:28:19 +00:00
kohsuke
3251761d28
fixed a bug when a stream is closed immediately after it's opened.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2894 71c3de6d-444a-0410-be80-ed276b4c234a
2007-04-06 17:54:02 +00:00
kohsuke
b661e27787
re-implemented correctly.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2801 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-30 06:35:01 +00:00
kohsuke
5ff31c3939
support rt.jar
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2779 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-29 17:00:09 +00:00
kohsuke
21c77af00c
modified so that exception happened on the remote system can be propagated (to some extent) even if it's not serializable.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2756 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-29 00:37:55 +00:00
kohsuke
d4850ef00c
touching.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2656 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-25 22:42:51 +00:00
kohsuke
8eeeb69e1a
improve diagnosability.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2571 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-22 23:25:34 +00:00
kohsuke
8820c0208c
fixed a dead lock. Request.call() shouldn't block in wait() while keeping the Channel lock.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2350 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-06 19:44:15 +00:00
kohsuke
09388df912
fixed a dead lock.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2345 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-05 17:53:27 +00:00
kohsuke
a92734e8ab
support flush.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2323 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-04 04:37:16 +00:00
kohsuke
7581341b30
buffering causes deadlocks
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2322 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-04 02:10:38 +00:00
kohsuke
400bbdaf5b
moved the code to locate the source jar file.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2291 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-01 05:37:02 +00:00
kohsuke
696c4f1ac0
improved the error reporting.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2242 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-22 01:43:24 +00:00
kohsuke
64dd2b64b5
refactored for better reusability.
...
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2241 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-22 01:42:11 +00:00
kohsuke
8aac70529d
there was apparently some kind of race condition, because occasionally test fails trying to call close once too many (that is, one channel (X) sends CloseCommand to the other (Y), which sends back CloseCommand to X, and somehow X sends one more CloseCommand to Y, causing an exception below.)
...
I thought the use of the 'close' field and synchronization is enough to guard against this condition, but apparently it's not. I added one more 'closing' field, which seems to fix the problem.
It just doesn't feel right when you fix the issue without getting to the bottom, but the concurrency bug is hard to reproduce and I'm exhausted.
----
forking a new process
Feb 15, 2007 6:09:30 AM hudson.remoting.Channel$CloseCommand execute
SEVERE: close command failed
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:190)
at java.io.PipedInputStream.receive(PipedInputStream.java:156)
at java.io.PipedOutputStream.write(PipedOutputStream.java:129)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1682)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1591)
at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1173)
at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1127)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1398)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:305)
at hudson.remoting.Channel.send(Channel.java:183)
at hudson.remoting.Channel.close(Channel.java:347)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:329)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:372)
Feb 15, 2007 6:09:30 AM hudson.remoting.Channel$ReaderThread run
SEVERE: I/O error in channel
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2498)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1273)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:366)
channel started
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2217 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-15 15:06:04 +00:00