Bug 118346 - [unionfs] unix sockets do not work when on memory filesystem
Summary: [unionfs] unix sockets do not work when on memory filesystem
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 1.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Daichi GOTO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-30 07:50 UTC by Oles Hnatkevych
Modified: 2008-11-25 03:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oles Hnatkevych 2007-11-30 07:50:01 UTC
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.
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2007-12-25 11:47:07 UTC
Oles Hnatkevych wrote:

This looks like it is related to unionfs, not to "mfs" (there is no such 
thing in FreeBSD any longer; note that your example shows a UFS mounted 
on a md device, which is the same as a UFS on any other device)

Kris
Comment 2 Kris Kennaway freebsd_committer freebsd_triage 2007-12-25 11:47:29 UTC
Responsible Changed
From-To: freebsd-bugs->daichi

Assign to unionfs maintainer as this seems to actually be a 
unionfs issue.
Comment 3 dfilter service freebsd_committer freebsd_triage 2008-04-25 10:53:59 UTC
daichi      2008-04-25 09:53:52 UTC

  FreeBSD src repository

  Modified files:
    sys/fs/unionfs       union_subr.c 
  Log:
  o Improved unix socket connection issue
    fixed: kern/118346
  
  PR:             kern/118346
  Submitted by:   Masanori OZAWA (ozawa@ongs.co.jp)
  MFC after:      1 week
  
  Revision  Changes    Path
  1.103     +28 -13    src/sys/fs/unionfs/union_subr.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Gavin Atkinson freebsd_committer freebsd_triage 2008-06-11 14:04:28 UTC
State Changed
From-To: open->patched

This is fixed in HEAD but doesn't seem to have been MFC'd yet
Comment 5 Nejc Škoberne 2008-08-07 12:42:32 UTC
Hello,

today it's 7 August 2008 and this patch hasn't been MFCed into 7_RELENG yet,
so for now we have to do it by ourselves. When do you plan to MFC it?

Thanks,
Nejc
Comment 6 Daichi GOTO freebsd_committer freebsd_triage 2008-11-25 03:34:24 UTC
State Changed
From-To: patched->closed

Committed. Thanks!