Results 1 to 13 of 13

Thread: glacier2router bug?

  1. #1
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8

    glacier2router bug?

    java code:
    Ice.Communicator ic =Ice.Util.initialize(args);
    Ice.ObjectPrx tmp = ic.stringToProxy("DemoGlacier2/router:tcp -p 4064 -h 127.0.0.1");
    RouterPrx router = RouterPrxHelper.checkedCast(tmp);
    try {
    SessionPrx session = router.createSession("a", "b");
    Ice.ObjectPrx base = ic.stringToProxy("callback:tcp -h 127.0.0.1 -p 10000").ice_router(router);
    CallbackPrx twoway = CallbackPrxHelper.checkedCast(base);
    } catch (CannotCreateSessionException e) {
    e.printStackTrace();
    } catch (PermissionDeniedException e) {
    e.printStackTrace();
    }finally{
    if (router != null) {
    try {
    router.destroySession();
    } catch (Throwable ex) {
    }
    router = null;
    }
    if (ic != null) {
    try {
    ic.destroy();
    } catch (Throwable ex) {
    }
    ic = null;
    }
    }

    run >=10000w times,"glacier2router.exe" use more and more Memory,at last "glacier2router.exe" is no response.exception:

    Caused by: Ice.ConnectionLostException
    error = 0
    at IceInternal.ConnectRequestHandler.getConnection(Co nnectRequestHandler.java:240)
    at IceInternal.ConnectRequestHandler.sendRequest(Conn ectRequestHandler.java:138)
    at IceInternal.Outgoing.invoke(Outgoing.java:66)
    at Glacier2._RouterDelM.createSession(_RouterDelM.jav a:44)

    client invoke destroy() free memory,but glacier2router.exe does not free memory.
    I wonder whether the problem is glacier2router.exe config was wrong, or glacier2router.exe has bug?

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Could you post your Glacier2 configuration file? Do you set the Glacier2.SessionTimeout property? I tried reproducing the problem with Ice 3.4.1 without luck, glacier2 memory remains stable. Which Ice version do you use?

    Cheers,
    Benoit.

  3. #3
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8
    Quote Originally Posted by benoit View Post
    Hi,

    Could you post your Glacier2 configuration file? Do you set the Glacier2.SessionTimeout property? I tried reproducing the problem with Ice 3.4.1 without luck, glacier2 memory remains stable. Which Ice version do you use?

    Cheers,
    Benoit.


    Glacier2 configuration file:

    Glacier2.InstanceName=*
    Glacier2.Client.Endpoints=ssl -p 9527 -h *
    Glacier2.Server.Endpoints=tcp -h *
    Glacier2.PermissionsVerifier=PermissionsVerifier:t cp -h * -p 10000
    Glacier2.SessionTimeout=30
    Glacier2.Client.ForwardContext=1
    Glacier2.Server.ForwardContext=1
    Ice.ThreadPool.Server.Size=90
    Ice.ThreadPool.Server.SizeWarn=90
    Ice.ThreadPool.Server.SizeMax=100
    Ice.Override.Compress=1
    Ice.Warn.Connections=0
    Ice.Plugin.IceSSL=IceSSL:createIceSSL
    IceSSL.DefaultDir=certs
    IceSSL.CertAuthFile=cacert.pem
    IceSSL.CertFile=s_rsa1024_pub.pem
    IceSSL.KeyFile=s_rsa1024_priv.pem

    Ice version 3.4.1.
    Client invokes the router.destroySession() method, Do not destroy the server session?
    glacier2router.exe have to wait for the server Session Timeout, after the release of memory?
    Last edited by Nl_tan; 05-15-2011 at 06:01 AM.

  4. #4
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Why do you set the thread pool size on Glacier2? This shouldn't be necessary. I also don't see how such a configuration file could possibly work, it is allowed to pass "-h *" to a proxy endpoint so your permissions verifier property is incorrect. I would also recommend using a more descriptive instance name.

    I take it from your configuration that you are not using a session manager?

    I tried reproducing the problem with a similar configuration and I'm still not seeing any leaks in Glacier2. Which platform do you use? Could you perhaps create a small test case that we could use to duplicate the issue?

    Cheers,
    Benoit

  5. #5
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8
    Quote Originally Posted by benoit View Post
    Hi,

    Why do you set the thread pool size on Glacier2? This shouldn't be necessary. I also don't see how such a configuration file could possibly work, it is allowed to pass "-h *" to a proxy endpoint so your permissions verifier property is incorrect. I would also recommend using a more descriptive instance name.

    I take it from your configuration that you are not using a session manager?

    I tried reproducing the problem with a similar configuration and I'm still not seeing any leaks in Glacier2. Which platform do you use? Could you perhaps create a small test case that we could use to duplicate the issue?

    Cheers,
    Benoit
    Use Ice instead webService,
    webService efficiency is too low
    Only use the user authentication session,
    the number of Session is not under control
    could you provide relevant examples

  6. #6
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    The Glacier2 demo from the demo/Glacier2/callback directory demonstrates the use of Glacier2 without a session manager. Could you try to modify the demo to reproduce the problem? Please also specify which platform you're using.

    Cheers,
    Benoit.

  7. #7
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8
    Quote Originally Posted by benoit View Post
    Hi,

    The Glacier2 demo from the demo/Glacier2/callback directory demonstrates the use of Glacier2 without a session manager. Could you try to modify the demo to reproduce the problem? Please also specify which platform you're using.

    Cheers,
    Benoit.
    win 7
    Ice 3.4.1
    jdk 1.6
    Attached Files Attached Files

  8. #8
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    How is the Glacier2 memory increasing (how many MB for a given time)? Does it stabilises at one point? Why do you think it's related to the ConnectionLostException? From your sample code I can observe that the client connection sometime timeouts because it sends too many requests. The connection timeout causes the connection to Glacier2 to be closed and a ConnectionLostException on the Glacier2 side. I'm not seeing the Glacier2 memory increasing.

    Why do configure Size=100/SizeMax=1000 for the Glacier2 router thread pool? This shouldn't be necessary, Glacier2 can work with a single thread and still handle many concurrent calls efficiently.

    Cheers,
    Benoit.

  9. #9
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8

    Angry

    Quote Originally Posted by benoit View Post
    Hi,

    How is the Glacier2 memory increasing (how many MB for a given time)? Does it stabilises at one point? Why do you think it's related to the ConnectionLostException? From your sample code I can observe that the client connection sometime timeouts because it sends too many requests. The connection timeout causes the connection to Glacier2 to be closed and a ConnectionLostException on the Glacier2 side. I'm not seeing the Glacier2 memory increasing.

    Why do configure Size=100/SizeMax=1000 for the Glacier2 router thread pool? This shouldn't be necessary, Glacier2 can work with a single thread and still handle many concurrent calls efficiently.

    Cheers,
    Benoit.
    demo.zip

    glacier2router.exe, client must not be run on the same machine,IP can not use 127.0.0.1.
    Modified:

    win7
    jdk 1.6
    ice 3.4.1

    Routing Server (win7) only run glacier2router.exe.IP: 10.68.8.45
    Application Server (win7). IP: 10.2.40.40
    The third server(win7) Running Test.java IP:202.10.10.19, in the case of connecting a small memory automatically released. has remained at around 5M.
    When a client too many connections
    An exception unstable after the change. glacier2router.exe not automatically release the memory,
    taking up more and more memory, and finally Ben collapse

    Ice.ConnectFailedException
    error = 0
    at IceInternal.ConnectRequestHandler.getConnection(Co nnectRequestHandler.java:240)
    at IceInternal.ConnectRequestHandler.sendRequest(Conn ectRequestHandler.java:138)
    at IceInternal.Outgoing.invoke(Outgoing.java:66)
    at Glacier2._RouterDelM.createSession(_RouterDelM.jav a:44)
    at Glacier2.RouterPrxHelper.createSession(RouterPrxHe lper.java:129)
    at Glacier2.RouterPrxHelper.createSession(RouterPrxHe lper.java:67)
    at com.hna.te.client.Te.run(Test.java:34)
    Caused by: java.net.ConnectException: Connection timed out: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketC hannelImpl.java:574)
    at IceInternal.Network.doFinishConnect(Network.java:3 54)
    at IceSSL.TransceiverI.initialize(TransceiverI.java:3 7)
    at Ice.ConnectionI.initialize(ConnectionI.java:1786)
    at Ice.ConnectionI.message(ConnectionI.java:1038)
    at IceInternal.ThreadPool.run(ThreadPool.java:302)
    at IceInternal.ThreadPool.access$300(ThreadPool.java: 12)
    at IceInternal.ThreadPool$EventHandlerThread.run(Thre adPool.java:643)
    at java.lang.Thread.run(Thread.java:619)

    finally :
    glacier2router.exe use Memory 2G.Per 500 Communicator takes about 10M memory
    Caused by: Ice.ConnectionLostException
    error = 0
    at IceInternal.ConnectRequestHandler.getConnection(Co nnectRequestHandler.java:240)
    at IceInternal.ConnectRequestHandler.sendRequest(Conn ectRequestHandler.java:138)
    at IceInternal.Outgoing.invoke(Outgoing.java:66)
    at Glacier2._RouterDelM.createSession(_RouterDelM.jav a:44)
    Last edited by Nl_tan; 05-18-2011 at 09:14 AM.

  10. #10
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8
    Quote Originally Posted by benoit View Post
    Hi,

    How is the Glacier2 memory increasing (how many MB for a given time)? Does it stabilises at one point? Why do you think it's related to the ConnectionLostException? From your sample code I can observe that the client connection sometime timeouts because it sends too many requests. The connection timeout causes the connection to Glacier2 to be closed and a ConnectionLostException on the Glacier2 side. I'm not seeing the Glacier2 memory increasing.

    Why do configure Size=100/SizeMax=1000 for the Glacier2 router thread pool? This shouldn't be necessary, Glacier2 can work with a single thread and still handle many concurrent calls efficiently.

    Cheers,
    Benoit.
    操!
    Finally found a reason!
    tcp, udp protocol no problem, memory to maintain normal
    ssl protocol does not release memory

  11. #11
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Ok, thanks for the information, we are investigating this and we'll let you know when we know more.

    Cheers,
    Benoit.

  12. #12
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi,

    We've posted a patch for this problem. If you prefer, we can also send you patched binaries for the IceSSL DLL.

    Thanks again for reporting this.

    Best regards,
    Mark

  13. #13
    Nl_tan is offline Registered User
    Name: nl tan
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    8

    Thumbs up

    Quote Originally Posted by mes View Post
    Hi,

    We've posted a patch for this problem. If you prefer, we can also send you patched binaries for the IceSSL DLL.

    Thanks again for reporting this.

    Best regards,
    Mark
    Could you send me patched binaries for the IceSSL DLL.
    email:lb_liu1@hnair.com
    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. glacier2router as windows service
    By soff.dong in forum Help Center
    Replies: 2
    Last Post: 08-15-2009, 01:40 PM
  2. A problem of glacier2router
    By GlacierX in forum Help Center
    Replies: 17
    Last Post: 01-29-2008, 11:34 AM
  3. Bug of Glacier2Router
    By GlacierX in forum Bug Reports
    Replies: 5
    Last Post: 04-11-2007, 05:00 AM
  4. Problems with glacier2router
    By davidcr1983 in forum Help Center
    Replies: 5
    Last Post: 08-10-2006, 01:50 PM
  5. Glacier2Router can be linked in series?
    By OrNot in forum Help Center
    Replies: 4
    Last Post: 06-30-2005, 05:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •