Axis2-C
  1. Axis2-C
  2. AXIS2C-1476

Memory leak when loosing connections

    Details

      Description

      I was load testing my apache code today by starting 50 clients which all start in a slide show mode, pooling the server at least every 5 seconds. I have a manager program that starts the clients and does does an abort of the processes when I want to close them. That is the secret, the abort...

      I was watching memory usage while it ran, and all was fine, Apache held steady at around 55 megs. Once I killed the 50 processes, all at the EXACT same time, well milliseconds apart, the memory usage sky rocketed. When I broke the code, I was in the mod_axis2::apache2_stream_read function.

      It turns out that ap_get_client_block(...) was returning 0xFFFFFFFF to the read variable:

      read = ap_get_client_block(stream_impl->request, (char *) buffer + len,
      count - len);
      if (read > 0)

      It turns out that read is unsigned, so the 0xFFFFFFFF is NOT negative, so I changed the code to read:

      if (read > 0 && read != 0xFFFFFFFF)

      All is well after the minor addition!

        Activity

        Sam Carleton created issue -
        Damitha Kumarage made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7.0 [ 12313997 ]
        Fix Version/s Next Version [ 12314892 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Sam Carleton
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development