Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: grizzly-kernel
    • Labels:
      None
    • Environment:

      glassfish 3.1.2 Release, Windows 7, FF or IE.

      Description

      We have an issue in a Atmosphere application using streaming or long-polling.
      After the js code is subscribing for a request then the server-side code is doing a request.suspend() and then a broadcasting.
      In the time of broadcasting the suspend call seems is not completed and then the glassfish thrown error 503 and this error invalidates the htt session of the client.
      Very hard for me to provide a sample.
      I advice tzo use the atmosphere-pubsub sample project.
      The idea is if you don't have authentication in the project like in the atmosphere-pubsub you cannot see the error.
      In this sample project if authentication will be added then should be reproducable. Eventually adding broadcasting directly after suspend will allow to reproduce the rror easy.
      See the thread when I discussed this error with Jeanfrancois::
      http://groups.google.com/group/atmosphere-framework/browse_thread/thread/cdf1090797bc727e#

      Unfortunately my app I cannot deliver because of the complexity(app using a db connection) and license reasons.

      1. invalid_session_unsubscribe.jpg
        123 kB

        Activity

        Hide
        Ryan Lubke added a comment -

        Vasile,

        Could you please back up your $GF_HOME/modules/web-core.jar and replace it with the web-core.jar I've attached to this issue? This should show us where the session is being invalidated from.

        Thanks,
        -rl

        Show
        Ryan Lubke added a comment - Vasile, Could you please back up your $GF_HOME/modules/web-core.jar and replace it with the web-core.jar I've attached to this issue? This should show us where the session is being invalidated from. Thanks, -rl
        Hide
        Ryan Lubke added a comment -

        Hi Vasile,

        Any update?

        Show
        Ryan Lubke added a comment - Hi Vasile, Any update?
        Hide
        vasim added a comment - - edited

        Sorry for answering so late.
        I was very busy.
        The idea is I found a work around in the app to avoid this error.

        Actually are 2 errors:
        1. suspend and broadcasting one after another is generating the session invalidation. Here was helping a thread sleep after suspend.
        The problem occured only if I used for brodcasting same request as for suspend.

        2. throwing the error 503 in the web app is generating the session invalidation. The error 503 was thrown by Atmosphere and now we took it out. Actually in my opinion glassfish is here wrong implemented, why in this error case the session should be invalidated ? In the case the application is doing another request after such an error, then the seesion will be of course used and the app is not allowed to do anything any more. This means the app needs a new login and I don't find this normal.

        You need some log files from me, in adition to this new informations ?

        Show
        vasim added a comment - - edited Sorry for answering so late. I was very busy. The idea is I found a work around in the app to avoid this error. Actually are 2 errors: 1. suspend and broadcasting one after another is generating the session invalidation. Here was helping a thread sleep after suspend. The problem occured only if I used for brodcasting same request as for suspend. 2. throwing the error 503 in the web app is generating the session invalidation. The error 503 was thrown by Atmosphere and now we took it out. Actually in my opinion glassfish is here wrong implemented, why in this error case the session should be invalidated ? In the case the application is doing another request after such an error, then the seesion will be of course used and the app is not allowed to do anything any more. This means the app needs a new login and I don't find this normal. You need some log files from me, in adition to this new informations ?
        Hide
        oleksiys added a comment -

        Hi Vasile,

        yes, pls. send GF server.log file, when session invalidation happens again.

        Regarding point 1) you mentioned a thread.sleep... it might be a bug by design, cause in Grizzly Comet (Jeanfrancois has to know about that ) ) the actual "suspend" initialization happens after you exit Servlet.service(...) method. So if this initialization clashes w/ broadcaster thread - it may cause problems. IMO possible fix will include changes on both Grizzly and Atmosphere sides.

        thx.

        Alexey.

        Show
        oleksiys added a comment - Hi Vasile, yes, pls. send GF server.log file, when session invalidation happens again. Regarding point 1) you mentioned a thread.sleep... it might be a bug by design, cause in Grizzly Comet (Jeanfrancois has to know about that ) ) the actual "suspend" initialization happens after you exit Servlet.service(...) method. So if this initialization clashes w/ broadcaster thread - it may cause problems. IMO possible fix will include changes on both Grizzly and Atmosphere sides. thx. Alexey.
        Hide
        oleksiys added a comment -

        hi,

        changing the priority to major.
        will appreciate if you can apply the patch and once the issue occurs provide resulting GF server.log file.

        Thx.

        Show
        oleksiys added a comment - hi, changing the priority to major. will appreciate if you can apply the patch and once the issue occurs provide resulting GF server.log file. Thx.

          People

          • Assignee:
            oleksiys
            Reporter:
            vasim
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: