Skip to content
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

.NET Bug: MermaidRenderer fails when invoked in parallel #10457

Open
crickman opened this issue Feb 9, 2025 · 0 comments
Open

.NET Bug: MermaidRenderer fails when invoked in parallel #10457

crickman opened this issue Feb 9, 2025 · 0 comments
Assignees
Labels
bug Something isn't working experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code processes samples sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Comments

@crickman
Copy link
Contributor

crickman commented Feb 9, 2025

Describe the bug

MermaidRenderer uses the same temp-file location for all invocations. This results in file contention that leads to an IOException.

Message: 
System.IO.IOException : The process cannot access the file 'C:\Users\crickman\AppData\Local\Temp\mermaid_temp.html' because it is being used by another process.

  Stack Trace: 
FileSystem.DeleteFile(String fullPath)
MermaidRenderer.GenerateMermaidImageAsync(String mermaidCode, String filenameOrPath) line 117
...

To Reproduce
Steps to reproduce the behavior:

  1. Add a second sample to GettingStartedWithProcesses that invokes MermaidRenderer
  2. Run samples with parallel execution enavled

Expected behavior
Samples execute without exception. (Use a unique temporary file for each invocation)

Platform

  • Language: C#
@crickman crickman added bug Something isn't working experimental Associated with an experimental feature processes samples labels Feb 9, 2025
@crickman crickman added the .NET Issue or Pull requests regarding .NET code label Feb 9, 2025
@github-actions github-actions bot changed the title Bug: MermaidRenderer fails when invoked in parallel .Net: Bug: MermaidRenderer fails when invoked in parallel Feb 9, 2025
@evchaki evchaki added the sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) label Feb 10, 2025
@crickman crickman changed the title .Net: Bug: MermaidRenderer fails when invoked in parallel .NET Bug: MermaidRenderer fails when invoked in parallel Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code processes samples sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Projects
Status: No status
Development

No branches or pull requests

5 participants