From tore@fud.no Wed Jan 8 09:39:26 2014 Received: from greed.fud.no (nat64-243-osl2.n.bitbit.net [87.238.61.243]) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id s089cElX025947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 8 Jan 2014 09:38:50 GMT Received: from [2a02:c0:2:1:1194:6:0:1002] (port=52780 helo=echo.linpro.no) by greed.fud.no with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1W0paW-00067Y-CF; Wed, 08 Jan 2014 10:38:12 +0100 Message-ID: <52CD1C83.9050302@fud.no> Date: Wed, 08 Jan 2014 10:38:11 +0100 From: Tore Anderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Bryan Stansell , users@conserver.com Subject: Re: Problems exec consoles using expect scripts References: <529F913C.6020805@fud.no> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.5 () BAYES_00 X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.16 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 09:39:26 -0000 * Bryan Stansell > Good news is I was able to replicate the issue on my shiny new Ubuntu > VM. I haven't got a clue why it's happening, though I haven't dug in > much. More poking around as I have time... Hi Bryan, Now that the holidays are past us, I was wondering if you did find out anything more about this issue? Best regards, Tore Anderson From bryan@conserver.com Wed Jan 8 16:09:20 2014 Received: from [192.168.0.104] (c-98-248-230-102.hsd1.ca.comcast.net [98.248.230.102]) (authenticated bits=0) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id s08G9JLB011040 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 8 Jan 2014 16:09:20 GMT Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Problems exec consoles using expect scripts From: Bryan Stansell In-Reply-To: <52CD1C83.9050302@fud.no> Date: Wed, 8 Jan 2014 08:09:19 -0800 Message-Id: References: <529F913C.6020805@fud.no> <52CD1C83.9050302@fud.no> To: Tore Anderson X-Mailer: Apple Mail (2.1827) X-Spam-Score: 0.411 () BAYES_00,HELO_MISC_IP,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by underdog.stansell.org id s08G9JLB011040 Cc: users@conserver.com X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.16 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 16:09:20 -0000 Sorry, I haven't had a chance yet. But thanks for the reminder - I'v got the VM running again and I'll start poking at it... Bryan On Jan 8, 2014, at 1:38 AM, Tore Anderson wrote: > * Bryan Stansell > >> Good news is I was able to replicate the issue on my shiny new Ubuntu >> VM. I haven't got a clue why it's happening, though I haven't dug in >> much. More poking around as I have time... > > Hi Bryan, > > Now that the holidays are past us, I was wondering if you did find out > anything more about this issue? > > Best regards, > Tore Anderson From bryan@conserver.com Wed Jan 8 22:57:53 2014 Received: from [192.168.0.104] (c-98-248-230-102.hsd1.ca.comcast.net [98.248.230.102]) (authenticated bits=0) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id s08Mvqap026231 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 8 Jan 2014 22:57:53 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Problems exec consoles using expect scripts From: Bryan Stansell In-Reply-To: Date: Wed, 8 Jan 2014 14:57:52 -0800 Message-Id: References: <529F913C.6020805@fud.no> <52CD1C83.9050302@fud.no> To: users@conserver.com X-Mailer: Apple Mail (2.1827) X-Spam-Score: 0.411 () BAYES_00,HELO_MISC_IP,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by underdog.stansell.org id s08Mvqap026231 X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.16 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 22:57:54 -0000 Well, I was successful enough to dig up what's going on and a way of working around it, but I still don't understand the underlying issue (which is turning into: why is the Ubuntu distribution working differently than CentOS, MacOSX, and Solaris). The issue, seen from traces, is that expect is not able to open /dev/tty on Ubuntu when running under conserver (which releases the controlling tty, etc when daemonizing). Apparently expect does some manipulations of the tty modes when it has access to /dev/tty and for an unknown reason to me, it is being denied on Ubuntu. Because of this, it's not setting it's own ptys into a "passthrough" mode (raw, no echo, etc). So, you end up with two layers of processing happening and all the goofiness you see (echoed commands, control characters printed but also "working", etc). I took a snapshot of the tty settings on CentOS and, by using them, you can do this missing work for expect within the expect script. All I did was add exec stty 0:0:bf:0:3:1c:8:40:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 to the top of the expect script and those magic entries reset things to the proper modes. I also had basic success using "exec stty raw -echo". Using the symbolic names is safer and what I recommend, but I'll leave it up to you to enumerate all the settings to make a complete set. I was looking for the easy way out. :-/ So the big question is: why is Ubuntu not playing like the other kids on the block. Maybe /dev/tty access is enforced differently, maybe the daemonization process is resulting in different process states (more or less "cleansed"), etc. Not sure I'm going to dig into it, but if someone tracks down the root cause, and it's something conserver is doing wrong (which would be surprising to me as I know folks have been using expect with conserver a long time - but you never know), I'm up for any pointers or patches. Hopefully this gets you going and helps anyone else that might trip up here. If this workaround doesn't work for you, that would be good to know too, of course. Bryan On Jan 8, 2014, at 8:09 AM, Bryan Stansell wrote: > Sorry, I haven't had a chance yet. But thanks for the reminder - I'v got the VM running again and I'll start poking at it... > > Bryan > > On Jan 8, 2014, at 1:38 AM, Tore Anderson wrote: > >> * Bryan Stansell >> >>> Good news is I was able to replicate the issue on my shiny new Ubuntu >>> VM. I haven't got a clue why it's happening, though I haven't dug in >>> much. More poking around as I have time... >> >> Hi Bryan, >> >> Now that the holidays are past us, I was wondering if you did find out >> anything more about this issue? >> >> Best regards, >> Tore Anderson > > > _______________________________________________ > users mailing list > users@conserver.com > https://www.conserver.com/mailman/listinfo/users From tore@fud.no Thu Jan 9 09:44:30 2014 Received: from greed.fud.no (nat64-243-osl2.n.bitbit.net [87.238.61.243]) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id s099hNMc021656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 9 Jan 2014 09:43:59 GMT Received: from [2a02:c0:2:1:1194:6:0:1002] (port=45505 helo=echo.linpro.no) by greed.fud.no with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1W1C93-0002AJ-O1; Thu, 09 Jan 2014 10:43:21 +0100 Message-ID: <52CE6F39.8030008@fud.no> Date: Thu, 09 Jan 2014 10:43:21 +0100 From: Tore Anderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Bryan Stansell , users@conserver.com Subject: Re: Problems exec consoles using expect scripts References: <529F913C.6020805@fud.no> <52CD1C83.9050302@fud.no> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.5 () BAYES_00 X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.16 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 09:44:30 -0000 * Bryan Stansell > Hopefully this gets you going and helps anyone else that might trip > up here. Indeed it does, thank you very much! I'd submit a bug report to Ubuntu, if it wasn't for the fact that I have no idea which package it would be appropriate to assign it to... Tore