From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 13 03:33:17 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1385A16A41F for ; Sun, 13 Nov 2005 03:33:17 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A12243D45 for ; Sun, 13 Nov 2005 03:33:16 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: by xproxy.gmail.com with SMTP id t10so1379556wxc for ; Sat, 12 Nov 2005 19:33:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=JdNGI2LpJiU1Z2maHYvIMoQDTW6SRXHNpSpRL+d4RBMf19pKojfGHHfunAcD8FjR0+IRyQTrLWYwVXdw7/smXNv/yriyyigcyoW7wstH+sFZmGBlrIhrlJb2wizedk8eO/Uu8DSmj1W8wDXp532Dc/lHCGXCyF5VoNRwekBrcxA= Received: by 10.64.193.9 with SMTP id q9mr675596qbf; Sat, 12 Nov 2005 04:55:49 -0800 (PST) Received: from 192.168.1.12 ( [83.198.45.72]) by mx.gmail.com with ESMTP id q18sm464993qbq.2005.11.12.04.55.48; Sat, 12 Nov 2005 04:55:49 -0800 (PST) From: Sebastien To: freebsd-hackers@freebsd.org Date: Sat, 12 Nov 2005 14:00:01 +0100 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511121400.02075.sebastien.bourdeauducq@gmail.com> Subject: Trigerring a taskqueue from the if_start routine crashes FreeBSD6 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2005 03:33:17 -0000 Hello, My 802.11 driver queues frames to send to the device in a tailq and then triggers a taskqueue to actually send them. The taskqueue is required because I need to do two USB transfers, and wait for the first one to complete before I start the second : doing this asynchronously would be a pain. This used to work fine under FreeBSD 5, but with 6, the system randomly freezes without any error message, and doesn't respond to anything else than the big red button. The crash seems more likely to happen when there are 3 or more frames in the tailq when the taskqueue runs. My code is online at http://svnweb.tuxfamily.org/listing.php?repname=p54u+%28prism54%29&path=%2F&sc=0 The taskqueue-related code is all in output_layer.c, and the interface with the 802.11 and network stack, from which the taskqueue is triggered, is in netif.c. The taskqueue is also trigerred from the thread created to bring the device up when it's detected, but it doesn't crash there (but the frames are queued one by one there). Any ideas ? Thanks, Sebastien