[1/3] panfrost: Print a backtrace if there is one

Submitted by Rohan Garg on June 20, 2019, 1:58 p.m.

Details

Message ID 20190620135852.18167-2-rohan.garg@collabora.com
State New
Headers show
Series "panfrost: CI improvements" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rohan Garg June 20, 2019, 1:58 p.m.
---
 src/gallium/drivers/panfrost/ci/create-rootfs.sh     | 2 +-
 src/gallium/drivers/panfrost/ci/deqp-runner.sh       | 6 ++++++
 src/gallium/drivers/panfrost/ci/gitlab-ci.yml        | 4 ++--
 src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2 | 3 +++
 4 files changed, 12 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/ci/create-rootfs.sh b/src/gallium/drivers/panfrost/ci/create-rootfs.sh
index 84ce8cdc882..ff0742238fe 100644
--- a/src/gallium/drivers/panfrost/ci/create-rootfs.sh
+++ b/src/gallium/drivers/panfrost/ci/create-rootfs.sh
@@ -2,7 +2,7 @@ 
 
 set -ex
 
-apt-get -y install --no-install-recommends initramfs-tools libpng16-16 weston strace libsensors5
+apt-get -y install --no-install-recommends initramfs-tools libpng16-16 weston strace libsensors5 gdb
 passwd root -d
 chsh -s /bin/sh
 ln -s /bin/sh /init
diff --git a/src/gallium/drivers/panfrost/ci/deqp-runner.sh b/src/gallium/drivers/panfrost/ci/deqp-runner.sh
index 8645f75080e..47eef89a0d0 100644
--- a/src/gallium/drivers/panfrost/ci/deqp-runner.sh
+++ b/src/gallium/drivers/panfrost/ci/deqp-runner.sh
@@ -53,3 +53,9 @@  while [ -s /tmp/case-list.txt ]; do
 	    sed -i '1,'$BATCH_SIZE'd' /tmp/case-list.txt
 	fi
 done
+
+if [ -e /tmp/core ]; then
+	/usr/bin/gdb /usr/bin/weston /tmp/core \
+		-batch \
+	    -ex "t a a bt"
+fi
diff --git a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
index e1035e0fdff..887c93dbc8b 100644
--- a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
+++ b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
@@ -16,7 +16,7 @@ 
 variables:
   UPSTREAM_REPO: mesa/mesa
   DEBIAN_VERSION: testing-slim
-  DEBIAN_TAG: "2019-06-07-1"
+  DEBIAN_TAG: "2019-06-17-1"
 
 include:
   - project: 'wayland/ci-templates'
@@ -91,7 +91,7 @@  container:arm64:
     - meson . mesa-build
         --cross-file /tmp/cross_file.txt
         --libdir /artifacts/rootfs/mesa/lib/
-        --buildtype release
+        --buildtype debug
         -Dgallium-drivers=kmsro,panfrost
         -Ddri-drivers=
         -Dprefix=/artifacts/rootfs/mesa
diff --git a/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2 b/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
index f610f9c826a..8f3d516da76 100644
--- a/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
+++ b/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
@@ -52,6 +52,9 @@  actions:
           - mount -t devpts devpts /dev/pts
           - echo 1 > /proc/sys/kernel/printk
 #          - echo performance > /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0/governor
+          - echo /tmp/core > /proc/sys/kernel/core_pattern
+          - echo 0 > /proc/sys/kernel/core_uses_pid
+          - ulimit -c unlimited
           - sh /deqp/deqp-runner.sh
         parse:
           pattern: 'Test case ''(?P<test_case_id>\S*)''..\s+(?P<result>(Pass|NotSupported|QualityWarning|CompatibilityWarning|Fail|ResourceError|Crash|Timeout|InternalError))'

Comments

On Thu, 20 Jun 2019 at 15:59, Rohan Garg <rohan.garg@collabora.com> wrote:
>
> ---
>  src/gallium/drivers/panfrost/ci/create-rootfs.sh     | 2 +-
>  src/gallium/drivers/panfrost/ci/deqp-runner.sh       | 6 ++++++
>  src/gallium/drivers/panfrost/ci/gitlab-ci.yml        | 4 ++--
>  src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2 | 3 +++
>  4 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/panfrost/ci/create-rootfs.sh b/src/gallium/drivers/panfrost/ci/create-rootfs.sh
> index 84ce8cdc882..ff0742238fe 100644
> --- a/src/gallium/drivers/panfrost/ci/create-rootfs.sh
> +++ b/src/gallium/drivers/panfrost/ci/create-rootfs.sh
> @@ -2,7 +2,7 @@
>
>  set -ex
>
> -apt-get -y install --no-install-recommends initramfs-tools libpng16-16 weston strace libsensors5
> +apt-get -y install --no-install-recommends initramfs-tools libpng16-16 weston strace libsensors5 gdb
>  passwd root -d
>  chsh -s /bin/sh
>  ln -s /bin/sh /init
> diff --git a/src/gallium/drivers/panfrost/ci/deqp-runner.sh b/src/gallium/drivers/panfrost/ci/deqp-runner.sh
> index 8645f75080e..47eef89a0d0 100644
> --- a/src/gallium/drivers/panfrost/ci/deqp-runner.sh
> +++ b/src/gallium/drivers/panfrost/ci/deqp-runner.sh
> @@ -53,3 +53,9 @@ while [ -s /tmp/case-list.txt ]; do
>             sed -i '1,'$BATCH_SIZE'd' /tmp/case-list.txt
>         fi
>  done
> +
> +if [ -e /tmp/core ]; then
> +       /usr/bin/gdb /usr/bin/weston /tmp/core \
> +               -batch \
> +           -ex "t a a bt"
> +fi
> diff --git a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
> index e1035e0fdff..887c93dbc8b 100644
> --- a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
> +++ b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
> @@ -16,7 +16,7 @@
>  variables:
>    UPSTREAM_REPO: mesa/mesa
>    DEBIAN_VERSION: testing-slim
> -  DEBIAN_TAG: "2019-06-07-1"
> +  DEBIAN_TAG: "2019-06-17-1"
>
>  include:
>    - project: 'wayland/ci-templates'
> @@ -91,7 +91,7 @@ container:arm64:
>      - meson . mesa-build
>          --cross-file /tmp/cross_file.txt
>          --libdir /artifacts/rootfs/mesa/lib/
> -        --buildtype release
> +        --buildtype debug

Good stuff, but isn't this change making us hit assertions?

Cheers,

Tomeu

>          -Dgallium-drivers=kmsro,panfrost
>          -Ddri-drivers=
>          -Dprefix=/artifacts/rootfs/mesa
> diff --git a/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2 b/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
> index f610f9c826a..8f3d516da76 100644
> --- a/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
> +++ b/src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
> @@ -52,6 +52,9 @@ actions:
>            - mount -t devpts devpts /dev/pts
>            - echo 1 > /proc/sys/kernel/printk
>  #          - echo performance > /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0/governor
> +          - echo /tmp/core > /proc/sys/kernel/core_pattern
> +          - echo 0 > /proc/sys/kernel/core_uses_pid
> +          - ulimit -c unlimited
>            - sh /deqp/deqp-runner.sh
>          parse:
>            pattern: 'Test case ''(?P<test_case_id>\S*)''..\s+(?P<result>(Pass|NotSupported|QualityWarning|CompatibilityWarning|Fail|ResourceError|Crash|Timeout|InternalError))'
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Hey
> Good stuff, but isn't this change making us hit assertions?

Hm, I thought it only enabled debugging symbols. Do you have a recommendation 
on how to enable debug symbols but not enabling assertions?

Cheers
Rohan Garg
On 6/21/19 12:23 PM, Rohan Garg wrote:
> Hey
>> Good stuff, but isn't this change making us hit assertions?
> 
> Hm, I thought it only enabled debugging symbols. Do you have a recommendation
> on how to enable debug symbols but not enabling assertions?

I think assertions should be limited to the most basic of sanity checks, 
and the other asserts replaced by proper error handling.

Cheers,

Tomeu

On Mon, 24 Jun 2019 at 12:00, Rohan Garg <rohan.garg@collabora.com> wrote:
>
> > I think assertions should be limited to the most basic of sanity checks,
> > and the other asserts replaced by proper error handling.
>
> So, should I leave it as is and let us hit assertions that we fix?

Sorry, can you rephrase?

Thanks,

Tomeu