ci: Generate crashlogs on Windows
Hi,
cdb.exe was available on GHA Windows images but it wasn't configured
to generate crashlogs. Attached patch configures cdb.exe to generate
crashlogs to "<github.workspace>\crashlogs\" in
"crashlog-<pid-in-hex>.txt" format. Current upload logs step already
collects these logs so no change is needed there.
Most of the logic is copied from where (previous) Postgres CI Windows
images were generated [1]https://github.com/anarazel/pg-vm-images/blob/main/scripts/windows_install_dbg.ps1. When I use the '!adplusext.adpprocname'
debugger flag, the CI job hangs. It needs 'adplusext.dll' to run but
it isn't available on GHA Windows images.
Example GHA run which crashlogs are generated and collected:
https://github.com/nbyavuz/postgres/actions/runs/27275147059
[1]: https://github.com/anarazel/pg-vm-images/blob/main/scripts/windows_install_dbg.ps1
--
Regards,
Nazir Bilal Yavuz
Microsoft
Attachments:
v1-0001-ci-Generate-crashlogs-on-Windows.patchtext/x-patch; charset=US-ASCII; name=v1-0001-ci-Generate-crashlogs-on-Windows.patchDownload+88-7
Hi,
On 2026-06-10 15:59:20 +0300, Nazir Bilal Yavuz wrote:
cdb.exe was available on GHA Windows images but it wasn't configured
to generate crashlogs. Attached patch configures cdb.exe to generate
crashlogs to "<github.workspace>\crashlogs\" in
"crashlog-<pid-in-hex>.txt" format. Current upload logs step already
collects these logs so no change is needed there.Most of the logic is copied from where (previous) Postgres CI Windows
images were generated [1]. When I use the '!adplusext.adpprocname'
debugger flag, the CI job hangs. It needs 'adplusext.dll' to run but
it isn't available on GHA Windows images.Example GHA run which crashlogs are generated and collected:
https://github.com/nbyavuz/postgres/actions/runs/27275147059
Thanks for working on this!
+++ b/.github/actions/windows-setup-debugger/action.yml @@ -0,0 +1,82 @@ +name: Setup Windows debugger +description: >- + Setup Windows debugger to log all crashes to + <workspace>\crashlogs\crashlog-<pid-in-hex>.txt + +runs: + using: composite + steps: + - name: Setup Windows debugger + shell: pwsh + run: | + $crashdir = "${{ github.workspace }}/crashlogs" + New-Item -ItemType Directory -Force -Path $crashdir
Any reason to not just put this into src/tools/ci/<something>.ps1? Given that
we're just talking about a single step, I don't really see the benefit of a
composite action here.
Greetings,
Andres Freund
Hi,
Thank you for looking into this!
On Wed, 10 Jun 2026 at 16:49, Andres Freund <andres@anarazel.de> wrote:
On 2026-06-10 15:59:20 +0300, Nazir Bilal Yavuz wrote:
+++ b/.github/actions/windows-setup-debugger/action.yml @@ -0,0 +1,82 @@ +name: Setup Windows debugger +description: >- + Setup Windows debugger to log all crashes to + <workspace>\crashlogs\crashlog-<pid-in-hex>.txt + +runs: + using: composite + steps: + - name: Setup Windows debugger + shell: pwsh + run: | + $crashdir = "${{ github.workspace }}/crashlogs" + New-Item -ItemType Directory -Force -Path $crashdirAny reason to not just put this into src/tools/ci/<something>.ps1? Given that
we're just talking about a single step, I don't really see the benefit of a
composite action here.
Not any particular reason. I started implementing that in a pg-ci.yml,
then moved it to composite action when I realized it was too long. I
think having a script is better, so attached v2 uses that way.
--
Regards,
Nazir Bilal Yavuz
Microsoft