Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] [ERROR] Buffer@6,443[RELEASED](Server fails after running)
[CDO] [ERROR] Buffer@6,443[RELEASED] [message #1852090] Thu, 28 April 2022 16:14 Go to next message
Alexander  Stenzer is currently offline Alexander StenzerFriend
Messages: 9
Registered: April 2022
Junior Member
Hello CDO Team,

we have strange error on the server side.
We use the derby-db as backend and the tcp connector.
Wenn we start the server everything works fine. Until on the server side this exception occures.

[ERROR] Buffer@6,443[RELEASED]
java.lang.IllegalStateException: Buffer@6,443[RELEASED]
at org.eclipse.internal.net4j.buffer.Buffer.write(Buffer.java:359)
at org.eclipse.net4j.internal.tcp.TCPConnector.handleWrite(TCPConnector.java:332)
at org.eclipse.net4j.internal.tcp.TCPSelector.handleSelection(TCPSelector.java:275)
at org.eclipse.net4j.internal.tcp.TCPSelector.run(TCPSelector.java:190)
at java.base/java.lang.Thread.run(Thread.java:833)

Then we are not able to reconnect and the current connection hangs.

If we want to connect we get on the server side:
[ERROR] Buffer@1[RELEASED]
java.lang.IllegalStateException: Buffer@1[RELEASED]
at org.eclipse.internal.net4j.buffer.Buffer.startPutting(Buffer.java:324)
at org.eclipse.net4j.signal.SignalProtocol$SignalOutputStream$1.provideBuffer(SignalProtocol.java:815)
at org.eclipse.net4j.buffer.BufferOutputStream.ensureBufferPrivate(BufferOutputStream.java:225)
at org.eclipse.net4j.buffer.BufferOutputStream.write(BufferOutputStream.java:118)
at java.base/java.io.DataOutputStream.writeInt(DataOutputStream.java:208)
at org.eclipse.net4j.signal.RemoteExceptionRequest.requesting(RemoteExceptionRequest.java:41)
at org.eclipse.net4j.signal.Request.doExtendedOutput(Request.java:67)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:392)
at org.eclipse.net4j.signal.Request.doExecute(Request.java:59)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:329)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:557)
at org.eclipse.net4j.signal.Request.sendAsync(Request.java:53)
at org.eclipse.net4j.signal.IndicationWithResponse.sendExceptionSignal(IndicationWithResponse.java:124)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:83)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:329)
at org.eclipse.net4j.signal.SignalReactor.runSync(SignalReactor.java:74)
at org.eclipse.net4j.signal.Signal.run(Signal.java:201)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

and on the client side:
TCPSelector [debug.buffer] Retaining Buffer@2[RELEASED]
main [debug.signal] ================ Requesting: RepositoryTimeRequest[protocol=cdo, correlation=6]
main [debug.buffer] Obtained Buffer@1[INITIAL]
main [debug.channel] Handling buffer: Buffer@1[PUTTING] --> Channel[1, CLIENT, cdo]
TCPSelector [debug.buffer] Writing 5 bytes (EOS)
00 00 00 07 00 17
main [debug.signal] ================ Confirming: RepositoryTimeRequest[protocol=cdo, correlation=6]
TCPSelector [debug.buffer] Retaining Buffer@1[RELEASED]



After restarting the server everything is fine.

Has someone a idea what could be the reason for it?

Alexander


Cheers
/Alexander

[Updated on: Thu, 28 April 2022 20:00]

Report message to a moderator

Re: [CDO] [ERROR] Buffer@6,443[RELEASED] [message #1852100 is a reply to message #1852090] Fri, 29 April 2022 04:36 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Alexander,

That is very strange because the state transitions for buffers have not changed in 15 years and nobody has ever reported a similar issue. I have a few questions:

1) What's the exact version of the org.eclipse.net4j bundle? Is it modified by you?
2) Are you just using standard CDO features or have you implemented custom things on top of Net4j?
3) This is with a plain TCPConnector, not SSLConnector, right?
4) Is the issue reproducible in your setup? If so, how?
5) Do you have the log output (with tracing enabled) of the server available? If so, please try to find out what happens to the Buffer in question right before the problem is logged.
6) Can you provide any other information that could help me reproduce the issue?


Re: [CDO] [ERROR] Buffer@6,443[RELEASED] [message #1852131 is a reply to message #1852100] Sun, 01 May 2022 17:54 Go to previous messageGo to next message
Alexander  Stenzer is currently offline Alexander StenzerFriend
Messages: 9
Registered: April 2022
Junior Member
Hi Eike,

1) I use the Eclipse 2021-12 Version with JDK 17.
2) The standard?
3) Yes it is the plain TCPConnector.
4) Now yes. Im able to reproduce it.
5) I am not sure to optimal configure the tracing. Could you provide a .option file.
6)
Now how I could reproduce it.
To make it easy i startet the cdo-server on port 80.
After that i used Firefox to connect to the cdo-server.
The Server logs following and everything seems ok:

TCPSelector [debug.acceptor] Added connector TCPServerConnector[192.168.1.1:59,729]
TCPSelector [debug.channel] Handling buffer: Buffer@2[PUTTING] --> Channel[Control, SERVER]
TCPSelector [debug.connector] Setting state NEGOTIATING (was connecting) for TCPServerConnector[192.168.1.1:59,729]
TCPSelector [debug.connector] Setting state CONNECTING (was disconnected) for TCPServerConnector[192.168.1.1:59,729]
TCPSelector [debug.acceptor] Added connector TCPServerConnector[192.168.1.1:59,728]
TCPSelector [debug.channel] Handling buffer: Buffer@1[PUTTING] --> Channel[Control, SERVER]
TCPSelector [debug.connector] Setting state NEGOTIATING (was connecting) for TCPServerConnector[192.168.1.1:59,728]
TCPSelector [debug.connector] Setting state CONNECTING (was disconnected) for TCPServerConnector[192.168.1.1:59,728]

Then I connect with the cdo-client.
The client logs and fails to connect:

Setting userID null for TCPClientConnector[192.168.1.1:80]
Setting state CONNECTING (was disconnected) for TCPClientConnector[192.168.1.1:80]
main [debug] Ordering client operation REGISTER java.nio.channels.SocketChannel[unconnected]
TCPSelector [debug] Executing client operation REGISTER java.nio.channels.SocketChannel[unconnected]
TCPSelector [debug] Registering java.nio.channels.SocketChannel[unconnected]
TCPSelector [debug] Connecting java.nio.channels.SocketChannel[connection-pending remote=192.168.1.1:80]
TCPSelector [debug] Ordering client operation INTEREST CONNECT java.nio.channels.SocketChannel[connected local=/192.168.1.1:59735 remote=192.168.1.1:80] = false
TCPSelector [debug] Ordering client operation INTEREST READ java.nio.channels.SocketChannel[connected local=/192.168.1.1:59735 remote=192.168.1.1:80] = true
TCPSelector [debug.connector] Setting state NEGOTIATING (was connecting) for TCPClientConnector[192.168.1.1:80]
TCPSelector [debug] Executing client operation INTEREST CONNECT java.nio.channels.SocketChannel[connected local=/192.168.1.1:59735 remote=192.168.1.1:80] = false
TCPSelector [debug] Setting interest (was connect)
TCPSelector [debug] Executing client operation INTEREST READ java.nio.channels.SocketChannel[connected local=/192.168.1.1:59735 remote=192.168.1.1:80] = true
TCPSelector [debug] Setting interest READ
org.eclipse.net4j.util.lifecycle.LifecycleException: Could not activate TCPClientConnector[192.168.1.1:80]
at org.eclipse.net4j.util.container.ManagedContainer.activateElement(ManagedContainer.java:403)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:359)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:334)
at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:83)
at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:100)

And then the server logs:
java.lang.IllegalStateException: Buffer@2[RELEASED]
at org.eclipse.internal.net4j.buffer.Buffer.write(Buffer.java:359)
at org.eclipse.net4j.internal.tcp.TCPConnector.handleWrite(TCPConnector.java:332)
at org.eclipse.net4j.internal.tcp.TCPSelector.handleSelection(TCPSelector.java:275)
at org.eclipse.net4j.internal.tcp.TCPSelector.run(TCPSelector.java:190)
at java.base/java.lang.Thread.run(Thread.java:833)

If you would like i can give you a deep insight in a online-meeting, beause I think it is time-saving for both of us.

Cheers Alexander


Cheers
/Alexander

[Updated on: Sun, 01 May 2022 17:55]

Report message to a moderator

Re: [CDO] [ERROR] Buffer@6,443[RELEASED] [message #1852135 is a reply to message #1852131] Mon, 02 May 2022 05:10 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Alexander,

Thanks for your offer to have an online meeting. We may come back to it, but first I'd like you to try out the following:
Please edit your cdo-server.xml and change back the port (from 80) to 2036 and start the CDO server.
Then launch the CDO client (without using Firefox or any other HTTP client against your CDO server).
Does that fix your problem?

I tried out launching the CDO server on port 80 and it appears that some Windows service, perhaps my anti-virus kit or so,
immediately sends some data to port 80. This data is not compliant with the Net4j buffer data format and immediately produces exceptions in Net4j.
I could not reproduce that a proper CDO/Net4j client is disfunctional after this, but I also have no idea what you mean by "i used Firefox to connect to the cdo-server".

If using a correct port (one that's not the default port for some HTTP or any other non-Net4j protocol) solves your problem, I suggest that you submit a bugzilla against CDO, so that I can try to find out why in your scenario the Net4j buffers that were used during your HTTP "attack" stay corrupt and cause harm even after the "attack"...


Re: [CDO] [ERROR] Buffer@6,443[RELEASED] [message #1852137 is a reply to message #1852135] Mon, 02 May 2022 07:26 Go to previous message
Alexander  Stenzer is currently offline Alexander StenzerFriend
Messages: 9
Registered: April 2022
Junior Member
Hi Eike,

yes on port 2036 without an http-request everything works fine.
I tested it on a linux vm. Also on port 80 if only CDO request are seen by the CDO server, everything is fine and stable.

"i used Firefox to connect to the cdo-server"
I wanted a fast way to get a http request. So i used Firefox to connect to http://CDOServerIP:CDOServerPort to reproduce the error.
So it also works to use port 2036 or any other to get the java.lang.IllegalStateException: Buffer@2[RELEASED] erro on the CDO Server.

What would the next step? How can I help?

Cheers
Alexander




Cheers
/Alexander

[Updated on: Tue, 20 September 2022 13:31]

Report message to a moderator

Previous Topic:How to avoid the output of an element path instead of its ID?
Next Topic:Embed BPMN2 Modeler eclipse to another eclipse project
Goto Forum:
  


Current Time: Thu Apr 18 04:55:58 GMT 2024

Powered by FUDForum. Page generated in 0.02121 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top