Skip to content

feat: crashpad_wait_for_upload Windows support #1255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2025

Conversation

supervacuus
Copy link
Collaborator

@supervacuus supervacuus commented May 23, 2025

Required crashpad changes: getsentry/crashpad#126


Steps to reproduce:

  • Set up Docker for Windows so you can run Windows containers (follow these steps)
  • Verify that everything worked by running a test container. If you use the nanoserver, as suggested, you will be able to reuse it below.
  • Build the Native SDK on the host system as a static build with static runtime libraries. This is extremely helpful when deploying to a minimal image, such as nanoserver, given the relatively complex SDK and runtime dependency chain.
    cmake -B build -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DSENTRY_BUILD_SHARED_LIBS=OFF -DSENTRY_BUILD_RUNTIMESTATIC=ON
    cmake --build .\build\ --config=RelWithDebInfo
    
  • ensure that the crashpad_handler (and maybe the WER module) are colocated with the sentry_example.exe
    cp .\build\crashpad_build\handler\RelWithDebInfo\crashpad_handler.exe .\build\RelWithDebInfo\.
    cp .\build\crashpad_build\handler\RelWithDebInfo\crashpad_wer.dll .\build\RelWithDebInfo\.
    
  • Run the sentry_example.exe with logging inside a nanoserver container only to verify the setup:
    docker run --rm -it -e SENTRY_DSN="YOUR_TEST_DSN" -v C:\host\path\to\your\build:C:\native_build mcr.microsoft.com/windows/nanoserver:ltsc2022 C:\native_build\RelWithDebInfo\sentry_example.exe log
    
  • Run the sentry_example.exe inside a nanoserver container to crash (this will typically fail to report):
    docker run --rm -it -e SENTRY_DSN="YOUR_TEST_DSN" -v C:\host\path\to\your\build:C:\native_build mcr.microsoft.com/windows/nanoserver:ltsc2022 C:\native_build\RelWithDebInfo\sentry_example.exe log crash
    
  • Run the sentry_example.exe inside a nanoserver container to crash, but with wait-for-upload enabled (this should always report):
    docker run --rm -it -e SENTRY_DSN="YOUR_TEST_DSN" -v C:\host\path\to\your\build:C:\native_build mcr.microsoft.com/windows/nanoserver:ltsc2022 C:\native_build\RelWithDebInfo\sentry_example.exe log crash crashpad-wait-for-upload
    

Sorry, something went wrong.

@supervacuus supervacuus requested a review from JoshuaMoelans May 23, 2025 13:14
Copy link

github-actions bot commented May 23, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d6ae15a

Copy link
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just like the original Linux implementation testing in CI is probably equally tricky, so maybe we should also provide instructions to locally test this?

Also, the backend tradeoff and container environment docs should be updated to no longer limit the wait_for_upload option to Linux only.

@supervacuus
Copy link
Collaborator Author

LGTM, just like the original Linux implementation testing in CI is probably equally tricky, so maybe we should also provide instructions to locally test this?

Also, the backend tradeoff and container environment docs should be updated to no longer limit the wait_for_upload option to Linux only.

These are all great points, @JoshuaMoelans. There is no need to rush this out; we should do all of those, but I primarily wanted this to be "out" and working. Now, we also need to ensure documentation and reproducibility.

@JanFellner
Copy link

Don´t want to put pressure or hurry... but is there a rough schedule when this will get merged?
I simply have no clue how this is handled from you from the maintainer side
Waiting for positive feedback on the PR? Anything i could do to help?
(Would not want to use an code from an open PR as basis in my products ;])

@supervacuus
Copy link
Collaborator Author

Don´t want to put pressure or hurry... but is there a rough schedule when this will get merged?

I think we can release this by the end of next week, maybe the week after that. This is a topic that was only very recently raised and came to fruition quicker than expected, as the entire topic of Windows containers in the context of the Native SDK isn't even internally prioritized or supported. Evaluating this also started before you began the discussion; that was primarily a coincidence.

I simply have no clue how this is handled from you from the maintainer side
Waiting for positive feedback on the PR?

We typically don't wait for feedback from users unless we have fixed a problem for a particular user. The issue is that there are currently way higher-priority tasks that we must address first. I was also unsure from the discussion whether you actually encountered the problem that wait_for_upload tries to address, since you asked a more general question.

So, in short, you won't have to base your product on this PR, but I can't promise exact timelines. However, you can test the changes in your test containers to see if they work for you. This would undoubtedly be valuable feedback, at least if they don't work without these changes.

@supervacuus supervacuus force-pushed the feat/crashpad-wait-for-upload-windows branch from 424dabd to 497367e Compare June 5, 2025 12:12
@supervacuus supervacuus merged commit c56ebde into master Jun 5, 2025
38 checks passed
@supervacuus supervacuus deleted the feat/crashpad-wait-for-upload-windows branch June 5, 2025 16:46
@supervacuus
Copy link
Collaborator Author

@JanFellner, this was released as part of 0.9.0.

supervacuus added a commit to getsentry/sentry-docs that referenced this pull request Jun 5, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#13863)

… options configuration.

This relates to getsentry/sentry-native#1255
where the `crashpad_wait_for_upload` option supports Windows (primarily
used in Windows Docker containers). We have not yet explicitly mentioned
that the current support only works for Linux, given that both
technologies mentioned (Docker + systemd) mainly serve that operating
system. However, increasingly, Sentry users show interest in support for
Windows containers, so we must now reflect this in the user-facing
option configuration.

This should only be merged when
getsentry/sentry-native#1255 is released.

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ x ] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
supervacuus added a commit to getsentry/sentry-docs that referenced this pull request Jun 5, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#13865)

… backend tradeoffs.

This relates to getsentry/sentry-native#1255
where the `crashpad_wait_for_upload` option supports Windows (primarily
used in Windows Docker containers).

This adds Windows as a supported container platform and links it to a
preliminary release in the alert box for `crashpad_wait_for_upload`.

This should only be merged when
getsentry/sentry-native#1255 is released.

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
supervacuus added a commit to getsentry/sentry-docs that referenced this pull request Jun 5, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#13864)

… container usage.

This relates to getsentry/sentry-native#1255
where the crashpad_wait_for_upload option supports Windows (primarily
used in Windows Docker containers).

This adds a `PowerShell` script for users in older versions that acts
equivalently to the bash script. It also adds Windows as a supported
container platform and links it to a preliminary release.

This should only be merged when
getsentry/sentry-native#1255 is released.

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
antonpirker pushed a commit to getsentry/sentry-docs that referenced this pull request Jun 6, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
antonpirker Anton Pirker
#13863)

… options configuration.

This relates to getsentry/sentry-native#1255
where the `crashpad_wait_for_upload` option supports Windows (primarily
used in Windows Docker containers). We have not yet explicitly mentioned
that the current support only works for Linux, given that both
technologies mentioned (Docker + systemd) mainly serve that operating
system. However, increasingly, Sentry users show interest in support for
Windows containers, so we must now reflect this in the user-facing
option configuration.

This should only be merged when
getsentry/sentry-native#1255 is released.

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ x ] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
antonpirker pushed a commit to getsentry/sentry-docs that referenced this pull request Jun 6, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
antonpirker Anton Pirker
#13865)

… backend tradeoffs.

This relates to getsentry/sentry-native#1255
where the `crashpad_wait_for_upload` option supports Windows (primarily
used in Windows Docker containers).

This adds Windows as a supported container platform and links it to a
preliminary release in the alert box for `crashpad_wait_for_upload`.

This should only be merged when
getsentry/sentry-native#1255 is released.

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
antonpirker pushed a commit to getsentry/sentry-docs that referenced this pull request Jun 6, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
antonpirker Anton Pirker
#13864)

… container usage.

This relates to getsentry/sentry-native#1255
where the crashpad_wait_for_upload option supports Windows (primarily
used in Windows Docker containers).

This adds a `PowerShell` script for users in older versions that acts
equivalently to the bash script. It also adds Windows as a supported
container platform and links it to a preliminary release.

This should only be merged when
getsentry/sentry-native#1255 is released.

<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants