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

[BUG] Call BlobAccessPolicy.StartsOn on a policy without Start Time, will make progress crash and exist #14455

Closed
blueww opened this issue Aug 21, 2020 · 4 comments · Fixed by #14872
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@blueww
Copy link
Member

blueww commented Aug 21, 2020

Describe the bug
Please provide the description of issue you're seeing.
On "Azure.Storage.Blobs" Version="12.5.1", when try to call BlobAccessPolicy.StartsOn on a policy without Start/Expire Time, The whole process will crash and exist, even try catch can't catch the exception.

This a regression from 12.5.0-preview.6

Expected behavior
What is the expected behavior?
It seems BlobAccessPolicy.StartsOn is replaced with "PolicyStartsOn". If so, we should make build fail when use "StartsOn", or make the "StartOn" still work although not suggest to use.

Actual behavior (include Exception or Stack Trace)
What is the actual behavior?

Currently:

  1. The old code write with "StartsOn" will make program crash , and try catch not work. ( Like when powershell call the code, the whole PSH console will disappear.) Error is:

System.StackOverflowException
HResult=0x800703E9
Message=Exception of type 'System.StackOverflowException' was thrown.

  1. When user debug the program and try to expand the AccessPolicy object in Watch window, will get error:
---------------------------
Microsoft Visual Studio
---------------------------
The target process exited with code -2147023895 while evaluating the function 'Azure.Storage.Blobs.Models.BlobAccessPolicy.ExpiresOn.get'.

If the problem happens regularly, consider disabling the Tools->Options setting "Debugging->General->Enable property evaluation and other implicit function calls" or debugging the cause by evaluating the expression from the Immediate window. See help for information on doing this.
---------------------------
OK   Help   
---------------------------

image

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

Following code can repro the issue:

            BlobAccessPolicy AccessPolicy = new BlobAccessPolicy()
            {
                Permissions = "rw"
            };
            Console.WriteLine(AccessPolicy.ExpiresOn); // crash happen here
            Console.WriteLine(AccessPolicy.StartsOn);

Environment:

  • Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.5.1]
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]
.NET Core SDK (reflecting any global.json):
 Version:   2.2.108
 Commit:    33ed5b90ce

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.108\

Host (useful for support):
  Version: 2.2.6
  Commit:  7dac9b1b51

.NET Core SDKs installed:
  2.2.108 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
  • IDE and version : [e.g. Visual Studio 16.3]
    VS 15.7.4
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 21, 2020
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Aug 21, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 21, 2020
@ghost
Copy link

ghost commented Aug 21, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@jsquire
Copy link
Member

jsquire commented Aug 21, 2020

Thank you for your feedback. Tagging and routing to the team best able to assist.

@amnguye amnguye self-assigned this Aug 26, 2020
@seanmcc-msft
Copy link
Member

Hi @blueww, I'll put out a fix for this, but StartsOn and ExpiresOn are deprecated. I recommend using PolicyStartsOn and PolicyExpirieOn instead.

@blueww
Copy link
Member Author

blueww commented Sep 7, 2020

@seanmcc-msft
Thanks for the fix!
We have already switch to PolicyStartsOn and PolicyExpirieOn in PSH code.
We need the fix as when we debug the code and expand AccessPolicy object in Watch window, the whole process will crash.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants