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

Invoke-DbaQuery segfaults on Linux with PowerShell 7.2 when using Kerberos auth #8179

Closed
ajansveld opened this issue Feb 15, 2022 · 8 comments

Comments

@ajansveld
Copy link

Verified issue does not already exist?

Yes

What error did you receive?

Segmentation fault (core dumped)
EXIT STATUS 139

Steps to Reproduce

Invoke-DbaQuery -SqlInstance myserver -Query 'USE AdventureWorks2017; SELECT TOP 10 * FROM Sales.SalesOrderHeader'

Are you running the latest release?

Yes

Other details or mentions

This is a known issue: dotnet/SqlClient#1390.
It was fixed in Microsoft.Data.SqlClient v4.0.1, can we upgrade the bundled package to the latest version?

What PowerShell host was used when producing this error

PowerShell Core (pwsh.exe)

PowerShell Host Version

Name                           Value
----                           -----
PSVersion                      7.2.0
PSEdition                      Core
GitCommitId                    7.2.0
OS                             Linux 3.10.0-1160.53.1.el7.jane2.x86_64 #1 SMP Thu Jan 20 14:27:34 HKT 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

SQL Server Edition and Build number

Microsoft SQL Server 2017 (RTM-CU28) (KB5008084) - 14.0.3430.2 (X64)
        Dec 17 2021 14:30:27
        Copyright (C) 2017 Microsoft Corporation
        Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

.NET Framework Version

.NET 6.0.0-rtm.21522.10

@ajansveld ajansveld added bugs life triage required New issue that has not been reviewed by maintainers labels Feb 15, 2022
@danpousson
Copy link

I get the same error from docker

@ajansveld
Copy link
Author

This was supposedly fixed in Microsoft.Data.SqlClient v4.0.1 (and System.Data.SqlClient v4.8.4).
Are there any plans to update to that (or the latest) version?

@potatoqualitee
Copy link
Member

That is what I'm working on now, actually -- trying to get it to System.Data.SqlClient 5.0 but I'm in DLL hell. I imagine I'll figure it out by the weekend. For reference (tho I have new problems): microsoft/sqlmanagementobjects#114

@andreasjordan andreasjordan added smo and removed triage required New issue that has not been reviewed by maintainers labels Oct 24, 2022
@garyhampson
Copy link

Have there been any updates to this? I too am experiencing seg faults when running a simple Invoke-DbaQuery call in PS 7.3.0 on Centos 7.

@potatoqualitee
Copy link
Member

@garyhampson yes, this will be resolved when dbatools 2.0 is released in the upcoming weeks. I have tested invoke-dbaquery with success.

@potatoqualitee
Copy link
Member

PS /mnt/c/github> kinit -l 9h  -r  6d [email protected]
Password for [email protected]:
PS /mnt/c/github> ipmo ../gallery/dbatools.core.library
PS /mnt/c/github> ipmo ./dbatools

PS /mnt/c/github> Connect-DbaInstance -SqlInstance sqlcs

ComputerName Name  Product              Version   HostPlatform IsAzure IsClustered ConnectedAs
------------ ----  -------              -------   ------------ ------- ----------- -----------
sqlcs        sqlcs Microsoft SQL Server 15.0.4236 Windows      False   False       AD\cl

PS /mnt/c/github> Invoke-DbaQuery -SqlInstance sqlcs -Query "select 1"

Column1
-------
      1

gonna mark this as done but you'll have to wait for dbatools 2.0 in the gallery before it'll work

@garyhampson
Copy link

Thanks @potatoqualitee - Do we know when 2.0 will be made available? Just curious if I should try to work around this issue for now or wait for it to be released.

@potatoqualitee
Copy link
Member

it'll probably be about 2 weeks, @garyhampson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants