login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #189 Graphics does not work on Debian revision 1 of 1

1
Editor:
Time: 2007/11/17 22:05:15 GMT-8
Note: Dupicate with #160

changed:
-
Axiom does not start if you start it in an X session.
GUI fails completely:
user@home:~$ axiom
ptyopen: Failed to grant access to slave device: No such file or directory
ptyopen: Failed to get name of slave device: No such file or directory
ptyopen: Failed to open slave: Bad address
fork_Axiom: Failed to reopen server: No such file or directory
ptyopen: Failed to grant access to slave device: No such file or directory
ptyopen: Failed to get name of slave device: No such file or directory
ptyopen: Failed to open slave: Bad address
clef trying to get the initial terminal settings: Invalid argument

This is under a chrooted environment. Is this relevant?

From BillPage Mon Jul 4 13:05:25 -0500 2005
From: Bill Page
Date: Mon, 04 Jul 2005 13:05:25 -0500
Subject: See
Message-ID: <20050704130525-0500@page.axiom-developer.org>

"FrontPage/searchwiki?expr=ptyopen":FrontPage/searchwiki?expr=ptyopen

From BobMcElrath Mon Jul 4 16:53:11 -0500 2005
From: Bob McElrath
Date: Mon, 04 Jul 2005 16:53:11 -0500
Subject: See
Message-ID: <20050704215316.GA21211@mcelrath.org>
In-Reply-To: <20050704130525-0500@page.axiom-developer.org>

You must be running on a system which does not have Unix98 pty's.  (e.g.
/dev/ptmx)  As this is by now an old standard, I'm confused why so many
people are running into this problem.  It's included since the 2.1
series of linux kernels.  Could you provide some more information about
your distro/kernel?  Specifically, kernel version, distro version, does
/dev/ptmx exist?  Is devpts mounted?  Does chroot prevent you from using
ptmx due to file premissions?  What/how is your chroot set up?  Is it a
common configuration?  Is it something you did by hand or did you
install some debian package which did it for you?

If machines with this problem are so common, we can fix it by falling
back to the BSD-style pty allocation in src/lib/openpty.c.pamphlet
(patch follows).  Reporter: can you answer the above questions and/or
test the below patch?::

 --- openpty.c.pamphlet.orig     2005-07-04 14:37:38.000000000 -0700
 +++ openpty.c.pamphlet  2005-07-04 14:39:23.000000000 -0700
 @@ -177,9 +177,32 @@
        if (ioctl(fds, I_PUSH, "ldterm") < 0)
          perror("ptyopen: Failed to push idterm");
  #endif
 +#if defined(LINUXplatform) /* Linux with old-style BSD pty's (not Unix98 devpts) */
 +      int looking = 1, i;
 +      int oflag = O_RDWR;                  /* flag for opening the pty */
 +      
 +      for (i = 0; looking && i < 1000; i++) {
 +        makeNextPtyNames(controllerPath, serverPath);
 +        if (access(controllerPath, 6) != 0) continue;
 +        *controller = open(controllerPath, oflag, 0);
 +        if (*controller >= 0) {
 +          *server = open(serverPath, oflag, 0);
 +          if (*server > 0)
 +            looking = 0;
 +          else
 +            close(*controller);
 +        }
 +      }
 +      if (looking) {
 +        fprintf(stderr, "Couldn't find a free pty.\n");
 +        exit(-1);
 +      }
 +      return (*controller);
 +#else
        strcpy(serverPath,slavename);
        *controller=fdm;
        *server=fds;
 +#endif
      }
    }
    return(fdm);


From unknown Mon Jul 4 16:58:17 -0500 2005
From: unknown
Date: Mon, 04 Jul 2005 16:58:17 -0500
Subject: Dupicate with #160
Message-ID: <20050704165817-0500@page.axiom-developer.org>

Status: open => duplicate 


Submitted by : (unknown) at: 2007-11-17T22:05:15-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

Axiom does not start if you start it in an X session. GUI fails completely: user@home:~$ axiom ptyopen: Failed to grant access to slave device: No such file or directory ptyopen: Failed to get name of slave device: No such file or directory ptyopen: Failed to open slave: Bad address fork_Axiom: Failed to reopen server: No such file or directory ptyopen: Failed to grant access to slave device: No such file or directory ptyopen: Failed to get name of slave device: No such file or directory ptyopen: Failed to open slave: Bad address clef trying to get the initial terminal settings: Invalid argument

This is under a chrooted environment. Is this relevant?

FrontPage/searchwiki?expr=ptyopen

You must be running on a system which does not have Unix98 pty's. (e.g. /dev/ptmx) As this is by now an old standard, I'm confused why so many people are running into this problem. It's included since the 2.1 series of linux kernels. Could you provide some more information about your distro/kernel? Specifically, kernel version, distro version, does /dev/ptmx exist? Is devpts mounted? Does chroot prevent you from using ptmx due to file premissions? What/how is your chroot set up? Is it a common configuration? Is it something you did by hand or did you install some debian package which did it for you?

If machines with this problem are so common, we can fix it by falling back to the BSD-style pty allocation in src/lib/openpty.c.pamphlet (patch follows). Reporter: can you answer the above questions and/or test the below patch?:

 --- openpty.c.pamphlet.orig     2005-07-04 14:37:38.000000000 -0700
 +++ openpty.c.pamphlet  2005-07-04 14:39:23.000000000 -0700
 @@ -177,9 +177,32 @@
        if (ioctl(fds, I_PUSH, "ldterm") < 0)
          perror("ptyopen: Failed to push idterm");
  #endif
 +#if defined(LINUXplatform) /* Linux with old-style BSD pty's (not Unix98 devpts) */
 +      int looking = 1, i;
 +      int oflag = O_RDWR;                  /* flag for opening the pty */
 +      
 +      for (i = 0; looking && i < 1000; i++) {
 +        makeNextPtyNames(controllerPath, serverPath);
 +        if (access(controllerPath, 6) != 0) continue;
 +        *controller = open(controllerPath, oflag, 0);
 +        if (*controller >= 0) {
 +          *server = open(serverPath, oflag, 0);
 +          if (*server > 0)
 +            looking = 0;
 +          else
 +            close(*controller);
 +        }
 +      }
 +      if (looking) {
 +        fprintf(stderr, "Couldn't find a free pty.\n");
 +        exit(-1);
 +      }
 +      return (*controller);
 +#else
        strcpy(serverPath,slavename);
        *controller=fdm;
        *server=fds;
 +#endif
      }
    }
    return(fdm);

Dupicate with #160 --unknown, Mon, 04 Jul 2005 16:58:17 -0500 reply
Status: open => duplicate