Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2007 07:43:45 GMT
From:      Oles Hnatkevych <root@oles.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/118346: unix sockets do not work when on memory filesystem
Message-ID:  <200711300743.lAU7hjoB084112@www.freebsd.org>
Resent-Message-ID: <200711300750.lAU7o1r1033258@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118346
>Category:       kern
>Synopsis:       unix sockets do not work when on memory filesystem
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 07:50:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Oles Hnatkevych
>Release:        
>Organization:
>Environment:
FreeBSD murzik.oles.net 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #2: Wed Nov 28 08:29:27 EET 2007     root@murzik.oles.net:/usr/obj/usr/src/sys/MURZIK  i386

>Description:
When /var (or other filesystem) is an mfs or mfs/over/cd9660, unix sockets created on them do not work properly: 'server' process creates socket, and it has proper permissions, but client process gets 'permission denied'.

>How-To-Repeat:
Var is mfs/unionfs:
/dev/md1 on /mfs (ufs, asynchronous, local)
<above>:/mfs/var on /var (unionfs, local, noatime)

Initially found the problem with 'quagga' suite, I found simple test for unix sockets : server and client.
http://www.ecst.csuchico.edu/~beej/guide/ipc/echos.c
http://www.ecst.csuchico.edu/~beej/guide/ipc/echoc.c
Of course patching them to use some path to /var/something/ for socket.

run server:
LiveCD# ./server
Waiting for a connection...

run client:
LiveCD# ./client
Trying to connect...
connect: Connection refused

They work perfectly when /var/ is on real hard disk or even /var/something/ is a soft link to real hard disk.


>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711300743.lAU7hjoB084112>