kern/118346: unix sockets do not work when on memory filesystem

Oles Hnatkevych root at oles.net
Thu Nov 29 23:50:01 PST 2007


>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 at 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:


More information about the freebsd-bugs mailing list