Commit Graph
71 Commits
Author SHA1 Message Date
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
kohsuke 253d7732ee added code to track the origin of the call across remote systems.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2216 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-15 15:03:13 +00:00
kohsuke cec26f9009 trying to mimic the UserRequest class to see if that works.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2215 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-15 14:11:36 +00:00
kohsuke 274ea9c68e fixed a bug. when the ProxyOutputStream stream is already closed, calling write() will just cause a failure.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2214 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-15 14:11:10 +00:00
kohsuke e83b388e6d improved the error message.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2213 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-15 14:10:21 +00:00
kohsuke 7b8e851e31 fixed a test.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2212 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-15 13:55:10 +00:00
kohsuke 8c0a56f4ae fixed a bug in the remoting support where the proxy returned from export() didn't work correctly if it uses user-defined classes as parameter values and return types.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2202 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-13 14:47:21 +00:00
kohsuke 862a646c7d bug fix in the remoting mechanism.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2126 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-09 20:28:06 +00:00
kohsuke fe21d5c141 fixed a horrible horrible memory leak.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1807 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-19 19:27:34 +00:00
kohsuke 2f66019cf7 trying to fix a bug where the slave agent doesn't terminate itself even when the connection is lost.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1765 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-15 17:46:46 +00:00
ramapulavarthi 2a5e9bcce6 Fixed a bug where the wrong classloader was used to de-serialize the response object.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1735 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-12 02:43:24 +00:00
ramapulavarthi 98e7aa7d7f Fixed a bug in handling exception thrown from UserRequest. The exception could be an instance of the user class, so it needs to be sent over on UserResponse, not the underlying Response.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1734 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-12 02:35:32 +00:00
kohsuke fbc918b1f5 doc improvement.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1711 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-08 17:18:16 +00:00
kohsuke f391d39411 added a test for resource support.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1599 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-03 05:57:45 +00:00
kohsuke 31ff889357 implemented resource support.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1598 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-03 05:57:34 +00:00
kohsuke 19860fa070 merging remoting-integration branch
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1523 71c3de6d-444a-0410-be80-ed276b4c234a
2006-12-29 19:15:53 +00:00
kohsuke 4cabee9f18 typo fixes.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1396 71c3de6d-444a-0410-be80-ed276b4c234a
2006-12-20 19:20:31 +00:00
kohsuke 183e0e5344 implemented another channel for doing computation locally.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1379 71c3de6d-444a-0410-be80-ed276b4c234a
2006-12-19 14:53:48 +00:00
kohsuke 8ddb883ead doc improvement.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1375 71c3de6d-444a-0410-be80-ed276b4c234a
2006-12-18 17:59:06 +00:00