Subject: Re: kern/32682: netbsd-3 ptyfs intermittent failure with Matlab
To: Hauke Fath <hf@spg.tu-darmstadt.de>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 07/17/2006 10:58:55
On Jul 17,  4:54pm, hf@spg.tu-darmstadt.de (Hauke Fath) wrote:
-- Subject: Re: kern/32682: netbsd-3 ptyfs intermittent failure with Matlab

| Am 31.01.2006 um 12:52 Uhr -0500 schrieb Christos Zoulas:
| >
| >Can you show what w(1) prints and the "interesting" ptys in /dev/[pt]ty??.
| >I suspect what is going on, is that you have a rogue program that is
| >opening old style pty's behind the pty subsystem's back, so when ptyfs
| >tries to open the same pty, it fails. So when it fails for pts/4 for
| >example, what does lsof say for /dev/{t,p}typ4?
| 
| Getting back to this after a while...
| 
| I have pkgsrc-2006Q1 packages out now which were built on a machine 
| without the /dev/[pt]ty[pqrs]? pty device files, and deployed on 
| clients that do not have them, either, but use ptyfs mounted to 
| /dev/pts instead.
| 
| But I still see matlab failing to open a /dev/pts/? every now and 
| then, although the /dev/ptmx && /dev/pts/? way should be the only way 
| to get a pty on the machine now, so no concurrent access, right?
| 
| The details:

I have a theory. The pty returned by ptmx is not being marked as in
use immediately, so it can be potentially returned twice to two different
processes. I will check.

christos