[Samba3] BAD_NETWORK_NAME that dissapears under gdb, strace

Garry Thorpe garry at thorpe.emu.id.au
Sun Sep 11 23:47:30 GMT 2005


Guys,

A slight clarification, may or may not be significant:
**It is not related to the size of the RAID.**

See below for details if you want.

Thanks
Garry

df -h:
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              9.5G  3.5G  5.6G  39% /
/dev/md0               99M   27M   68M  29% /boot
/dev/md2              659G  108G  518G  18% /home
/dev/shm              633M     0  633M   0% /dev/shm

smb access to /dev/md1 works but fails to /dev/md0 and /dev/md2
Note that /dev/md0 is only 100M, so it's not a size issue.

FYI:
cat /proc/mdstat
Personalities : [raid1] [raid5] 
md1 : active raid1 hdi2[1] hdg2[0]
      10241344 blocks [2/2] [UU]
      
md2 : active raid5 hdi3[3] hdg3[2] hde3[0] hdc3[1]
      701549952 blocks level 5, 128k chunk, algorithm 2 [4/4] [UUUU]
      
md0 : active raid1 hdi1[0] hdg1[1]
      104320 blocks [2/2] [UU]


The other odd behaviour is that df from a user reports an error

[thorpeg at banksia ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              9.5G  3.5G  5.6G  39% /
/dev/md0               99M   27M   68M  29% /boot
/dev/md2              659G  108G  518G  18% /home
/dev/shm              633M     0  633M   0% /dev/shm
df: `/var/named/chroot/proc': Permission denied



> -----Original Message-----
> From: Michael B Allen [mailto:mba2000 at ioplex.com]
> Sent: Monday, 12 September 2005 8:45 AM
> To: Andrew Bartlett
> Cc: samba-technical at samba.org; garry at thorpe.emu.id.au
> Subject: Re: [Samba3] BAD_NETWORK_NAME that dissapears under gdb, strace
> 
> On Mon, 12 Sep 2005 08:29:43 +1000
> Andrew Bartlett <abartlet at samba.org> wrote:
> 
> > I've been chasing down an issue for a friend, with Samba 3.0.14a-2 on
> > Fedora Core 4.  The issue appears to be that this code (from service.c
> > make_connection_snum()):
> >
> > 	if (SMB_VFS_STAT(conn, conn->connectpath, &st) != 0 || !
> > S_ISDIR(st.st_mode)) {
> > 		DEBUG(0,("'%s' does not exist or is not a directory, when
> connecting
> > to [%s]\n", conn->connectpath, lp_servicename(snum)));
> >
> > fails on a Fedora Core 4 machine, with a 2.6.12-1.1447_FC4smp kernel.
> > However, it only does so when running natively.  *If run under strace,
> > valgrind or gdb, it works fine.*
> >
> > Also, this only fails at all on a particular filesystem (a big raid5
> > ext3 fs).
> >
> > Does anybody have experience with these kind of issues?  My current
> > suggestion is to move to a stock kernel.org kernel, assuming it has to
> > be a kernel bug, but I'm a bit in the dark.  What kind of things does
> > ptrace() modify, to change this behaviour?
> 
> I don't speak from a lot of experience but I can tell you what I would
> try.
> 
> Get the Fedora .src.rpm that is installed (rpm -qa | grep samba), extract
> it with rpmbuild -bp, add a mystat function that bypasses SMB_VFS_STAT
> to call stat(2), and print the parameters before and after the call like:
> 
> int
> mystat(const char *filename, struct stat *buf)
> {
> 	int ret;
> 
> 	DEBUG(0, ("mystat:%p:%p:%s:0x%08x\n", filename, buf, filename, buf-
> >st_mode);
> 	ret = stat(filename, buf);
> 	DEBUG(0, ("mystat:%p:%p:%s:0x%08x\n", filename, buf, filename, buf-
> >st_mode);
> 
> 	return ret;
> }
> 
> This way you'll see if it's really within the stat call or if it's
> something local to samba.
> 
> Now do rpmbuild -bb to produce your 1 off package and have your friend
> try it.
> 
> Mike




More information about the samba-technical mailing list