ports/132172: Page fault panic in scioctl and console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)

Arrigo Marchiori ardovm at yahoo.it
Fri Feb 27 17:20:02 UTC 2009


>Number:         132172
>Category:       ports
>Synopsis:       Page fault panic in scioctl and console-kit-daemon (port: sysutils/consolekit on 6.4-STABLE)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 27 17:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list