2

My Samba network folder disconnects on my Windows 7 boxes whenever I use Windows Explorer to open a file. The folder icons grey out for a minute or so, before becoming available again. However the the same files can always be programmatically read in Python scripts etc.

All Windows 7 machines on my network are affected, except for a Windows 7 Virtualbox VM that lives on the Ubuntu server (which hosts Samba). Presently there is no authentication, i.e. all guests can read and write once connected. Shared folder permission is 777.

The Samba log snippet below confirms that I get segfaults whenever the network drive disconnects. I was told that it could be the unresolved Bug #913809, and the closest description I found is this Dutch discussion. Setting a fully qualified host name doesn't help.

Furthermore, on ALL the Windows 7 boxes (VM and non-VM) I can also see plenty of file stat "Permission Denied" errors. They are apparently benign because I still get them aplenty on the Windows 7 VM that doesn't suffer the segfault/disconnect. But I do not know if they are related to the segfaults. These errors originate from:

../source3/param/loadparm.c:4365(process_usershare_file)

Without upgrading 14.04 LTS, what is the safest method to try a more recent version of Samba (to see if the problem goes away)? I am unaware of downloadable Samba binaries for Ubuntu, and it seems like people just manually uninstall Samba and recompile from source?

To summarize: my Samba "works" most of the time until I try to double click on a file in Windows Explorer. Browsing, and programmatic file reading always works fine. Samba only segfaults on Windows 7 computers on the local network that talk to the Ubuntu/Samba server. It works and never segfaults on the Windows 7 VM that sits on the Ubuntu/Samba server, except that I get the perplexing stream of file stat "permission denied" errors in the log.

Here's the segfault:

===============================================================
[2015/03/17 11:12:51.861983,  0] ../lib/util/fault.c:73(fault_report)
  INTERNAL ERROR: Signal 11 in pid 10219 (4.1.6-Ubuntu)
  Please read the Trouble-Shooting section of the Samba HOWTO
[2015/03/17 11:12:51.862024,  0] ../lib/util/fault.c:75(fault_report)
  ===============================================================
[2015/03/17 11:12:51.862049,  0] ../source3/lib/util.c:785(smb_panic_s3)
  PANIC (pid 10219): internal error
[2015/03/17 11:12:51.863249,  0] ../source3/lib/util.c:896(log_stack_trace)
  BACKTRACE: 27 stack frames:
   #0 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(log_stack_trace+0x1a) [0x7f4fb8ffdf3a]
   #1 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20) [0x7f4fb8ffe010]
   #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f) [0x7f4fba526c6f]
   #3 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(+0x1ae86) [0x7f4fba526e86]
   #4 /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f4fba74e340]
   #5 /lib/x86_64-linux-gnu/libc.so.6(strlen+0x2a) [0x7f4fb76ac56a]
   #6 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(push_ucs2_talloc+0x1e) [0x7f4fba52bc1e]
   #7 /usr/lib/x86_64-linux-gnu/samba/libcliauth.so.0(E_md4hash+0x1e) [0x7f4fb9b198fe]
   #8 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(create_volume_objectid+0x3a) [0x7f4fba0e2b7a]
   #9 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(+0x1c428b) [0x7f4fba1c528b]
   #10 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(smb_vfs_call_fsctl+0x58) [0x7f4fba104c88]
   #11 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(smb2_ioctl_filesys+0x76) [0x7f4fba137bb6]
   #12 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(smbd_smb2_request_process_ioctl+0x7ee) [0x7f4fba1377ce]
   #13 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(smbd_smb2_request_dispatch+0xbcd) [0x7f4fba128f5d]
   #14 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(+0x128c8b) [0x7f4fba129c8b]
   #15 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(+0x1298fc) [0x7f4fba12a8fc]
   #16 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(run_events_poll+0x16c) [0x7f4fb90140ac]
   #17 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(+0x37300) [0x7f4fb9014300]
   #18 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x8d) [0x7f4fb79ec5ed]
   #19 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0(smbd_process+0x9ca) [0x7f4fba1165ca]
   #20 smbd(+0x9fa4) [0x7f4fbab8afa4]
   #21 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(run_events_poll+0x16c) [0x7f4fb90140ac]
   #22 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(+0x37300) [0x7f4fb9014300]
   #23 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x8d) [0x7f4fb79ec5ed]
   #24 smbd(main+0x13eb) [0x7f4fbab87b8b]
   #25 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f4fb7644ec5]
   #26 smbd(+0x6f1d) [0x7f4fbab87f1d]

This is an example of a usershares file in use. I think it was created automatically by the GUI when your browse the target folder to enable sharing.

$ cat /var/lib/samba/usershares/foobar    
#VERSION 2
path=/data/foobar
comment=
usershare_acl=S-1-1-0:f
guest_ok=y
sharename=foobar

And here's the pretty much the default samba.conf.

#=================================================================
[global]

## Browsing/Identification ###
   workgroup = WORKGROUP
    server string = %h server (Samba, Ubuntu)
;   wins server = w.x.y.z
   dns proxy = no

#### Networking ####
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes

#### Debugging/Accounting ####
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d

####### Authentication #######
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

########## Domains ###########
;   logon path = \\%N\profiles\%U
;   logon drive = H:
;   logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############
;   include = /home/samba/etc/smb.conf.%m
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash
;   usershare max shares = 100
   usershare allow guests = yes

#======================= Share Definitions =======================
;[homes]
;   comment = Home Directories
;   browseable = no
;   read only = yes
;   create mask = 0700
;   directory mask = 0700
;   valid users = %S
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes
;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700

    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       guest ok = no
       read only = yes
       create mask = 0700

    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    ;   write list = root, @lpadmin
2
  • Welcome to Ask Ubuntu! ;-) Could you please give us a bit more information like: What are the contents of your smb.conf file? Has it ever worked before? Please edit your question and add this information...
    – Fabby
    Mar 18, 2015 at 13:05
  • Did you read the "Please read the Trouble-Shooting section of the Samba HOWTO"?
    – waltinator
    Mar 20, 2015 at 4:43

0

You must log in to answer this question.

Browse other questions tagged .