Bug 237038

Summary: net-mgmt/wmi-client: smb_panic()] PANIC: internal error
Product: Ports & Packages Reporter: Frank Brendel <frank.brendel>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: New ---    
Severity: Affects Many People CC: koichiro
Priority: --- Flags: koichiro: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   

Description Frank Brendel 2019-04-05 10:47:51 UTC
The wmic command crashes with the error

[lib/util/fault.c:163:fault_report()] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lib/util/fault.c:164:fault_report()] INTERNAL ERROR: Signal 10 in pid 721 (4.0.0tp4-SVN-build-UNKNOWN)[lib/util/fault.c:165:fault_report()] 
Please read the file BUGS.txt in the distribution
[lib/util/fault.c:166:fault_report()] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lib/util/fault.c:144:smb_panic()] PANIC: internal error
Abort (core dumped)

and a wmic.core is dumped.

To reproduce it run
  wmic -U domain/Administrator //host.local "select * from Win32_ComputerSystem"

After entering the password it crashes.
With a wrong password it returns 'NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied' as expected.

This happens on a freshly installed amd64 FreeBSD 11.2 and 12.0 respectively.

The wmic command succeeded on CentOS 7 with wmic-4.0.0tp4-0.x86_64.rpm from rpmfind.net.
Comment 1 KIKUCHI Koichiro 2019-04-08 11:38:27 UTC
I've tested on FreeBSD 11.1 and 11.2 with wmic installed from official package repo and couldn't reproduse your issue.

please let me know

 - The version of the window you are using
 - How to install wmic
Comment 2 Frank Brendel 2019-04-08 14:54:53 UTC
The error occurs with Windows Server 2008 R2 and Windows Server 2012 R2.
Both are Active Directory members.

I have it installed as package (pkg install wmi-client) as well as from the ports (cd /usr/ports/net-mgmt/wmi-client/ && make install).
Comment 3 KIKUCHI Koichiro 2019-04-17 06:54:37 UTC
(In reply to Frank Brendel from comment #2)
Sorry for delay.

I've tested again with Windows 2008 R2 (non AD member) and Windows 2012 (AD member) hosts, but still couldn't reproduce it. 

Can you provide step by step reproduction procedure that contains setting up Windows.
Comment 4 Frank Brendel 2019-04-23 13:26:40 UTC
The Windows installations are more or less standard, nothing special.
Same subnet and firewalls off.

I found out that using an IP address instead of the hostname works.
Strange because host.local is resolvable.