From nobody@FreeBSD.org  Fri Nov 30 07:43:57 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A29D16A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Nov 2007 07:43:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 45D4313C442
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Nov 2007 07:43:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lAU7hjXT084113
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Nov 2007 07:43:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lAU7hjoB084112;
	Fri, 30 Nov 2007 07:43:45 GMT
	(envelope-from nobody)
Message-Id: <200711300743.lAU7hjoB084112@www.freebsd.org>
Date: Fri, 30 Nov 2007 07:43:45 GMT
From: Oles Hnatkevych <root@oles.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: unix sockets do not work when on memory filesystem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118346
>Category:       kern
>Synopsis:       [unionfs] unix sockets do not work when on memory filesystem
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    daichi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 07:50:01 UTC 2007
>Closed-Date:    Tue Nov 25 03:34:43 UTC 2008
>Last-Modified:  Tue Nov 25 03:34:43 UTC 2008
>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:
Responsible-Changed-From-To: freebsd-bugs->daichi 
Responsible-Changed-By: kris 
Responsible-Changed-When: Tue Dec 25 11:47:29 UTC 2007 
Responsible-Changed-Why:  
Assign to unionfs maintainer as this seems to actually be a 
unionfs issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118346 

From: Kris Kennaway <kris@FreeBSD.org>
To: Oles Hnatkevych <root@oles.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/118346: unix sockets do not work when on memory filesystem
Date: Tue, 25 Dec 2007 12:47:07 +0100

 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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/118346: commit references a PR
Date: Fri, 25 Apr 2008 09:53:59 +0000 (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"
 
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Wed Jun 11 13:04:28 UTC 2008 
State-Changed-Why:  
This is fixed in HEAD but doesn't seem to have been MFC'd yet 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118346 

From: =?ISO-8859-2?Q?Nejc_=A9koberne?= <nejc@skoberne.net>
To: bug-followup@FreeBSD.org, root@oles.net
Cc:  
Subject: Re: kern/118346: [unionfs] unix sockets do not work when on memory
 filesystem
Date: Thu, 07 Aug 2008 13:42:32 +0200

 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
State-Changed-From-To: patched->closed 
State-Changed-By: daichi 
State-Changed-When: Tue Nov 25 03:34:24 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118346 
>Unformatted:
