Skip to content

mapcache_seed: try to kill still running threads after grace period#313

Merged
jmckenna merged 4 commits into
MapServer:mainfrom
marisn:seed_threads
Sep 27, 2023
Merged

mapcache_seed: try to kill still running threads after grace period#313
jmckenna merged 4 commits into
MapServer:mainfrom
marisn:seed_threads

Conversation

@marisn

@marisn marisn commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

On rare occasions a seeding thread might be stuck (e.g. deadlocked). In a such case seeder process can not finish at all as it would wait for thread to complete forever.

This PR waits for the thread to finish ten times with increasing waiting time till 55 seconds in total have passed and then proceeds to terminate all remaining threads.

Questions to discuss:

  • should there be a warning logged/printed?
  • are 55 seconds of grace time enough?

@jmckenna jmckenna added this to the 1.14.1 release milestone Sep 8, 2023
@jmckenna

jmckenna commented Sep 8, 2023

Copy link
Copy Markdown
Member

@marisn can you re-base this again main ? (I had made several changes to the CI system, so hopefully this can run without issues...)

@marisn

marisn commented Sep 9, 2023

Copy link
Copy Markdown
Contributor Author

I had already forgotten about this PR :D Let me know what else is needed.

It is really hard to test this PR, as it gets hit only when something goes terribly wrong (e.g. file system failure).

@jmckenna

jmckenna commented Sep 9, 2023

Copy link
Copy Markdown
Member

Thanks @marisn. I think a warning printed out when the 10x threshold is hit would be useful too.

@marisn

marisn commented Sep 27, 2023

Copy link
Copy Markdown
Contributor Author

Thanks @marisn. I think a warning printed out when the 10x threshold is hit would be useful too.

Is it better now?

@jmckenna

Copy link
Copy Markdown
Member

Yes thanks @marisn

@jmckenna jmckenna merged commit 9f4cf0e into MapServer:main Sep 27, 2023
@marisn marisn deleted the seed_threads branch September 30, 2025 11:24
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.

2 participants