From nobody@FreeBSD.org  Fri Feb 27 17:16:29 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5D7EC106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Feb 2009 17:16:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 49DC98FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Feb 2009 17:16:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1RHGT0T088232
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Feb 2009 17:16:29 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n1RHGTRI088231;
	Fri, 27 Feb 2009 17:16:29 GMT
	(envelope-from nobody)
Message-Id: <200902271716.n1RHGTRI088231@www.freebsd.org>
Date: Fri, 27 Feb 2009 17:16:29 GMT
From: Arrigo Marchiori <ardovm@yahoo.it>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Page fault panic in scioctl and console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132172
>Category:       kern
>Synopsis:       [patch] [panic] Page fault panic in scioctl and console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 27 17:20:01 UTC 2009
>Closed-Date:    Sat Sep 24 10:55:45 UTC 2011
>Last-Modified:  Sat Sep 24 10:55:45 UTC 2011
>Originator:     Arrigo Marchiori
>Release:        6.4-STABLE
>Organization:
>Environment:
$ uname -a
FreeBSD diavoletto.dma 6.4-STABLE FreeBSD 6.4-STABLE #21: Fri Feb 27 11:52:36 CET 2009



$ cat /etc/make.conf
CPUTYPE?=athlon64

CFLAGS=-O2 -pipe
COPTFLAGS=-O -pipe

SUP_UPDATE=

SUP=            /usr/bin/csup
SUPFLAGS=
SUPHOST=        localhost
SUPFILE=        /usr/share/examples/cvsup/stable-supfile
PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile
DOCSUPFILE=     /usr/share/examples/cvsup/doc-supfile

# Per OpenOffice
LOCALIZED_LANG=it

# Per la documentazione
WITH_JADETEX=yes
# added by use.perl 2009-02-16 18:07:35
PERL_VER=5.8.9
PERL_VERSION=5.8.9
# Abilitazione UTF-8 in xterm
WITH_WIDE_CHARS=yes


$ cat /var/db/ports/hal/options # maybe related?
# This file is auto-generated by 'make config'.
# No user-servicable parts inside!
# Options for hal-0.5.11_10
_OPTIONS_READ=hal-0.5.11_10
WITHOUT_FIXED_MOUNTPOINTS=true

>Description:
In /etc/rc.conf I have the following lines:
> dbus_enable="YES"
> hald_enable="YES"

Every time dbus is started, if consolekit-0.3.0 is installed then a
page fault occurs just after the login screen is shown. If I "make
deinstall" the port in single-user-mode, then the system boots and
works fine.

If I boot with consolekit uninstalled, then install it and restart
dbus, I get a panic.

I reported this problem on freebsd-stable@ mailing list and received
no answer:
http://lists.freebsd.org/pipermail/freebsd-stable/2009-February/048460.html

I'm reporting here the same information that Pawel Worach reported
last year for his problem, in the attached kgdb session.
>How-To-Repeat:
1- install sysutils/consolekit
2- restart hald
>Fix:


Patch attached with submission follows:

Script started on Fri Feb 20 12:47:10 2009
# cd /usr/obj/usr/src/sys/GENERIC
# kgdb kernel.debug /var/crash/vmcore.0
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...

Unread portion of the kernel message buffer:


Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0x4
fault code		= supervisor read, page not present
instruction pointer	= 0x20:0xc09dfaef
stack pointer	        = 0x28:0xe85a8bf8
frame pointer	        = 0x28:0xe85a8c40
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 14500 (console-kit-daemon)
trap number		= 12
panic: page fault
Uptime: 30m41s
Dumping 1471 MB (2 chunks)
  chunk 0: 1MB (155 pages) ... ok
  chunk 1: 1471MB (376496 pages) (CTRL-C to abort)  1455 1439 1423 1407 (CTRL-C to abort)  1391 1375 1359 1343 1327 1311 1295 1279 1263 1247 1231 1215 1199 1183 1167 1151 1135 1119 1103 1087 1071 1055 1039 1023 1007 991 975 959 943 927 911 895 879 863 847 831 815 799 783 767 751 735 719 703 687 671 655 639 623 607 591 575 559 543 527 511 495 479 463 447 431 415 399 383 367 351 335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15

Reading symbols from /boot/kernel/linux.ko...done.
Loaded symbols for /boot/kernel/linux.ko
Reading symbols from /boot/kernel/snd_hda.ko...done.
Loaded symbols for /boot/kernel/snd_hda.ko
Reading symbols from /boot/kernel/sound.ko...done.
Loaded symbols for /boot/kernel/sound.ko
Reading symbols from /boot/kernel/acpi.ko...done.
Loaded symbols for /boot/kernel/acpi.ko
Reading symbols from /usr/local/modules/fuse.ko...done.
Loaded symbols for /usr/local/modules/fuse.ko
Reading symbols from /boot/kernel/green_saver.ko...done.
Loaded symbols for /boot/kernel/green_saver.ko
#0  doadump () at pcpu.h:165
165		__asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) backtrace
#0  doadump () at pcpu.h:165
#1  0xc072b274 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:410
#2  0xc072b5a6 in panic (fmt=0xc0a66e6f "%s")
    at /usr/src/sys/kern/kern_shutdown.c:566
#3  0xc0a02f2c in trap_fatal (frame=0xe85a8bb8, eva=0)
    at /usr/src/sys/i386/i386/trap.c:838
#4  0xc0a02c32 in trap_pfault (frame=0xe85a8bb8, usermode=0, eva=4)
    at /usr/src/sys/i386/i386/trap.c:745
#5  0xc0a027e2 in trap (frame=
      {tf_fs = 8, tf_es = 40, tf_ds = 40, tf_edi = 9, tf_esi = -977926144, tf_ebp = -396719040, tf_isp = -396719132, tf_ebx = -1061927328, tf_edx = -978051584, tf_ecx = 2000, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1063388433, tf_cs = 32, tf_eflags = 66182, tf_esp = -978051584, tf_ss = -977926144})
    at /usr/src/sys/i386/i386/trap.c:435
#6  0xc09ec99a in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#7  0xc09dfaef in scioctl (dev=0xc5b63200, cmd=9, data=0xe85a8cbc "\n", 
    flag=1, td=0xc6416900) at /usr/src/sys/dev/syscons/syscons.c:1060
#8  0xc06f489c in giant_ioctl (dev=0xc5b63200, cmd=0, data=0x0, fflag=0, 
    td=0x0) at /usr/src/sys/kern/kern_conf.c:330
#9  0xc06c8f19 in devfs_ioctl_f (fp=0xc60fdc60, com=537163270, 
    data=0xe85a8cbc, cred=0xc7845280, td=0xc6416900)
    at /usr/src/sys/fs/devfs/devfs_vnops.c:480
#10 0xc0755007 in ioctl (td=0xc6416900, uap=0xe85a8d04) at file.h:265
#11 0xc0a03302 in syscall (frame=
---Type <return> to continue, or q <return> to quit---
      {tf_fs = 59, tf_es = 59, tf_ds = 59, tf_edi = 10, tf_esi = 134714152, tf_ebp = -1081716952, tf_isp = -396718748, tf_ebx = 134627884, tf_edx = 135049216, tf_ecx = -1, tf_eax = 54, tf_trapno = 12, tf_err = 2, tf_eip = 675581607, tf_cs = 51, tf_eflags = 642, tf_esp = -1081717012, tf_ss = 59})
    at /usr/src/sys/i386/i386/trap.c:984
#12 0xc09ec9ef in Xint0x80_syscall ()
    at /usr/src/sys/i386/i386/exception.s:200
#13 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) frame 7
#7  0xc09dfaef in scioctl (dev=0xc5b63200, cmd=9, data=0xe85a8cbc "\n", 
    flag=1, td=0xc6416900) at /usr/src/sys/dev/syscons/syscons.c:1060
1060		scp = sc_get_stat(SC_DEV(sc, i));
(kgdb) print sc
$1 = (sc_softc_t *) 0xc0ba20c0
(kgdb) print *sc
$2 = {unit = 0, config = 768, flags = 196608, keyboard = 1, kbd = 0xc59fc700, 
  adapter = 0, adp = 0xc0b7e3a0, initial_mode = 24, first_vty = 0, vtys = 16, 
  dev = 0xc0b9a440, cur_scp = 0xc0b9a300, new_scp = 0xc0b9a300, 
  old_scp = 0xc0b9a300, delayed_next_scr = 0, 
  font_loading_in_progress = 0 '\0', switch_in_progress = 0 '\0', 
  videoio_in_progress = 0 '\0', write_in_progress = 0 '\0', 
  blink_in_progress = 0 '\0', scrn_time_stamp = 1841, dflt_curs_attr = {
    flags = 0, base = 1, height = 2}, curs_attr = {flags = 0, base = 1, 
    height = 2}, 
  scr_map = "\000\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237 ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇ"..., 
  scr_rmap = "\000\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237 ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇ"..., 
  palette = "\000\000\000\000\000¨\000¨\000\000¨¨¨\000\000¨\000¨¨¨\000¨¨¨\000\000T\000\000ü\000¨T\000¨ü¨\000T¨\000ü¨¨T¨¨ü\000T\000\000T¨\000ü\000\000ü¨¨T\000¨T¨¨ü\000¨ü¨\000TT\000Tü\000üT\000üü¨TT¨Tü¨üT¨üüT\000\000T\000¨T¨\000T¨¨ü\000\00---Type <return> to continue, or q <return> to quit---
0ü\000¨ü¨\000ü¨¨T\000TT\000üT¨TT¨üü\000Tü\000üü¨Tü¨üTT\000TT¨Tü\000Tü¨üT\000üT¨üü\000üü¨TTTTTüTüTTüüüTTüTüüüTüüüü||ü\234|ü¼"..., fonts_loaded = 8, 
  font_8 = 0xc0b97ce0 "", font_14 = 0xc0b984e0 "", font_16 = 0xc0b992e0 "", 
  font_22 = 0x0, cursor_char = 7 '\a', mouse_char = 208 'Ð'}
(kgdb) list
1055		s = spltty();
1056		error = sc_clean_up(sc->cur_scp);
1057		splx(s);
1058		if (error)
1059		    return error;
1060		scp = sc_get_stat(SC_DEV(sc, i));
1061		if (scp == scp->sc->cur_scp)
1062		    return 0;
1063		error = tsleep(&scp->smode, PZERO | PCATCH, "waitvt", 0);
1064		return error;
(kgdb) print i
$3 = 9
(kgdb) print sc->dev
$4 = (struct cdev **) 0xc0b9a440
(kgdb) print *sc->dev
$5 = (struct cdev *) 0xc5b52100
(kgdb) print **sc->dev
$6 = {si_priv = 0xc5b52100, si_flags = 4, si_atime = {tv_sec = 1235125168, 
    tv_nsec = 0}, si_ctime = {tv_sec = 1235125168, tv_nsec = 0}, si_mtime = {
    tv_sec = 1235125168, tv_nsec = 0}, si_uid = 0, si_gid = 0, si_mode = 384, 
  si_cred = 0x0, si_drv0 = 0, si_refcount = 2, si_list = {le_next = 0x0, 
    le_prev = 0xc5b52238}, si_clone = {le_next = 0x0, le_prev = 0x0}, 
  si_children = {lh_first = 0x0}, si_siblings = {le_next = 0x0, 
    le_prev = 0x0}, si_parent = 0x0, si_name = 0xc5b52178 "ttyv0", 
  si_drv1 = 0xc0b9a300, si_drv2 = 0x0, si_devsw = 0xc0b44660, 
  si_iosize_max = 65536, si_usecount = 2, si_threadcount = 2, __si_u = {
    __sit_tty = 0xc5b58400, __sid_snapdata = 0xc5b58400}, 
  __si_namebuf = "ttyv0", '\0' <repeats 58 times>}
(kgdb) print sc->first_vty
$7 = 0
(kgdb)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Feb 27 17:20:28 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132172 
Responsible-Changed-From-To: gnome->freebsd-bugs 
Responsible-Changed-By: marcus 
Responsible-Changed-When: Fri Feb 27 17:39:06 UTC 2009 
Responsible-Changed-Why:  
While console-kit may trigger this, a kernel panic should never happen. 
I am bouncing this to kern.  Since others are not complaining, I suspect 
a local problem.  Either way, a user-land app shouldn't be panicking 
the kernel. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132172 

From: Pavel Argentov <argentoff@rtelekom.ru>
To: bug-followup@FreeBSD.org, ardovm@yahoo.it
Cc:  
Subject: Re: kern/132172: [panic] Page fault panic in scioctl and console-kit-daemon
 (port: sysutils/consolekit on 6.4-STABLE)
Date: Thu, 14 May 2009 15:18:53 +0400

 Dear colleagues,
 
 This isn't a local problem: we are struggling with the same symptom. 
 Thanks for further explorations and help.
 -- 
 Sincerely yours, Pavel Argentov.
 Jabber:	paul@jabber.rtelekom.ru
 RIPE:	PA1291-RIPE

From: Arrigo Marchiori <ardovm@yahoo.it>
To: bug-followup@FreeBSD.org, ardovm@yahoo.it
Cc:  
Subject: Re: kern/132172: [panic] Page fault panic in scioctl and
	console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
Date: Mon, 10 Aug 2009 18:32:48 +0200

 --liOOAslEiF7prFVr
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 
 Hello,
 
 I have adapted this patch:
 http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080221/6f6e5ded/sys_dev_syscons.obj
 to the file /usr/src/sys/dev/syscons/syscons.c as in 6.4-STABLE,
 cvsup'ed today.
 
 When this patch is applied, the panic seems to disappear.
 
 BUT: I actually don't know what this patch does! I just blindly
 adapted to "our" file, by finding the similar lines. I think we need a
 kernel developer to check that this patch doesn't generate other
 problems.
 
 Hope this helps,
 -- 
 rigo
 
 http://rigo.altervista.org
 
 --liOOAslEiF7prFVr
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: attachment; filename="syscons_c_patch.txt"
 
 --- syscons.c.old	2009-08-10 16:22:28.000000000 +0200
 +++ syscons.c	2009-08-10 16:22:18.000000000 +0200
 @@ -1052,15 +1052,9 @@
  	i = (*(int *)data == 0) ? scp->index : (*(int *)data - 1);
  	if ((i < sc->first_vty) || (i >= sc->first_vty + sc->vtys))
  	    return EINVAL;
 -	s = spltty();
 -	error = sc_clean_up(sc->cur_scp);
 -	splx(s);
 -	if (error)
 -	    return error;
 -	scp = sc_get_stat(SC_DEV(sc, i));
 -	if (scp == scp->sc->cur_scp)
 +	if (i == sc->cur_scp->index)
  	    return 0;
 -	error = tsleep(&scp->smode, PZERO | PCATCH, "waitvt", 0);
 +	error = tsleep(SC_DEV(sc, i), PZERO | PCATCH, "waitvt", 0);
  	return error;
  
      case VT_GETACTIVE:		/* get active vty # */
 @@ -2336,7 +2330,7 @@
  	 * be invoked at splhigh().
  	 */
  	if (debugger == 0)
 -	    wakeup(&sc->new_scp->smode);
 +	    wakeup(SC_DEV(sc, next_scr));
  	splx(s);
  	DPRINTF(5, ("switch done (new == old)\n"));
  	return 0;
 @@ -2359,7 +2353,7 @@
  
      /* wake up processes waiting for this vty */
      if (debugger == 0)
 -	wakeup(&sc->cur_scp->smode);
 +	wakeup(SC_DEV(sc, next_scr));
  
      /* wait for the controlling process to acknowledge, if necessary */
      if (signal_vt_acq(sc->cur_scp)) {
 @@ -2385,7 +2379,7 @@
      exchange_scr(sc);
      s = spltty();
      /* sc->cur_scp == sc->new_scp */
 -    wakeup(&sc->cur_scp->smode);
 +    wakeup(SC_DEV(sc, sc->cur_scp->index));
  
      /* wait for the controlling process to acknowledge, if necessary */
      if (!signal_vt_acq(sc->cur_scp)) {
 
 --liOOAslEiF7prFVr--

From: Random User <rannumgen@globaleyes.net>
To: bug-followup@FreeBSD.org, ardovm@yahoo.it
Cc:  
Subject: Re: kern/132172: [patch] [panic] Page fault panic in scioctl and
 console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
Date: Mon, 10 Aug 2009 21:50:33 -0500

 On a newly (08/10/2009) cvsup updated kernel source and ports 6.4-STABLE
 (i386), I now get a page fault when HALD or CONSOLE-KIT-DAEMON are run:
 
 	hald[E] ck-tr....: Could not get ? and sessions
 
 	Fatal trap 12: page fault while in kernel mode
 	fault virtual address = 0x4
 	fault code            = supervisor read, page not present
 	instruction pointer   = 0x20:0xc08cf4d6
 	stack pointer         = 0x28:0xe994bf8
 	frame pointer         = 0x28:0xe9994c40
 	code segment          = base 0x0, limit 0xfffff, type 0x1b
 	                        DPL 0, pres 1, def32 1, gran 1
 	processor eflags      = interrupt enabled, resume, IOPL = 0
 	current process       = 1040 (console-kit-daemon)
 	trap number           = 12
 	panic: page fault
 
 Installed packages:
 hal-0.5.11_25
 consolekit-0.3.0_8
 dbus-1.2.4.6
 dbus-glib-0.82
 ndesk-dbus-0.6.1a
 ndesk-dbus-glib-0.4.1_1
 py26-dbus-0.83.0_1

From: Random User <rannumgen@globaleyes.net>
To: bug-followup@FreeBSD.org, ardovm@yahoo.it
Cc:  
Subject: Re: kern/132172: [patch] [panic] Page fault panic in scioctl and
 console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
Date: Tue, 11 Aug 2009 00:15:12 -0500

 This is a multi-part message in MIME format.
 --------------050305070801030304050901
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 A slight correction to the patch offered at
 
 http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080221/6f6e5ded/sys_dev_syscons.obj
 
 plus kernel/world rebuild and reinstall has FIXED my page fault problem!
 
 Hald, dbus, console-kit-daemon, Gnome-2.26, Xorg-7.4_2, and
 nvidia-driver-185.18.29 are all now "happily" running. (sigh!)
 
 --------------050305070801030304050901
 Content-Type: text/plain;
  name="syscons.c.udiffs"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="syscons.c.udiffs"
 
 --- syscons.c.orig	2007-11-17 09:15:25.000000000 -0600
 +++ syscons.c	2009-08-10 22:18:51.000000000 -0500
 @@ -1052,15 +1052,9 @@
  	i = (*(int *)data == 0) ? scp->index : (*(int *)data - 1);
  	if ((i < sc->first_vty) || (i >= sc->first_vty + sc->vtys))
  	    return EINVAL;
 -	s = spltty();
 -	error = sc_clean_up(sc->cur_scp);
 -	splx(s);
 -	if (error)
 -	    return error;
 -	scp = sc_get_stat(SC_DEV(sc, i));
 -	if (scp == scp->sc->cur_scp)
 +	if (i == sc->cur_scp->index)
  	    return 0;
 -	error = tsleep(&scp->smode, PZERO | PCATCH, "waitvt", 0);
 +	error = tsleep(SC_DEV(sc, i), PZERO | PCATCH, "waitvt", 0);
  	return error;
  
      case VT_GETACTIVE:		/* get active vty # */
 @@ -2336,7 +2330,7 @@
  	 * be invoked at splhigh().
  	 */
  	if (debugger == 0)
 -	    wakeup(&sc->new_scp->smode);
 +	    wakeup(SC_DEV(sc,next_scr));
  	splx(s);
  	DPRINTF(5, ("switch done (new == old)\n"));
  	return 0;
 @@ -2359,7 +2353,7 @@
  
      /* wake up processes waiting for this vty */
      if (debugger == 0)
 -	wakeup(&sc->cur_scp->smode);
 +	wakeup(SC_DEV(sc,next_scr));
  
      /* wait for the controlling process to acknowledge, if necessary */
      if (signal_vt_acq(sc->cur_scp)) {
 @@ -2385,7 +2379,7 @@
      exchange_scr(sc);
      s = spltty();
      /* sc->cur_scp == sc->new_scp */
 -    wakeup(&sc->cur_scp->smode);
 +    wakeup(SC_DEV(sc,sc->cur_scp->index));
  
      /* wait for the controlling process to acknowledge, if necessary */
      if (!signal_vt_acq(sc->cur_scp)) {
 
 --------------050305070801030304050901--

From: Random User <rannumgen@globaleyes.net>
To: bug-followup@FreeBSD.org, ardovm@yahoo.it
Cc:  
Subject: Re: kern/132172: [patch] [panic] Page fault panic in scioctl and
 console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
Date: Sat, 14 Nov 2009 11:09:56 -0600

 Fatal trap 12: page fault while in kernel mode
 fault virtual address	= 0x4
 fault code		= supervisor read, page not present
 instruction pointer	= 0x20:0xc08cfec6
 stack pointer		= 0x28:0xe992dbf8
 frame pointer		= 0x28:0xe992dc40
 code segment		= base 0x0, limit 0xfffff, type 0x1b
 			= DPL 0, pres1, def32 1, gran 1
 processor eflags	= interrupt enabled, resume, IOPL = 0
 current process		= 957 (console-kit-daemon)
 trap number		= 12
 panic: page fault
 
 Submitted to comp.unix.bsd.freebsd.misc on Sun, 11 Oct 2009 09:15:38
 UTC. None of the patches mentioned in this PR have been attempted yet.

From: Random User <rannumgen@globaleyes.net>
To: bug-followup@FreeBSD.org, ardovm@yahoo.it
Cc:  
Subject: Re: kern/132172: [patch] [panic] Page fault panic in scioctl and
 console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
Date: Sat, 14 Nov 2009 11:54:10 -0600

 Patch from 11 Aug 2009 had been previously applied. The recent crash
 from 11 Oct 2009 occurred after successfully applying the 11 Aug 2009
 patch and subsequent /usr/src cvsup updates. "syscons.c" was restored to
 it original unpatched state at sometime during the cvsup updates so it
 would appear that the patch in this PR has not been committed yet.
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Fri Sep 23 20:34:38 UTC 2011 
State-Changed-Why:  
I think that this has been fixed in r177431. Can you confirm? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132172 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Sat Sep 24 10:55:44 UTC 2011 
State-Changed-Why:  
Probably fixed in r177431. Submitter can't test anymore. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132172 
>Unformatted:
