From owner-freebsd-bugs@freebsd.org Thu Jun 25 10:30:36 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B4CB98C6FA for ; Thu, 25 Jun 2015 10:30:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F5A715E0 for ; Thu, 25 Jun 2015 10:30:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t5PAUadS085468 for ; Thu, 25 Jun 2015 10:30:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 192014] getaddrinfo(3) broken in jail on loopback Date: Thu, 25 Jun 2015 10:30:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 9.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: borja@codigo23.net X-Bugzilla-Status: New X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 10:30:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192014 Francisco de Borja Lopez Rio changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |borja@codigo23.net --- Comment #1 from Francisco de Borja Lopez Rio --- I've hit this bug here too, as it causes phantomjs (ports/lang/phantomjs) to not be able to resolve host names. I've tried to run the following snippet on phantomjs: var page = require('webpage').create(); page.open('http://freebsd.org', function(status) { console.log("Status: " + status); if(status === "success") { page.render('freebsd.png'); } phantom.exit(); }); Running it in debug mode in phantomjs: 2015-06-25T12:22:36 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=' to enable persisten cookie storage) 2015-06-25T12:22:36 [DEBUG] Phantom - execute: Configuration 2015-06-25T12:22:36 [DEBUG] 0 objectName : "" 2015-06-25T12:22:36 [DEBUG] 1 cookiesFile : "" 2015-06-25T12:22:36 [DEBUG] 2 diskCacheEnabled : "false" 2015-06-25T12:22:36 [DEBUG] 3 maxDiskCacheSize : "-1" 2015-06-25T12:22:36 [DEBUG] 4 ignoreSslErrors : "false" 2015-06-25T12:22:36 [DEBUG] 5 localToRemoteUrlAccessEnabled : "false" 2015-06-25T12:22:36 [DEBUG] 6 outputEncoding : "UTF-8" 2015-06-25T12:22:36 [DEBUG] 7 proxyType : "http" 2015-06-25T12:22:36 [DEBUG] 8 proxy : ":1080" 2015-06-25T12:22:36 [DEBUG] 9 proxyAuth : ":" 2015-06-25T12:22:36 [DEBUG] 10 scriptEncoding : "UTF-8" 2015-06-25T12:22:36 [DEBUG] 11 webSecurityEnabled : "true" 2015-06-25T12:22:36 [DEBUG] 12 offlineStoragePath : "" 2015-06-25T12:22:36 [DEBUG] 13 offlineStorageDefaultQuota : "-1" 2015-06-25T12:22:36 [DEBUG] 14 printDebugMessages : "true" 2015-06-25T12:22:36 [DEBUG] 15 javascriptCanOpenWindows : "true" 2015-06-25T12:22:36 [DEBUG] 16 javascriptCanCloseWindows : "true" 2015-06-25T12:22:36 [DEBUG] 17 sslProtocol : "tlsv1" 2015-06-25T12:22:36 [DEBUG] 18 sslCertificatesPath : "" 2015-06-25T12:22:36 [DEBUG] 19 webdriver : ":" 2015-06-25T12:22:36 [DEBUG] 20 webdriverLogFile : "" 2015-06-25T12:22:36 [DEBUG] 21 webdriverLogLevel : "INFO" 2015-06-25T12:22:36 [DEBUG] 22 webdriverSeleniumGridHub : "" 2015-06-25T12:22:36 [DEBUG] Phantom - execute: Script & Arguments 2015-06-25T12:22:36 [DEBUG] script: "example.js" 2015-06-25T12:22:36 [DEBUG] Phantom - execute: Starting normal mode 2015-06-25T12:22:36 [DEBUG] WebPage - setupFrame "" 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/_coffee-script.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/package.json" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/coffee-script.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./lexer.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././rewriter.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././helpers.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./parser.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./helpers.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./nodes.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././scope.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./././helpers.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././lexer.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./././rewriter.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] WebPage - updateLoadingProgress: 10 2015-06-25T12:22:36 [DEBUG] Network - Resource request error: 3 ( "Host codigo23.net not found" ) URL: "http://freebsd.org/" 2015-06-25T12:22:36 [DEBUG] WebPage - updateLoadingProgress: 100 Status: fail 2015-06-25T12:22:36 [DEBUG] WebPage - setupFrame "" 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/_coffee-script.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] WebPage - updateLoadingProgress: 10 2015-06-25T12:22:36 [DEBUG] WebPage - setupFrame "" 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/_coffee-script.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) ) 2015-06-25T12:22:36 [DEBUG] WebPage - updateLoadingProgress: 100 2015-06-25T12:22:36 [DEBUG] WebPage - updateLoadingProgress: 10 2015-06-25T12:22:36 [DEBUG] WebPage - updateLoadingProgress: 100 2015-06-25T12:22:36 [DEBUG] WebPage - setupFrame "" 2015-06-25T12:22:36 [DEBUG] WebPage - setupFrame "" After compiled phantomjs with debug symbols and ran it in a gdb session, I traced the error back to this call to getaddrinfo(): https://github.com/ariya/phantomjs/blob/1.9/src/qt/src/network/kernel/qhostinfo_unix.cpp#L213 which fails in a similar way to the sample code provided by Oleg. This server is running: 10.1-STABLE FreeBSD 10.1-STABLE #4 r280361: Mon Mar 23 16:31:23 CET 2015 built from sources (GENERIC kernel) and the jail.conf file is: # # /etc/jails.conf # # Common configuration options path = "/jails/${name}"; interface = "lo0"; allow.raw_sockets = 0; exec.clean; exec.system_user = "root"; exec.jail_user = "root"; exec.start += "/bin/sh /etc/rc"; exec.stop = "/bin/sh /etc/rc.shutdown"; exec.consolelog = "/var/log/jail_${name}_console.log"; mount.devfs; allow.set_hostname = 0; allow.sysvipc = 1; betabug { host.hostname = "phantomjs.codigo23.net"; ip4.addr += "lo0|127.0.0.2/32"; } I had not tried Oleg fix (this is a production server), so I was wondering if there would be any workaround while a fix gets into the official sources... ? -- You are receiving this mail because: You are the assignee for the bug.