Open sceniclife opened 3 years ago
Also seeing this.
Since /dev/shm
does not exist on macOS I think the core tools should either not try to use it on macOS, or fail more gracefully/silently (i.e. not print a warning since this is pretty much to be expected on macOS).
Printing this warning only makes the experience noisier and risks distracting from legitimate warnings IMO.
@pragnagopa @gohar94 this might be a scenario that wasn't completely covered. Wondering if shared memory should be completely disabled in local run scenarios.
@fabiocav I think the use of this is disabled but the initialization attempt happens anyway. I agree, we should do the initialization only when this is enabled.
Thanks! Flagging this for consideration in sprint 103
Moving to 105 as we're still iterating on the PR.
Full stacktrace form the worker - we'll add a check on the worker as well to prevent this happening if the shared memory directory is not supported on any platform
Job host started
Traceback (most recent call last):
File "/usr/local/Cellar/azure-functions-core-tools@3/3.0.3477/workers/python/3.9/OSX/X64/azure_functions_worker/bindings/shared_memory_data_transfer/file_accessor_unix.py", line 127, in _get_valid_mem_map_dirs
os.makedirs(dir_path)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 1] Operation not permitted: '/dev/shm'
Host lock lease acquired by instance ID '0000000000000000000000001A4849C5'.
Some update about this problem... I have same issue...
Core Tools Version: 3.0.3568 Commit hash: e30a0ede85fd498199c28ad699ab2548593f759b (64-bit)
Function Runtime Version: 3.0.15828.0
[2021-06-30T00:56:39.800Z] Found /Users/gildo.araujo/Projects/TesteTrigger/TesteTrigger/TesteTrigger.csproj. Using for user secrets file configuration.
[2021-06-30T00:56:40.836Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-06-30T00:56:40.836Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Thanks
Moving to 106 as we're still iterating on the PR
For those who want to force installation of v3.0.3442, the following might help:
cd $(brew --repository)/Library/Taps/azure/homebrew-functions
git checkout Update_3.0.3442
HOMEBREW_NO_AUTO_UPDATE=1 brew install azure-functions-core-tools@3
Taking ownership of this to complete the associated PR. Keeping in sprint 106 as we should still be able to make that date.
Hi Team, I couldn't able to run func start --build
on my mac os Big Sur v11.5.1
Due to issue
[2021-08-31T04:53:35.104Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions [2021-08-31T04:53:35.104Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Any help?
Hello all, just for information, same problem here even with the newest updates:
Extension bundle specified, skip install extension
Using port : ***
Azure Functions Core Tools
Core Tools Version: 3.0.3734 Commit hash: 61192bb28820be76916f85209916152801483456 (64-bit)
Function Runtime Version: 3.1.4.0
[2021-09-21T22:53:42.591Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-09-21T22:53:42.591Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Hello All, I have the same problem with CoreToolsVersion 3.0.3734
Azure Functions Core Tools
Core Tools Version: 3.0.3734 Commit hash: 61192bb28820be76916f85209916152801483456 (64-bit)
Function Runtime Version: 3.1.4.0
[2021-09-22T18:28:09.069Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-09-22T18:28:09.069Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Hi,
I have the same problem with asp.net Core
Azure Functions Core Tools
Core Tools Version: 3.0.3785 Commit hash: db6fe71b2f05d09757179d5618a07bba4b28826f (64-bit)
Function Runtime Version: 3.2.0.0
@michaelpeng36 can provide an update on when this will be fixed.
Hi guys,
I have the same issue:
Found Python version 3.9.7 (python3).
Azure Functions Core Tools
Core Tools Version: 3.0.3785 Commit hash: db6fe71b2f05d09757179d5618a07bba4b28826f (64-bit)
Function Runtime Version: 3.2.0.0
[2021-10-18T17:49:15.868Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-10-18T17:49:15.869Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
MacOS Catalina 10.15.7 Any update on the fix? thank u 😊
I have the same issue on v3.0.3904
Azure Functions Core Tools
Core Tools Version: 3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206 (64-bit)
Function Runtime Version: 3.3.1.0
[2021-10-27T10:23:53.593Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-10-27T10:23:53.593Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
[2021-10-27T10:23:54.813Z] Debugger listening on ws://127.0.0.1:5858/b6324543-61b3-4459-90b0-bb94d4ce75a8
Same issue.
Mac M1 Pro - Monterrey
`Core Tools Version: 3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206 (64-bit) Function Runtime Version: 3.3.1.0
[2022-02-14T19:30:49.444Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions [2022-02-14T19:30:49.449Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.`
Same issue, has the really been an issue since May 2021, when will it be fixed ?
Mac M1 Pro - Monterrey
`Azure Functions Core Tools Core Tools Version: 3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206 (64-bit) Function Runtime Version: 3.3.1.0
[2022-02-17T16:24:35.901Z] Found /Users/peteth/javaprojects/Capgemini2016/BST/AZ204-course/AZ204-course.csproj. Using for user secrets file configuration.
[2022-02-17T16:24:36.487Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions [2022-02-17T16:24:36.488Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted. [2022-02-17T16:24:36.489Z] Valid directories for shared memory usage: `
Hi, I fixed it by upgrading to core tools v4. follow these steps. go and make sure you click the docs for V4 https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cmacos%2Ccsharp%2Cportal%2Cbash
I get the same error with v4:
Core Tools Version: 4.0.4426 Commit hash: N/A (64-bit) Function Runtime Version: 4.1.3.17473
[2022-04-12T08:13:04.117Z] Traceback (most recent call last):
[2022-04-12T08:13:04.118Z] File "/usr/local/Cellar/azure-functions-core-tools@4/4.0.4426/workers/python/3.9/OSX/X64/azure_functions_worker/bindings/shared_memory_data_transfer/file_accessor_unix.py", line 127, in _get_valid_mem_map_dirs
[2022-04-12T08:13:04.118Z] os.makedirs(dir_path)
[2022-04-12T08:13:04.118Z] File "/Users/tconte/.pyenv/versions/3.9.9/lib/python3.9/os.py", line 215, in makedirs
[2022-04-12T08:13:04.118Z] makedirs(head, exist_ok=exist_ok)
[2022-04-12T08:13:04.118Z] File "/Users/tconte/.pyenv/versions/3.9.9/lib/python3.9/os.py", line 225, in makedirs
[2022-04-12T08:13:04.118Z] mkdir(name, mode)
[2022-04-12T08:13:04.118Z] PermissionError: [Errno 1] Operation not permitted: '/dev/shm'
same here...
Hi, I also get this error with v4:
Found Python version 3.9.9 (python3).
Azure Functions Core Tools Core Tools Version: 4.0.4483 Commit hash: N/A (64-bit) Function Runtime Version: 4.1.3.17473
Still getting this error
Version 3.0.3442 starts without any warning (yellow) messages
Version 3.0.3477 now starts with Operation not permitted message