Skip to content

Free umpire's reference to our thread sync's error buffer#4409

Merged
roystgnr merged 2 commits intolibMesh:develfrom
lindsayad:free-others-buf-refs
Feb 24, 2026
Merged

Free umpire's reference to our thread sync's error buffer#4409
roystgnr merged 2 commits intolibMesh:develfrom
lindsayad:free-others-buf-refs

Conversation

@lindsayad
Copy link
Member

Else we get a seg fault due to attempting to publish to a buffer that's already been deleted. Umpire allocates it's OutputBuffer class via static singletons so luckily they publish this API for us otherwise we'd be screwed

@moosebuild
Copy link

moosebuild commented Feb 24, 2026

Job Coverage, step Generate coverage on eaf03ef wanted to post the following:

Coverage

Coverage did not change

Full coverage report

This comment will be updated on new commits.

Copy link
Member

@roystgnr roystgnr left a comment

Choose a reason for hiding this comment

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

I'm impressed you found this (my PETSc v3.23.5 build from July predates them adding Umpire in September; I wouldn't even have been able to replicate the problem!), but could we elaborate a bit in that comment? I had to dig into ostream_proxy.h before I realized that our "proxy" is so thin that it's outright sharing a buffer with the underlying target stream, and so Umpire is getting a hold of the buffers from std::cout and std::cerr despite never getting its hands on libMesh::out and libMesh::err.

I also feel like there just must be a better fix for this sort of thing than "wait for each new package that breaks and then add an API call to them" ... but I sure can't figure out what it would be.

@lindsayad
Copy link
Member Author

How's the expanded comment?

Copy link
Member

@roystgnr roystgnr left a comment

Choose a reason for hiding this comment

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

Looks good; thanks!

@roystgnr roystgnr enabled auto-merge February 24, 2026 16:53
@roystgnr roystgnr merged commit 5beedeb into libMesh:devel Feb 24, 2026
26 checks passed
@lindsayad lindsayad deleted the free-others-buf-refs branch February 24, 2026 20:27
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.

3 participants