From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23761 invoked by alias); 28 Jul 2014 12:35:04 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 23750 invoked by uid 89); 28 Jul 2014 12:35:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: smtpout19.bt.lon5.cpcloud.co.uk Received: from smtpout19.bt.lon5.cpcloud.co.uk (HELO smtpout19.bt.lon5.cpcloud.co.uk) (65.20.0.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 Jul 2014 12:35:02 +0000 X-CTCH-RefID: str=0001.0A090205.53D64372.0093,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-Junkmail-Premium-Raw: score=8/97,refid=2.7.2:2014.7.28.85419:17:8.317,ip=,rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __HAS_FROM, __HAS_REPLYTO, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __TO_NO_NAME, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __ANY_URI, URI_ENDS_IN_HTML, __URI_NO_MAILTO, __URI_NO_WWW, __URI_NO_PATH, __OEM_SOFTWARE_1, __SUBJ_ALPHA_NEGATE, __FORWARDED_MSG, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, OEM_SOFTWARE_X1, REPLYTO_FROM_DIFF_ADDY, BODY_SIZE_7000_LESS X-CTCH-Spam: Unknown Received: from [192.168.1.93] (86.139.176.184) by smtpout19.bt.lon5.cpcloud.co.uk (8.6.100.99.10223) (authenticated as jonturney@btinternet.com) id 53BFBD5A00813B3A; Mon, 28 Jul 2014 13:34:58 +0100 Message-ID: <53D6436D.2090808@dronecode.org.uk> Date: Mon, 28 Jul 2014 12:35:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree@cygwin.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: matt@codespunk.com Subject: Re: xinit hangs on XWin infinite loop when using -displayfd References: <53CC6789.4000601@codespunk.com> <53CD368C.3060509@codespunk.com> <53CD3917.4060305@codespunk.com> <53CD4E2C.6040204@codespunk.com> In-Reply-To: <53CD4E2C.6040204@codespunk.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00024.txt.bz2 Thanks for reporting this problem. On 21/07/2014 18:30, Matt D. wrote: > I found as a workaround to add the arguments "-nolisten tcp" when > invoking xinit. However, I was under the impression that it was > incompatible with -multiwindow and -clipboard, both of which seem to be > working fine: > > https://cygwin.com/ml/cygwin-xfree/2009-05/msg00016.html That restriction no longer exists. https://cygwin.com/ml/cygwin-xfree/2009-10/msg00007.html > On 7/21/2014 12:00 PM, Matt D. wrote: >> Ok.. so I let xinit do its thing to see if it got anywhere. Eventually >> it will pop and error box. Interestingly, I specified a displayfd value >> of "3" and yet both the popup and the log are reporting "5": This is expected. xinit must know the display number of the X server it starts, so it can pass it on to any clients it starts, so it has a patch which should notice the -displayfd option, transparently use it to determine the display number for any clients they start, and then pass on the display number to the specified file descriptor >> My XWin.0.log is about 15MB of repeated attempts to open a socket. Here >> is a snippet. I hope this helps: >> >> InitConnectionLimits: MaxClients = 255 >> Welcome to the XWin X Server >> Vendor: The Cygwin/X Project >> Release: 1.15.1.0 >> OS: CYGWIN_NT-5.1 matthew-17ffb52 1.7.30(0.272/5/3) 2014-05-23 10:36 i686 >> OS: Windows XP Service Pack 3 [Windows NT 5.1 build 2600] (Win32) >> Snapshot: 20140709-git-2e9c13ea41c51df7 >> >> XWin was started with the following command line: >> >> X -displayfd 5 >> >> ddxProcessArgument - Initializing default screens >> winInitializeScreenDefaults - primary monitor w 1062 h 703 >> winInitializeScreenDefaults - native DPI x 96 y 96 >> ddxProcessArgument - arg: -displayfd >> Trying to create socket for display number 0 >> _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6 >> _XSERVTransOpen: transport open failed for inet6/matthew-17ffb52:0 >> _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6 >> >> .. >> Trying to create socket for display number 59534 >> _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6 >> _XSERVTransOpen: transport open failed for inet6/matthew-17ffb52:59534 >> _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6 >> (EE) Fatal server error: >> (EE) Failed to find a socket to listen on(EE) >> [ 58128.390] (EE) Server terminated with error (1). Closing log file. Ah. So, it seems that we have checked all ports from 6000 to 59534 + 6000 = 65534 and decided they are no good because we can't open an ipv6 socket. (It looks like there is another minor bug here in that we don't try port 65535! :-)) I guess if you just run XWin, it reports that it can't create an inet6 listener, but it continues anyway (unless the -nopn option is used). But, the implementation of -displayfd requires that creating all the listener socket succeeds. (It's not clear that this should be changed, otherwise we could reach the conclusion that it's ok to start a server on display n with a limited set of protocols, when a server already exists on display n with an non-intersecting set of protocols) So, you may find that -nolisten inet6, rather than -nolisten tcp (which prevents both ipv4 and ipv6 listening) also works around the problem. You might want to also investigate why inet6 sockets can't be opened. -- Jon TURNEY Volunteer Cygwin/X X Server maintainer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/