Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2012 11:37:20 +0200
From:      "O. Hartmann" <ohartman@mail.zedat.fu-berlin.de>
To:        Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Changes to sbin/init/init.c (r233944) makes x11/xdm impossible to start from /etc/ttys
Message-ID:  <4F83FF50.1010404@mail.zedat.fu-berlin.de>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig0599FA1487E4C8AD44885D07
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Since I have had much trouble starting xdm via /etc/ttys, I tried to
investigate the revision when the bug was introduced and as I wrote in a
former message to the list, since I recompile world almost daily, I saw
the introduction with a commit to sbin/init/init.c.

A subversion diff reveals:

=3D=3D=3D
 Index: sbin/init/init.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sbin/init/init.c    (revision 233944)
+++ sbin/init/init.c    (working copy)
@@ -572,9 +572,13 @@
 {
        int fd;

-       /* Try to open /dev/console. */
+       /*
+        * Try to open /dev/console.  Open the device with O_NONBLOCK to
+        * prevent potential blocking on a carrier.
+        */
        revoke(_PATH_CONSOLE);
        if ((fd =3D open(_PATH_CONSOLE, O_RDWR | O_NONBLOCK)) !=3D -1) {
+               (void)fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK=
);
                if (login_tty(fd) =3D=3D 0)
                        return;
                close(fd);
=3D=3D=3D

Reverting init.c back to its previous state seems to make the error go aw=
ay.

The error xdm is loggin is:

=3D=3D=3D
Build Date: 07 April 2012  04:51:08PM

Current version of pixman: 0.24.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (=3D=3D) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(=3D=3D) Log file: "/var/log/Xorg.0.log", Time: Sat Apr  7 18:38:24 2012
(=3D=3D) Using config file: "/etc/X11/xorg.conf"
xdm info (pid 2055): sourcing /usr/local/share/X11/xdm/Xsetup_0
xdm error (pid 2050): Unknown session exit code 2560 from process 2055
xdm info (pid 2050): Exiting
=3D=3D=3D

Some others report also misbehaviour of some ports, susepcting libthr. I
do not know wether this report is valuable, I also filed a PR upon this,
but I hope it could help finding the bug.

When xdm is failing via /etc/ttys, manipulating some of its config
files, even only comments (jn Xaccess, Xservers), makes xdm sometimes to
start, but this is highly erratic.

A more likely way is to start xdm by typing xdm from console, even with
/etc/ttys xdm startup configured or by reverting sbin/init/init.c
sources back to r233943.

Regards,
Oliver


--------------enig0599FA1487E4C8AD44885D07
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBAgAGBQJPg/9WAAoJEOgBcD7A/5N8rJ4IAIKw+drQXSBKO6JyfMZ7I787
0/RIAvdvxNyFzRgPgy2hTMRIhVtAJ03KuxVXOhcQKWbsY/qqu7xTwaLOpHdsBPo2
rSu4wA0RldYHGS8PcdL5sCZCVapFlVAszC6kGcopmDjtgNvQml/r10j9uOWGfAgw
mHaXxSqFj0gSdBp84Et7mDiIE20A/dIznoGz5k8mOy4w9Bq204l43iORGsyA3rt0
a/gSU1lDmUBe56CUtPlZO3luk8fVrbKwSCVub1u3FlDkkLZDXNWt1G36XQ10FAM7
J2vz4waOa+Eek1Kgw1E+NRfajewGd3Ls94w9yZWz5vYjKcnuMB1NWlXT7wnEjJA=
=tHPP
-----END PGP SIGNATURE-----

--------------enig0599FA1487E4C8AD44885D07--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F83FF50.1010404>