From owner-freebsd-amd64@FreeBSD.ORG Wed Nov 9 21:55:11 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D7AA16A420; Wed, 9 Nov 2005 21:55:11 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id D519F43D53; Wed, 9 Nov 2005 21:55:10 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 7429E46BB1; Wed, 9 Nov 2005 16:55:10 -0500 (EST) Date: Wed, 9 Nov 2005 21:55:10 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attila Nagy In-Reply-To: <437064D6.6060504@fsn.hu> Message-ID: <20051109215200.M33260@fledge.watson.org> References: <436A868F.4010606@fsn.hu> <20051104095129.M9692@fledge.watson.org> <436B8918.9060105@fsn.hu> <436C7998.5040404@fsn.hu> <437064D6.6060504@fsn.hu> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1698448597-1131573310=:33260" Cc: freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Reproduceable freeze with quotas enabled X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2005 21:55:11 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1698448597-1131573310=:33260 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Tue, 8 Nov 2005, Attila Nagy wrote: > Any chance to investigate it further? It's a really annoying bug, which > makes quota support a little bit useless. Attached is a patch that corrects at least one or two deadlock scenarios in UNIX domain socket garbage collecting (unpgc_task.diff). I've also attached a patch for kern_descriptor.c that fixes a bug there in the passing of file descriptors referencing files over UNIX domain sockets (closef_threadnull.diff). I've committed the latter to 7.x, with the intent to merge to 6.x in a week or so. The larger UNIX domain socket garbage collection patch I need to think about some more, but I'm quite interested in whether it fixes the deadlock you're seeing (or for that matter, makes it worse somehow). Thanks, Robert N M Watson --0-1698448597-1131573310=:33260 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=unpgc_task.diff Content-Transfer-Encoding: BASE64 Content-ID: <20051109215510.Y33260@fledge.watson.org> Content-Description: Content-Disposition: attachment; filename=unpgc_task.diff SW5kZXg6IHVpcGNfdXNycmVxLmMNCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0N ClJDUyBmaWxlOiAvaG9tZS9uY3ZzL3NyYy9zeXMva2Vybi91aXBjX3VzcnJl cS5jLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4xNTgNCmRpZmYgLXUgLXIx LjE1OCB1aXBjX3VzcnJlcS5jDQotLS0gdWlwY191c3JyZXEuYwkzMSBPY3Qg MjAwNSAxNTo0MToyNSAtMDAwMAkxLjE1OA0KKysrIHVpcGNfdXNycmVxLmMJ OSBOb3YgMjAwNSAyMTo0OTo1MyAtMDAwMA0KQEAgLTU5LDYgKzU5LDcgQEAN CiAjaW5jbHVkZSA8c3lzL3N4Lmg+DQogI2luY2x1ZGUgPHN5cy9zeXNjdGwu aD4NCiAjaW5jbHVkZSA8c3lzL3N5c3RtLmg+DQorI2luY2x1ZGUgPHN5cy90 YXNrcXVldWUuaD4NCiAjaW5jbHVkZSA8c3lzL3VuLmg+DQogI2luY2x1ZGUg PHN5cy91bnBjYi5oPg0KICNpbmNsdWRlIDxzeXMvdm5vZGUuaD4NCkBAIC0x MTIsNiArMTEzLDEzIEBADQogI2RlZmluZQlVTlBfTE9D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GlsbCBnZW5lcmFsbHkgYWNjdXJhdGUuDQorCSAqDQogCSAqIFdlIGdy YWIgYW4gZXh0cmEgcmVmZXJlbmNlIHRvIGVhY2ggb2YgdGhlIGZpbGUgdGFi bGUgZW50cmllcw0KIAkgKiB0aGF0IGFyZSBub3Qgb3RoZXJ3aXNlIGFjY2Vz c2libGUgYW5kIHRoZW4gZnJlZSB0aGUgcmlnaHRzDQogCSAqIHRoYXQgYXJl IHN0b3JlZCBpbiBtZXNzYWdlcyBvbiB0aGVtLg0KQEAgLTE3ODgsMTIgKzE3 ODgsMTEgQEANCiAJCQlGSUxFX1VOTE9DSyh0ZnApOw0KIAkJfQ0KIAl9DQot CWZvciAoaSA9IG51bnJlZiwgZnBwID0gZXh0cmFfcmVmOyAtLWkgPj0gMDsg KytmcHApDQorCWZvciAoaSA9IG51bnJlZiwgZnBwID0gZXh0cmFfcmVmOyAt LWkgPj0gMDsgKytmcHApIHsNCiAJCWNsb3NlZigqZnBwLCAoc3RydWN0IHRo cmVhZCAqKSBOVUxMKTsNCisJCXVucF9yZWN5Y2xlZCsrOw0KKwl9DQogCWZy ZWUoZXh0cmFfcmVmLCBNX1RFTVApOw0KLQl1bnBfZ2NpbmcgPSAwOw0KLQ0K LQlVTlBfVU5MT0NLX0FTU0VSVCgpOw0KIH0NCiANCiB2b2lkDQo= --0-1698448597-1131573310=:33260 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=closef_threadnull.diff Content-Transfer-Encoding: BASE64 Content-ID: <20051109215510.W33260@fledge.watson.org> Content-Description: Content-Disposition: attachment; filename=closef_threadnull.diff SW5kZXg6IGtlcm5fZGVzY3JpcC5jDQo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 DQpSQ1MgZmlsZTogL2hvbWUvbmN2cy9zcmMvc3lzL2tlcm4va2Vybl9kZXNj cmlwLmMsdg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjI4Mw0K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