Bug 6518 - Panic in share_mode_lock_destructor on QNX 6.4.1
Summary: Panic in share_mode_lock_destructor on QNX 6.4.1
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.3.6
Hardware: x86 Other
: P3 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-29 15:10 UTC by Matt Kraai (mail address dead)
Modified: 2018-12-27 22:15 UTC (History)
0 users

See Also:


Attachments
Log file (9.55 KB, text/plain)
2009-06-29 15:10 UTC, Matt Kraai (mail address dead)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Kraai (mail address dead) 2009-06-29 15:10:12 UTC
On QNX 6.4.1, smbd sometimes panics in share_mode_lock_destructor.  Here's a backtrace:

 #0  0xb033dad1 in SignalKill () from /usr/qnx641/target/qnx6/x86/lib/libc.so.3
 #1  0xb032c82e in raise () from /usr/qnx641/target/qnx6/x86/lib/libc.so.3
 #2  0xb032ab08 in abort () from /usr/qnx641/target/qnx6/x86/lib/libc.so.3
 #3  0x0821474d in dump_core () at lib/fault.c:242
 #4  0x08225027 in smb_panic (why=0x8439718 "could not store share mode entry") at lib/util.c:1689
 #5  0x081ddbb0 in share_mode_lock_destructor (lck=0x84c1ec0) at locking/locking.c:748
 #6  0x081ff58b in talloc_free (ptr=0x84c1ec0) at lib/talloc/talloc.c:515
 #7  0x08096cb4 in open_file_ntcreate_internal (conn=0x84c11b0, req=0x84c1b30, fname=0x84c1cc0 "...", psbuf=0x80473a0, access_mask=131478, share_access=3, create_disposition=5, create_options=64, new_dos_attributes=0, oplock_request=3, pinfo=0x804739c, fsp=0x84c51a0) at smbd/open.c:2171
 #8  0x08096d3a in open_file_ntcreate (conn=0x84c11b0, req=0x84c1b30, fname=0x84c1cc0 "...", psbuf=0x80473a0, access_mask=131478, share_access=3, create_disposition=5, create_options=64, new_dos_attributes=128, oplock_request=3, pinfo=0x804739c, result=0x8047394) at smbd/open.c:2204
 #9  0x08097e40 in create_file_unixpath (conn=0x84c11b0, req=0x84c1b30, fname=0x84c1cc0 "...", access_mask=131478, share_access=3, create_disposition=5, create_options=<value optimized out>, file_attributes=128, oplock_request=3, allocation_size=0, sd=0x0, ea_list=0x0, result=0x8047488, pinfo=0x804748c, psbuf=0x8047490) at smbd/open.c:3085
 #10 0x080985b8 in create_file (conn=0x84c11b0, req=0x84c1b30, root_dir_fid=0, fname=0x84c1cc0 "...", access_mask=131478, share_access=3, create_disposition=5, create_options=64, file_attributes=128, oplock_request=3, allocation_size=0, sd=0x0, ea_list=0x0, result=0x80475c0, pinfo=0x80475c4, psbuf=0x80475c8) at smbd/open.c:3466
 #11 0x0806dcba in reply_ntcreate_and_X (req=0x84c1b30) at smbd/nttrans.c:483
 #12 0x080a8645 in switch_message (type=162 '¢', req=0x84c1b30, size=178) at smbd/process.c:1486
 #13 0x080aa369 in smbd_process () at smbd/process.c:1509
 #14 0x083d30a5 in main (argc=-1338849234, argv=0x8047ee4) at smbd/server.c:1515
Comment 1 Matt Kraai (mail address dead) 2009-06-29 15:10:52 UTC
Created attachment 4364 [details]
Log file
Comment 2 Matt Kraai (mail address dead) 2009-06-30 11:25:45 UTC
I don't know how I missed this before, but this may have been caused by corruption:

 http://us6.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2617782

I've removed the database and, if the problem doesn't occur again, I'll close this report.
Comment 3 Matt Kraai (mail address dead) 2009-07-09 11:16:10 UTC
(In reply to comment #2)
> I don't know how I missed this before, but this may have been caused by
> corruption:
> 
> 
> http://us6.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2617782
> 
> I've removed the database and, if the problem doesn't occur again, I'll close
> this report.

The problem recurs with Samba 3.2.13 and 3.3.6 but not with 3.0.35 or 3.4.0.
Comment 4 Matt Kraai (mail address dead) 2009-09-04 16:03:16 UTC
(In reply to comment #3)
> The problem recurs with Samba 3.2.13 and 3.3.6 but not with 3.0.35 or 3.4.0.

We had an occurrence of this problem with Samba 3.4.0 today.  We've been using this version for around two months and this is the first time the problem has shown up.
Comment 5 Volker Lendecke 2009-09-05 11:57:45 UTC
Does QNX do proper mmap? If it has problems with mmap, you might want to try "use mmap = no".

Volker
Comment 6 Volker Lendecke 2009-09-07 06:53:30 UTC
With http://git.samba.org/?p=samba.git;a=commitdiff;h=99f8dcab0c6934 I've added the error message of the failed operation to the smb panic. Can you apply that patch? It does not fix anything, but it might help resolve the issue.

Thanks,

Volker
Comment 7 Matt Kraai (mail address dead) 2009-09-08 15:49:11 UTC
(In reply to comment #5)
> Does QNX do proper mmap? If it has problems with mmap, you might want to try
> "use mmap = no".

I don't know if QNX does proper mmap or not.  I tried "use mmap = no" and that fixed the problem, at least in our extremely limited testing.

I found the following quote in the QNX documentation for mmap:

 Note: You can have more than one writeable mapping to a file.  If you access the file via file descriptors as well as via the memory mapping, you'll have to be careful to keep the file's contents coherent.  For example, you should specify O_SYNC when you open() the file.

Could this be causing the problem?
Comment 8 Karolin Seeger 2010-05-26 08:14:41 UTC
Volker, can we close this bug report?
Comment 9 Björn Jacke 2018-12-27 22:15:39 UTC
not a samba bug