Date: Fri, 18 Feb 2011 13:08:20 -0500 (EST) From: Rick Macklem <rmacklem@uoguelph.ca> To: mike@jellydonut.org Cc: george+freebsd@m5p.com, freebsd-stable@freebsd.org, Jeremy Chadwick <freebsd@jdc.parodius.com> Subject: Re: statd/lockd startup failure Message-ID: <15348085.102038.1298052500896.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <679701594.102003.1298052457071.JavaMail.root@erie.cs.uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_102037_470845040.1298052500894 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit I've seen this intermittently for mountd. I think the problem is that the code finds an unused port for udp/ip6 and then tries to use the same port# for tcp/ip6, udp/ip4, tcp/ip4. All three daemons have essentially the same function for doing this. The attached patches changes the behaviour so that it tries to get an unused port for each of the 4 cases. (This all applies to the "wildcard" case, where no port# or hosts have been specified as command args.) If you have the chance to try these patches, please let us know how they work for you? rick ps: I lost track of the thread, so I don't know who started it, but hopefully, they are on the cc list? ------=_Part_102037_470845040.1298052500894 Content-Type: text/x-patch; name=mountd.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=mountd.patch LS0tIHVzci5zYmluL21vdW50ZC9tb3VudGQuYy5zYXYJMjAxMS0wMi0xNyAyMTo0NTozMi4wMDAw MDAwMDAgLTA1MDAKKysrIHVzci5zYmluL21vdW50ZC9tb3VudGQuYwkyMDExLTAyLTE3IDIzOjIz OjM3LjAwMDAwMDAwMCAtMDUwMApAQCAtNTEwLDYgKzUxMCw3IEBAIGNyZWF0ZV9zZXJ2aWNlKHN0 cnVjdCBuZXRjb25maWcgKm5jb25mKQogCWludCByOwogCWludCByZWdpc3RlcmVkID0gMDsKIAl1 X2ludDMyX3QgaG9zdF9hZGRyWzRdOyAgLyogSVB2NCBvciBJUHY2ICovCisJaW50IG1hbGxvY2Rf c3ZjcG9ydCA9IDA7CiAKIAlpZiAoKG5jb25mLT5uY19zZW1hbnRpY3MgIT0gTkNfVFBJ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o KGFpY29kZSA9IGdldGFkZHJpbmZvKE5VTEwsIHN2Y3BvcnRfc3RyLApAQCAtNzAwLDYgKzcwMyw3 IEBAIGNyZWF0ZV9zZXJ2aWNlKHN0cnVjdCBuZXRjb25maWcgKm5jb25mKQogCQkJCXN2Y3BvcnRf c3RyID0gbWFsbG9jKE5JX01BWFNFUlYgKiBzaXplb2YoY2hhcikpOwogCQkJCWlmIChzdmNwb3J0 X3N0ciA9PSBOVUxMKQogCQkJCQlvdXRfb2ZfbWVtKCk7CisJCQkJbWFsbG9jZF9zdmNwb3J0ID0g MTsKIAogCQkJCWlmIChnZXRuYW1laW5mbyhyZXMtPmFpX2FkZHIsCiAJCQkJICAgIHJlcy0+YWlf YWRkci0+c2FfbGVuLCBOVUxMLCBOSV9NQVhIT1NULApAQCAtNzE1LDYgKzcxOSwxMiBAQCBjcmVh dGVfc2VydmljZShzdHJ1Y3QgbmV0Y29uZmlnICpuY29uZikKIAkJCQlleGl0KDEpOwogCQkJfQog CisJCQlpZiAobWFsbG9jZF9zdmNwb3J0ICE9IDApIHsKKwkJCQlmcmVlKHN2Y3BvcnRfc3RyKTsK KwkJCQlzdmNwb3J0X3N0ciA9IE5VTEw7CisJCQkJbWFsbG9jZF9zdmNwb3J0ID0gMDsKKwkJCX0K KwogCQkJc2VydmFkZHIuYnVmID0gbWFsbG9jKHJlcy0+YWlfYWRkcmxlbik7CiAJCQltZW1jcHko c2VydmFkZHIuYnVmLCByZXMtPmFpX2FkZHIsIHJlcy0+YWlfYWRkcmxlbik7CiAJCQlzZXJ2YWRk ci5sZW4gPSByZXMtPmFpX2FkZHJsZW47Cg== ------=_Part_102037_470845040.1298052500894 Content-Type: text/x-patch; name=statd.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=statd.patch LS0tIHVzci5zYmluL3JwYy5zdGF0ZC9zdGF0ZC5jLnNhdgkyMDExLTAyLTE3IDIzOjM2OjE1LjAw MDAwMDAwMCAtMDUwMAorKysgdXNyLnNiaW4vc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CQkJbWFsbG9jZF9zdmNwb3J0ID0gMDsK KwkJCX0KKwogCQkJc2VydmFkZHIuYnVmID0gbWFsbG9jKHJlcy0+YWlfYWRkcmxlbik7CiAJCQlt ZW1jcHkoc2VydmFkZHIuYnVmLCByZXMtPmFpX2FkZHIsIHJlcy0+YWlfYWRkcmxlbik7CiAJCQlz ZXJ2YWRkci5sZW4gPSByZXMtPmFpX2FkZHJsZW47Cg== ------=_Part_102037_470845040.1298052500894 Content-Type: text/x-patch; name=lockd.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=lockd.patch LS0tIHVzci5zYmluL3JwYy5sb2NrZC9sb2NrZC5jLnNhdgkyMDExLTAyLTE3IDIzOjI5OjQ4LjAw MDAwMDAwMCAtMDUwMAorKysgdXNyLnNiaW4vcnBjLmxvY2tkL2xvY2tkLmMJMjAxMS0wMi0xNyAy MzozNTo0Ny4wMDAwMDAwMDAgLTA1MDAKQEAgLTQwMyw2ICs0MDMsNyBAQCBjcmVhdGVfc2Vydmlj ZShzdHJ1Y3QgbmV0Y29uZmlnICpuY29uZikKIAlpbnQgcjsKIAlpbnQgcmVnaXN0ZXJlZCA9IDA7 CiAJdV9pbnQzMl90IGhvc3RfYWRkcls0XTsgIC8qIElQdjQgb3IgSVB2NiAqLworCWludCBtYWxs b2NkX3N2Y3BvcnQgPSAwOwogCiAJaWYgKChuY29uZi0+bmNfc2VtYW50aWNzICE9IE5DX1RQSV9D TFRTKSAmJgogCSAgICAobmNvbmYtPm5jX3NlbWFudGljcyAhPSBOQ19UUElfQ09UUykgJiYKQEAg LTQ5Nyw3ICs0OTgsNyBAQCBjcmVhdGVfc2VydmljZShzdHJ1Y3QgbmV0Y29uZmlnICpuY29uZikK IAkJCQkJCXNpbi0+c2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0FOWSk7CiAJCQkJCQly ZXMtPmFpX2FkZHIgPSAoc3RydWN0IHNvY2thZGRyKikgc2luOwogCQkJCQkJcmVzLT5haV9hZG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RVJWICogc2l6ZW9mKGNoYXIpKTsKIAkJCQlpZiAoc3ZjcG9ydF9zdHIgPT0gTlVMTCkKIAkJCQkJ b3V0X29mX21lbSgpOworCQkJCW1hbGxvY2Rfc3ZjcG9ydCA9IDE7CiAKIAkJCQlpZiAoZ2V0bmFt ZWluZm8ocmVzLT5haV9hZGRyLAogCQkJCSAgICByZXMtPmFpX2FkZHItPnNhX2xlbiwgTlVMTCwg TklfTUFYSE9TVCwKQEAgLTYwMCw2ICs2MDYsMTIgQEAgY3JlYXRlX3NlcnZpY2Uoc3RydWN0IG5l dGNvbmZpZyAqbmNvbmYpCiAJCQkJZXhpdCgxKTsKIAkJCX0KIAorCQkJaWYgKG1hbGxvY2Rfc3Zj cG9ydCAhPSAwKSB7CisJCQkJZnJlZShzdmNwb3J0X3N0cik7CisJCQkJc3ZjcG9ydF9zdHIgPSBO VUxMOworCQkJCW1hbGxvY2Rfc3ZjcG9ydCA9IDA7CisJCQl9CisKIAkJCXNlcnZhZGRyLmJ1ZiA9 IG1hbGxvYyhyZXMtPmFpX2FkZHJsZW4pOwogCQkJbWVtY3B5KHNlcnZhZGRyLmJ1ZiwgcmVzLT5h aV9hZGRyLCByZXMtPmFpX2FkZHJsZW4pOwogCQkJc2VydmFkZHIubGVuID0gcmVzLT5haV9hZGRy bGVuOwo= ------=_Part_102037_470845040.1298052500894--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15348085.102038.1298052500896.JavaMail.root>