Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15716

Fix StackOverflowError in case if exception suppressed with itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.11
    • 2.12
    • general
    • None

    Description

      We can get infinite loop in org.apache.ignite.internal.util.typedef.X#hasCause and X#cause in case if exception is suppressed with itself.

      Example:

      Exception e = new Exception("foo");
       Exception e2 = new Exception(e);
       e.addSuppressed(e2)
      

       

      Stack:

      java.lang.StackOverflowError: null
       at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:476)
       at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
       at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
       at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
       
      

       

      Attachments

        Issue Links

          Activity

            People

              erixon Eduard Rakhmankulov
              erixon Eduard Rakhmankulov
              Sergey Chugunov Sergey Chugunov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m