Project

General

Profile

Actions

Bug #14306

open

Can't get SID for ID=0 type=0, status=-9977

Added by Lee Damon 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cifs - CIFS server and client
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

My /var/adm/messages log is filling up with these messages from sbmd. This isn't the first time this has happened and I see we're not the only site seeing it (https://illumos.topicbox.com/groups/omnios-discuss/T4ef0de18d0619eef-M21952692b0a1c779d451300a/smbd572-cant-get-sid-for-id0-type0-status-9977).

I'd like to get this to shut up and stop filing my logs, ideally by fixing whatever the underlying problem is. However, if it's truly ignorable perhaps a bandage could be applied to at least amelorate filling my disk with the error messages.

I restarted smbd and the log entries stopped for a whole 58 minutes then resumed.

SunOS fs2 5.11 omnios-r151038-b3a82a213e i86pc i386 i86pc

Dec 16 11:46:04 fs2 smbd549: [ID 617204 daemon.error] Can't get SID for ID=0 type=0, status=-9977
Dec 16 11:52:37 fs2 last message repeated 40 times
Dec 16 11:52:47 fs2 smbd549: [ID 617204 daemon.error] Can't get SID for ID=0 type=0, status=-9977
Dec 16 11:59:09 fs2 last message repeated 40 times
Dec 16 11:59:19 fs2 smbd549: [ID 617204 daemon.error] Can't get SID for ID=0 type=0, status=-9977


Files

id_out (8.11 KB) id_out Lee Damon, 2021-12-22 11:54 PM
Actions #1

Updated by Lee Damon 7 months ago

At andyf's suggestion I ran the following dtrace:

sudo dtrace -n 'pid$target::smb_idmap_bgm_report:entry{print(*args[1])}' -p `pgrep smbd`
dtrace: description 'pid$target::smb_idmap_bgm_report:entry' matched 1 probe
CPU     ID                    FUNCTION:NAME
  8  83851       smb_idmap_bgm_report:entry smb_idmap_t {
    int sim_idtype = 0
    uid_t *sim_id = 0
    char *sim_domsid = 0x87766d8
    uint32_t sim_rid = 0x80002911
    smb_sid_t *sim_sid = 0
    idmap_stat sim_stat = 0xffffd907
}
  2  83851       smb_idmap_bgm_report:entry smb_idmap_t {
    int sim_idtype = 0
    uid_t *sim_id = 0
    char *sim_domsid = 0x877e108
    uint32_t sim_rid = 0x80002911
    smb_sid_t *sim_sid = 0
    idmap_stat sim_stat = 0xffffd907
}
Actions #2

Updated by Lee Damon 7 months ago

sudo  dtrace -n 'pid$target::smb_idmap_bgm_report:entry{@[ustack()] = count()}' -p `pgrep smbd`

dtrace: description 'pid$target::smb_idmap_bgm_report:entry' matched 1 probe
^C

              libsmb.so.1`smb_idmap_bgm_report
              libsmb.so.1`smb_idmap_batch_getmappings+0x6b
              libsmb.so.1`smb_idmap_getsid+0x77
              libmlsvc.so.1`smb_quota_sidstr+0x4a
              libmlsvc.so.1`smb_quota_zfs_callback+0x67
              libzfs.so.1`zfs_userspace+0x104
              libmlsvc.so.1`smb_quota_zfs_get_quotas+0x61
              libmlsvc.so.1`smb_quota_tree_populate+0x9d
              libmlsvc.so.1`smb_quota_query+0x69
              smbd`smbd_dop_quota_query+0x5e
              smbd`smbd_door_dispatch_op+0x76
              libc.so.1`_thrp_setup+0x81
              libc.so.1`_lwp_start
                3
Actions #3

Updated by Lee Damon 7 months ago

For the record, this is what I have set for idmap.

 ; idmap list
add -d  winuser:*@*     unixuser:*
add -d  wingroup:*@*    unixgroup:*
Actions #4

Updated by Lee Damon 7 months ago

 ; sudo dtrace -n 'pid$target::smb_quota_sidstr:entry{@[arg0, arg1] = count()}' -p `pgrep smbd` 
dtrace: description 'pid$target::smb_quota_sidstr:entry' matched 1 probe
^C

            10513                2                3
            10513                6                3
                0                0                6
                0                2                6
                0                4                6
                0                6                6
                0                8                6
                0               10                6
                3                2                6
                3                6                6
               14                2                6
               14                6                6
            12186                0                6
            12186                4                6
            19328                0                6
            19328                4                6
Actions #5

Updated by Andy Fiddaman 7 months ago

Could you try running this d script?
Put it in a file such as idmap.d and run as:

./idmap.d -p `pgrep smbd`
#!/usr/sbin/dtrace -Cs

pid$target::smb_idmap_batch_getmappings:entry {
        self->sib = args[0];
}

pid$target::smb_idmap_batch_getmappings:return {
        mib = self->sib->sib_maps;
        printf("%d %s %d\n", mib->sim_stat,
            mib->sim_idtype == 0 ? "group" : "user",
            mib->sim_id == 0 ? 0 : *(uint_t *)mib->sim_id);
        printf("Domsid: %s\n",
            mib->sim_domsid ? copyinstr((uintptr_t)mib->sim_domsid) : "NULL");
}
Actions #6

Updated by Lee Damon 7 months ago

 ; sudo /usr/sbin/dtrace /tmp/idmap.d
dtrace: no probes specified

Actions #7

Updated by Yuri Pankov 7 months ago

Lee Damon wrote in #note-6:

[...]

Apparently you are missing the -p `pgrep smbd` part in command.

Actions #8

Updated by Lee Damon 7 months ago

Yuri Pankov wrote in #note-7:

Apparently you are missing the -p `pgrep smbd` part in command.

Where would that go?

Actions #9

Updated by Andy Fiddaman 7 months ago

Make the idmap.d file executable and run it with that as the argument.

chmod +x /tmp/idmap.d
/tmp/idmap.d -p `pgrep smbd`
Actions #10

Updated by Lee Damon 7 months ago

Andy Fiddaman wrote in #note-9:

Make the idmap.d file executable and run it with that as the argument.

oh duh. Running it for 60 seconds gave the attached result.

Actions

Also available in: Atom PDF