From owner-freebsd-current@FreeBSD.ORG Tue Sep 6 00:17:29 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15CFF16A41F; Tue, 6 Sep 2005 00:17:29 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D6F243D46; Tue, 6 Sep 2005 00:17:28 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-a169.otenet.gr [212.205.215.169]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with ESMTP id j860HMBx006429; Tue, 6 Sep 2005 03:17:23 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j860GdYG000977; Tue, 6 Sep 2005 03:16:39 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j860GXlK000976; Tue, 6 Sep 2005 03:16:33 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Tue, 6 Sep 2005 03:16:33 +0300 From: Giorgos Keramidas To: Slawa Olhovchenkov Message-ID: <20050906001633.GA909@gothmog.gr> References: <20050903133344.GA633@gothmog.gr> <20050905162713.GA92142@crodrigues.org> <20050905175826.GL69481@zxy.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050905175826.GL69481@zxy.spb.ru> Cc: rodrigc@freebsd.org, Craig Rodrigues , freebsd-current@freebsd.org, mirya@matrix.kiev.ua Subject: Re: moused related panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 00:17:29 -0000 On 2005-09-05 21:58, Slawa Olhovchenkov wrote: > On Mon, Sep 05, 2005 at 12:27:13PM -0400, Craig Rodrigues wrote: > > > On Sat, Sep 03, 2005 at 04:33:44PM +0300, Giorgos Keramidas wrote: > > > This was on a console running with 132x25 mode. > > > > Can you try this? > > 1. I think your remember '()' around '||' > 2. Now mouse cursor not moved. Both true. Another mildly strange thing I noticed by breaking into the debugger and setting a breakpoint in set_mouse_pos() is that it seems to be called with too many arguments in its stack frame: # [thread pid 538 tid 100068 ] # Breakpoint at set_mouse_pos: pushl %ebp # db> where # Tracing pid 538 tid 100068 td 0xc1d35a80 # set_mouse_pos(c1ab6c00,c014630a,c3c811e0,3,c1d35a80) at set_mouse_pos # scioctl(c1aa8b00,c014630a,c3c811e0,3,c1d35a80) at scioctl+0x88 # giant_ioctl(c1aa8b00,c014630a,c3c811e0,3,c1d35a80) at giant_ioctl+0x33 # devfs_ioctl_f(c1baebd0,c014630a,c3c811e0,c1973d00,c1d35a80) at devfs_ioctl_f+0xaf # ioctl(c1d35a80,da920d04,3,0,297) at ioctl+0x370 # syscall(3b,3b,3b,80000000,0) at syscall+0x22f # Xint0x80_syscall() at Xint0x80_syscall+0x1f # --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x28138e4b, esp = 0xbfbfe6fc, ebp = 0xbfbfe8b8 --- That's relatively odd, if we bear in mind that set_mouse_pos() in scmouse.c is defined as: static void set_mouse_pos(scr_stat *scp); Where would the extra arguments come from in the KDB trace? The diff I was using when this was traced, is: %%% Index: scmouse.c =================================================================== RCS file: /home/ncvs/src/sys/dev/syscons/scmouse.c,v retrieving revision 1.38 diff -u -r1.38 scmouse.c --- scmouse.c 30 Aug 2005 18:58:16 -0000 1.38 +++ scmouse.c 6 Sep 2005 00:13:52 -0000 @@ -140,6 +140,8 @@ static void set_mouse_pos(scr_stat *scp) { + KASSERT(scp != NULL, ("null scp")); + if (scp->mouse_xpos < scp->xoff*scp->font_width) scp->mouse_xpos = scp->xoff*scp->font_width; if (scp->mouse_ypos < scp->yoff*scp->font_size) @@ -157,7 +159,9 @@ scp->mouse_ypos = (scp->ysize + scp->yoff)*scp->font_size - 1; } - if (scp->mouse_xpos != scp->mouse_oldxpos || scp->mouse_ypos != scp->mouse_oldypos) { + if ((scp->mouse_xpos != scp->mouse_oldxpos || + scp->mouse_ypos != scp->mouse_oldypos) && + scp->font_size != 0 && scp->font_width != 0) { scp->status |= MOUSE_MOVED; scp->mouse_pos = (scp->mouse_ypos/scp->font_size - scp->yoff)*scp->xsize %%%