You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/11/03 09:25:34 UTC

[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #1065: Dump stacktrace for crashed instance started by go test in CI

tisonkun commented on code in PR #1065:
URL: https://github.com/apache/incubator-kvrocks/pull/1065#discussion_r1012662151


##########
.github/workflows/kvrocks.yaml:
##########
@@ -217,15 +225,35 @@ jobs:
             GOCASE_RUN_ARGS="-tlsEnable"
           fi
           ./x.py test go build $GOCASE_RUN_ARGS
+          
+      - name: Find reports and crashes
+        if: always()
+        run: |
           SANITIZER_OUTPUT=$(grep "Sanitizer:" tests/gocase/workspace -r || true)
           if [[ $SANITIZER_OUTPUT ]]; then
+            echo "found sanitizer reports:"
             echo "$SANITIZER_OUTPUT"
-            echo "\ndetail reports:\n"
-            cat $(find tests/gocase/workspace -iname stderr)
-            echo "sanitizer error was reported, exiting..."
+            echo "detail log:"
+            cat $(echo "$SANITIZER_OUTPUT" | awk -F ':' '{print $1}')
+            exit 1
+          fi
+          CRASHES=$(grep "Ooops!" tests/gocase/workspace -r || true)
+          if [[ $CRASHES ]]; then
+            echo "found crashes:"
+            echo "$CRASHES"
+            echo "detail log:"
+            cat $(echo "$CRASHES" | awk -F ':' '{print $1}')
             exit 1
           fi
 
+      - uses: actions/upload-artifact@v2
+        if: ${{ failure() && startsWith(matrix.os, 'ubuntu') }}
+        with:
+          name: kvrocks-coredumps-${{ matrix.name }}
+          path: |
+            ./build/kvrocks
+            ./coredumps/*
+

Review Comment:
   ```suggestion
               ./coredumps/*
               ./gocases/workspace/*
   
   ```
   ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org