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

Linux aarch64 Support #17640

Closed
mkurz opened this issue Mar 22, 2023 · 10 comments
Closed

Linux aarch64 Support #17640

mkurz opened this issue Mar 22, 2023 · 10 comments

Comments

@mkurz
Copy link

mkurz commented Mar 22, 2023

Please make sure that it also works with Kernels that do not use 4k page sizes. For example I use Asahi Linux which uses a page size of 16k:

The Asahi Linux kernel is compiled to use 16K pages.

Would be really nice if you consider that, thanks!

@alanrenmsft
Copy link
Contributor

@mkurz as I mentioned in this comment: #1733 (comment). could you please give it a try?

@mkurz
Copy link
Author

mkurz commented Mar 23, 2023

@alanrenmsft I can successfully install the extension:

Initializing SQL tools service for the mssql extension.
Note: mssql commands will be available after installing the service.

Platform: linux, aarch64, name=archarm, version=unknown (Linux)

Installing SQL tools service to /home/mkurz/.vscode/extensions/ms-mssql.mssql-1.19.0/sqltoolsservice/4.6.0.14/Linux.
Downloading https://github.com/Microsoft/sqltoolsservice/releases/download/4.6.0.14/microsoft.sqltools.servicelayer-linux-arm64-net7.0.tar.gz
(65251 KB) .................... Done!
Installing ...
Done! 843 files unpacked.

Also can see the commands:

However I do not have access to a SQL server instance right now and running SQL Edge via docker doesn't work currently.
So I can test running queries etc.
I will update when I can connect to a server.

@mkurz
Copy link
Author

mkurz commented Apr 4, 2023

@alanrenmsft I run into another problem when trying to run Azure SQL Edge via docker on my ARM64 Linux system (aarch64). The docker image does actually support ARM64 Linux, however it seems only systems with a kernal page size of 8kb (which most Linux distributions use by default). However my Asahi Linux installation has a page size of 16kb:

$ getconf PAGESIZE
16384

So when running the Azure SQL Edge image on my system I end up with:

$ docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=abcdefghi' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge
098abcdb28957b302b11440f237168cb5c7051a920a65d5f3b38a7a4ce09b529

$ docker logs azuresqledge
Azure SQL Edge will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2140520.
2023/04/04 16:36:57 [launchpadd] INFO: Extensibility Log Header: <timestamp> <process> <sandboxId> <sessionId> <message>
2023/04/04 16:36:57 [launchpadd] WARNING: Failed to load /var/opt/mssql/mssql.conf ini file with error open /var/opt/mssql/mssql.conf: no such file or directory
2023/04/04 16:36:57 [launchpadd] INFO: DataDirectories =  /bin:/etc:/lib:/lib32:/lib64:/sbin:/usr/bin:/usr/include:/usr/lib:/usr/lib32:/usr/lib64:/usr/libexec/gcc:/usr/sbin:/usr/share:/var/lib:/opt/microsoft:/opt/mssql-extensibility:/opt/mssql/mlservices:/opt/mssql/lib/zulu-jre-11:/opt/mssql-tools
2023/04/04 16:36:57 Drop permitted effective capabilities.
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
# ...
# same message round 500 times
# ...
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
Error in GnuTLS initialization: ASN1 parser: Element was not found.
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
Out of memory allocating bitmask: Cannot allocate memory

It seems this can be fixed by building jemalloc with --with-lg-page=16, like done here:

More details and comments:

I know this is the bug tracker for vscode-mssql, however do you know where to report this bug and it's solution to the sql server team where actually someone looks at it and doesn't get lost? Do you know someone from the sql server team you can ping here on GitHub or to forward my issue to?

I think this could easily be solved if someone who is in charge takes a look at.

Thanks!

@alanrenmsft
Copy link
Contributor

@dzsquared do you know where to report the Azure SQL Edge image issues?

@dzsquared
Copy link
Contributor

All container image issues go to https://github.com/microsoft/mssql-docker, I believe. @kendalvandyke, fyi

@alanrenmsft
Copy link
Contributor

@mkurz Did you get a chance to verify the mssql extension by connecting to another server?

@mkurz
Copy link
Author

mkurz commented Apr 4, 2023

@alanrenmsft Sorry not yet, I switched machines an didn't set up everthing yet (including necessary VPN). However I will try to do that until tomorrow. Will come back asap.

@mkurz
Copy link
Author

mkurz commented Apr 4, 2023

FYI: Posted here: microsoft/mssql-docker#824

@mkurz
Copy link
Author

mkurz commented Apr 12, 2023

@alanrenmsft I finally could try the extenstion you provided me. Works fine! I can connect to the server, can run select and update queries. Results shown in nice tables. The servers view shows me the servers I created. Looking forward to the release!
Here is a screenshot
Untitled

@alanrenmsft
Copy link
Contributor

@mkurz thanks for confirming.

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

No branches or pull requests

3 participants