Project

General

Profile

Actions

Bug #14479

closed

SMB testoplock broken after 13515

Added by Gordon Ross 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
smb - SMB server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

After the fixes in #13515 testoplock crashes:

gwr@oi-work$ mdb testoplock core
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> ::status
debugging core file of testoplock (32-bit) from oi-work
file: testoplock
initial argv: /tank/ws2/illumos-wpts/proto/root_i386/usr/lib/smbsrv/testoplock
threading model: native threads
status: process panicked
upanic message: failure for thread 0xfed32a40, thread-id 1: assertion failed: MUTEX_HELD(&node->n_oplock.ol_mutex), file: ../../../uts/common/fs/smbsrv/smb_cmn_oplock.c, line: 3599\x0a
libc panic message: failure for thread 0xfed32a40, thread-id 1: assertion failed: MUTEX_HELD(&node->n_oplock.ol_mutex), file: ../../../uts/common/fs/smbsrv/smb_cmn_oplock.c, line: 3599
> $C
08046888 libc.so.1`syscall+0x13(80468d0, 320, fef530ab, fef06000, 80468d0, fef06000)
080468a8 libc.so.1`__set_panicstr(80468d0)
08046c08 libc.so.1`_assfail+0x1a0(fef6a760, 0, 0)
08046c38 libfakekernel.so.1`vpanic+0x8f(fef58d90, 8046c74)
08046c68 libfakekernel.so.1`fm_panic(fef58d90)
08046c88 libfakekernel.so.1`assfail+0x34(8056b6c, 8056afc, e0f)
08046cb8 smb_oplock_move+0x85(806e980, 806ec30, 806eba8)
08046ce8 do_move+0x8f(2, 806e7a7)
08046d38 main+0x403(8046d3c, fef135c8)
08046d78 _start_crt+0x9a(1, 8046da4, fefcffef, 0, 0, 0)
08046d98 _start+0x1a(1, 8047004, 0, 8047045, 804708e, 80470af)
> 


Related issues

Related to illumos gate - Bug #13515: panic with bad mutex in smb_ofile_hold_olbrkClosedGordon Ross

Actions
Related to illumos gate - Feature #8809: libzpool should leverage work done in libfakekernelClosed2017-11-17

Actions
Related to illumos gate - Bug #14514: libfakekernel uses system headers, not proto or usr/src onesClosedDan McDonald

Actions
Actions #1

Updated by Gordon Ross 7 months ago

  • Status changed from New to In Progress

The changes for 13515 added some ASSERTs of mutex holds that are not held in testoplock. Add mutex enter/exit calls.
Also fix testloplock linking after 8809, which moved libfakekernel to /lib (for libzpool)

Actions #2

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 2010
Actions #3

Updated by Joshua M. Clulow 7 months ago

  • Related to Bug #13515: panic with bad mutex in smb_ofile_hold_olbrk added
Actions #4

Updated by Joshua M. Clulow 7 months ago

  • Related to Feature #8809: libzpool should leverage work done in libfakekernel added
Actions #5

Updated by Gordon Ross 6 months ago

After the fix:

$ cd $SRC/cmd/smbsrv/testoplock
$ ./Run-tests.sh 
case01 PASS
case02 PASS
case03 PASS
case04 PASS
case05 PASS
case06 PASS
case07 PASS
case08 PASS
case09 PASS
case10 PASS
case11 PASS
case12 PASS
case13 PASS

Actions #6

Updated by Electric Monk 6 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 4d723c3fe851d72cc2dc241f5a1777f9e3e85b87

commit  4d723c3fe851d72cc2dc241f5a1777f9e3e85b87
Author: Gordon Ross <gwr@racktopsystems.com>
Date:   2022-02-15T23:46:43.000Z

    14479 SMB testoplock broken after 13515
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Matt Barden <mbarden@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions #7

Updated by Electric Monk 6 months ago

git commit 94afd1448ba04525848cf1165d8deec88a124035

commit  94afd1448ba04525848cf1165d8deec88a124035
Author: Gordon Ross <gwr@racktopsystems.com>
Date:   2022-02-16T14:48:28.000Z

    14479 SMB testoplock broken after 13515 (fix check_rtime)

Actions #8

Updated by Dan McDonald 6 months ago

  • Related to Bug #14514: libfakekernel uses system headers, not proto or usr/src ones added
Actions

Also available in: Atom PDF