Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

samba PANIC assert failed: lock_ref_count >= 0

Joined
Sep 2, 2015
Messages
17
Thanks
0
#1
I recently discovered some panics in my /var/log/samba4/log.smbd. It took me a while to discover them since only a single system has been having trouble. Looking back through the logs, the first panic happened 2017-05-11, which follows a "'smbd' finished starting" from the day before. The only indication of the problem has been failures in dovecot for some imap shared folders that are backed by samba. I've attached here the relevant excerpt from the smbd log.
 

Attachments

Joined
Sep 2, 2015
Messages
17
Thanks
0
#2
I should probably mention that I'm running FreeNAS-9.10-STABLE, and the issue continues with the latest update.
 
Joined
Sep 2, 2015
Messages
17
Thanks
0
#4
Thanks for the response. I'll certainly look forward to 9.2.10-U5. Is there any chance that I could get an estimate of when that might arrive?
 

Ericloewe

Not-very-passive-but-aggressive
Moderator
Joined
Feb 15, 2014
Messages
16,027
Thanks
3,881
#5
Later today, tomorrow or so.
 
Joined
Sep 2, 2015
Messages
17
Thanks
0
#7
Thanks. I'll test it out over the weekend. I ended up downgrading to 9.10.2-U1 in the meantime (U3 started causing the problem, and I didn't have U2).
 
Joined
Sep 2, 2015
Messages
17
Thanks
0
#8
I just performed an update to "FreeNAS-9.10.2-U5 (561f0d7a1)", but the issue still persists. I can trigger the issue quite reliably, but I don't have a minimal test. I tried flock(1), as well as a python script using fcntl.lockf(fd, LOCK_UN), but neither triggered the panic in smbd. Still, dovecot (and only dovecot, as far as I've seen) triggers it when trying to write to an mbox file in the shared folder. Unfortunately, I can't really keep the system in this state for testing; I'm going to have to stay on U1 for now.
 

Attachments

anodos

Belly-button Lint Extraordinaire
iXsystems
Joined
Mar 6, 2014
Messages
5,418
Thanks
1,490
#9
I just performed an update to "FreeNAS-9.10.2-U5 (561f0d7a1)", but the issue still persists. I can trigger the issue quite reliably, but I don't have a minimal test. I tried flock(1), as well as a python script using fcntl.lockf(fd, LOCK_UN), but neither triggered the panic in smbd. Still, dovecot (and only dovecot, as far as I've seen) triggers it when trying to write to an mbox file in the shared folder. Unfortunately, I can't really keep the system in this state for testing; I'm going to have to stay on U1 for now.
Interesting. I know you're working with a production system, but if you have a chance try to trigger the panic on 9.10.2-U5 with Samba logging set to "debug" (10). I'll try to cause a panic on my system as well. Is dovecot accessing the Samba share via Samba or some other protocol (local access / NFS)?
 

anodos

Belly-button Lint Extraordinaire
iXsystems
Joined
Mar 6, 2014
Messages
5,418
Thanks
1,490
#10
I just performed an update to "FreeNAS-9.10.2-U5 (561f0d7a1)", but the issue still persists. I can trigger the issue quite reliably, but I don't have a minimal test. I tried flock(1), as well as a python script using fcntl.lockf(fd, LOCK_UN), but neither triggered the panic in smbd. Still, dovecot (and only dovecot, as far as I've seen) triggers it when trying to write to an mbox file in the shared folder. Unfortunately, I can't really keep the system in this state for testing; I'm going to have to stay on U1 for now.
If dovecot is running on a separate Linux client, what is the kernel version?
 
Joined
Sep 2, 2015
Messages
17
Thanks
0
#11
If dovecot is running on a separate Linux client, what is the kernel version?
The kernel version was the first thing I thought of, since it is a dated system. I ended up getting a system running 4.11.3-200.fc25.x86_64 (Fedora 25) to duplicate the issue with a likewise recent version of dovecot. There's a single dovecot server that accesses the files, and the files are only accessed through samba. I'll see if I can find some time to get a more detailed debug log.
 
Top