From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 18 20:57:19 2005 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AF6F16A4F1 for ; Wed, 18 May 2005 20:57:19 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 326D543DA1 for ; Wed, 18 May 2005 20:57:18 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id A47703BFAE; Wed, 18 May 2005 15:57:16 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11616-01-17; Wed, 18 May 2005 15:57:16 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id 662983BFBA; Wed, 18 May 2005 15:57:16 -0500 (CDT) Received: from s228130hz1ew031.apptix-01.savvis.net ([10.146.4.28]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 18 May 2005 15:57:17 -0500 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew031.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 18 May 2005 15:57:09 -0500 Message-ID: <428BAC1A.9050500@savvis.net> Date: Wed, 18 May 2005 13:56:58 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <428B36BF.5070709@centtech.com> <428B69CE.1070909@savvis.net> <428B86E4.5040306@centtech.com> <428B889E.8090804@savvis.net> <428B89D1.1050306@centtech.com> <428B8BA8.2020002@savvis.net> In-Reply-To: <428B8BA8.2020002@savvis.net> Content-Type: multipart/mixed; boundary="------------040606000404020108090002" X-OriginalArrivalTime: 18 May 2005 20:57:09.0178 (UTC) FILETIME=[280569A0:01C55BEC] X-Virus-Scanned: amavisd-new at savvis.net cc: freebsd-bluetooth@freebsd.org Subject: Re: bthidd core dumped X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2005 20:57:19 -0000 This is a multi-part message in MIME format. --------------040606000404020108090002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Eric, >>>>>> This morning, I booted up and began using my laptop with my >>>>>> bluetooth mouse. I've been using this mouse for several days now >>>>>> without a single problem. Yesterday I added a new bluetooth >>>>>> mouse (MS Intellimouse), and had both running simultaneously just >>>>>> fine all day yesterday and last night. This morning, after my >>>>>> machine was up for about 30-40 minutes, my mouse stopped working. >>>>>> I hit the buttons, switched the on/off switch, etc. I was only >>>>>> using one mouse at the time (however, my second mouse was >>>>>> probably within range and I believe it was on in my backpack). >>>>>> After messing with the switch a few times, bthidd core dumped. I >>>>>> restarted it, and hit the switch on my mouse a few more times, >>>>>> and then I got mouse services back. >>>>> >>>>> [...] >>>>> >>>>>> May 18 06:44:38 neutrino kernel: pid 482 (bthidd), uid 0: exited >>>>>> on signal 6 (core dumped) >>>>> >>>>> signal 6 is SIGABRT (abort(3)). i bet one of the assert()'s fired. >>>>> do you still have bthidd(8) core file? it should be in /. can you >>>>> try to get a stack trace or at least assert()'s message? can you >>>>> try to reproduce the problem with bthidd(8) running in foreground? >>>> >>>> Yes, I still have the core file, but I'm not sure what to do with it >>>> :) >>> >>> gdb /path/to/executable/bthidd /path/to/code/bthidd.core >>> >>> and send me the output of gdb. then at (gdb) prompt type >>> >>> (gdb) where >>> >>> and send me the output >> >> # gdb /usr/sbin/bthidd /bthidd.core > > [...] > >> Is that what you needed? > > yes, thanks. just like i suspected one of the assert()s fired. i'm going > to look at this. just one question: can you put the core file somewhere > i can download it? if you can it would help me to troubleshoot the > problem faster. if you cant - no big deal. ok, i found the problem. i have attached the patch that should fix it. please do 1) save attached patch somewhere 2) cd /usr/src/usr.sbin/bluetooth/bthidd 3) patch < /path/to/saved/bthidd.patch.txt 4) make cleandir && make depend && make && make install this patch is against bthidd(8) sources committed to -current. thanks, max > > max > _______________________________________________ > freebsd-bluetooth@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth > To unsubscribe, send any mail to > "freebsd-bluetooth-unsubscribe@freebsd.org" --------------040606000404020108090002 Content-Type: text/plain; name="bthidd.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bthidd.patch.txt" Index: parser.y =================================================================== RCS file: /home/ncvs/src/usr.sbin/bluetooth/bthidd/parser.y,v retrieving revision 1.3 diff -u -r1.3 parser.y --- parser.y 12 Jan 2005 20:06:16 -0000 1.3 +++ parser.y 18 May 2005 20:51:36 -0000 @@ -315,12 +315,12 @@ for (i = 0; i < desc->size; i ++) { if ((i % 8) == 0) - fprintf(stdout, "\n "); + fprintf(f, "\n "); fprintf(f, "0x%2.2x ", desc->data[i]); } - fprintf(stdout, + fprintf(f, "\n" \ " };\n" \ "}\n"); Index: server.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/bluetooth/bthidd/server.c,v retrieving revision 1.2 diff -u -r1.2 server.c --- server.c 18 Nov 2004 18:05:15 -0000 1.2 +++ server.c 18 May 2005 20:51:36 -0000 @@ -332,7 +332,8 @@ char data[1024]; int len; - assert(s != NULL); + if (s == NULL) + return (0); /* can happen on device disconnect */ do { len = read(fd, data, sizeof(data)); --------------040606000404020108090002--