From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 12 19:00:22 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 BC2E616A41F for ; Sat, 12 Nov 2005 19:00:22 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49E7F43D49 for ; Sat, 12 Nov 2005 19:00:22 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so407540nzo for ; Sat, 12 Nov 2005 11:00:21 -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=PqpAE+D+vPX4mw1bEbv+qs64II52+jSe4/qNCFJUSDMMLvL5+mXkVA9LVBSUn5d0ka+A5AOsDg2YTbkegHahdPOu6hidRAPlkZBvWeLGhEhVqZ8lx/KZqt6TGQ00P/hEnNZO9yG58vnWW7+a7GLqLiuUsaR5Dp9D//nP03ORF2Y= Received: by 10.65.155.17 with SMTP id h17mr3899260qbo; Sat, 12 Nov 2005 10:53:42 -0800 (PST) Received: from 192.168.1.12 ( [83.198.45.72]) by mx.gmail.com with ESMTP id d5sm718490qbd.2005.11.12.10.53.41; Sat, 12 Nov 2005 10:53:42 -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: Sat, 12 Nov 2005 19:00:22 -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