Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6936

Dead loop on log file reading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 5.13.4
    • None
    • KahaDB
    • None

    Description

      We restarted our activemq instance(5.13.4) but found it hung on recovering data. I got the data and ran a debug and found these:

      1. The dead loop is in Journal.getNextLocation(Location location)
      2. I added log in the method and this is I got:
        2018-03-23 14:56:43 [DEBUG] Journal Get next location for: 7:33554239
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554330
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554330: offset=33554330, size=28, type=2
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554358
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554358: offset=33554358, size=91, type=1
        2018-03-23 14:56:43 [DEBUG] Journal Get next location for: 7:33554358
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554449
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554449: offset=33554449, size=0, type=0
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554432
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554432: offset=33554432, size=0, type=0
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554432
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554432: offset=33554432, size=0, type=0
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554432
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554432: offset=33554432, size=0, type=0
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554432
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554432: offset=33554432, size=0, type=0
        2018-03-23 14:56:43 [DEBUG] Journal Reading location: 7:33554432
        2018-03-23 14:56:43 [DEBUG] Journal Location 7:33554432: offset=33554432, size=0, type=0
      3. 33554432 is the max log file size. activemq read a location at the end of the file and the size is 0, this causes the dead loop

      I don't know if this is a problem when the file is saved or there is something need to be fixed when reading.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ruralhunter Rural Hunter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: