[Monotone-devel] Monotone serve - no listen port opened?
How can I validate (other than with netstat) that monotone is opening a tcp port? (I tried adding the --bind 0.0.0.0:4691 and --bind :4691 and --bind specific IP:4691, and none of them opened a port, as seen in 'netstat -ant' (linux) If I configure monotone as an xinetd service, I would basically just 'mtn serve --stdio' ? (this doesn't sync either) My windows version indicates it's opening an interface to serve on, I get no statuses from my linux version also tried --debug option to observe in the log, but there's no mention of sockets or tcp there... ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Monotone serve - no listen port opened?
On Tue, Jun 2, 2009 at 3:24 PM, J Decker d3c...@gmail.com wrote: How can I validate (other than with netstat) that monotone is opening a tcp port? (I tried adding the --bind 0.0.0.0:4691 and --bind :4691 and --bind specific IP:4691, and none of them opened a port, as seen in 'netstat -ant' (linux) Try strace; the last few operations should be something like this (beware, the trace may include your pass phrase in cleartext): $ strace mtn -d monotone.mtn serve ... socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 13 fcntl(13, F_GETFL) = 0x2 (flags O_RDWR) setsockopt(13, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(13, {sa_family=AF_INET, sin_port=htons(4691), sin_addr=inet_addr(0.0.0.0)}, 16) = 0 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 14 fcntl(14, F_GETFL) = 0x2 (flags O_RDWR) setsockopt(14, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(14, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0 bind(14, {sa_family=AF_INET6, sin6_port=htons(4691), inet_pton(AF_INET6, ::, sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0 listen(13, 128) = 0 listen(14, 128) = 0 write(2, mtn: beginning service on all i..., 50) = 50 mtn: beginning service on all interfaces : 4691 select(15, [13 14], [13 14], [13 14], NULL and then it should block until a connection is received. zw ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Monotone serve - no listen port opened?
uhmm... how do I track what code is to blame for this ? read(5, \3276\211\241\353o\336\362\255\327\333\360\314\341\372\376\t1\5\364V\374\35U7\340\316$)\221\231\263R..., 96) = 96 open(/proc, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6 fstat(6, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0 getdents(6, /* 33 entries */, 1024) = 1016 lstat(/proc/mdstat, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open(/proc/mdstat, O_RDONLY|O_NOCTTY) = 7 read(7, Personalities : \nunused devices: ..., 4096) = 40 close(7)= 0 lstat(/proc/asound, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0 open(/proc/asound, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 7 fstat(7, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0 lstat(/proc/partitions, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open(/proc/partitions, O_RDONLY|O_NOCTTY) = 8 read(8, major minor #blocks name\n\n 8 ..., 4096) = 177 close(8)= 0 lstat(/proc/diskstats, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open(/proc/diskstats, O_RDONLY|O_NOCTTY) = 8 read(8,8 0 sda 247148 22306 106..., 4096) = 396 close(8)= 0 lstat(/proc/crypto, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open(/proc/crypto, O_RDONLY|O_NOCTTY) = 8 read(8, name : stdrng\ndriver ..., 4096) = 359 close(8)= 0 lstat(/proc/key-users, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open(/proc/key-users, O_RDONLY|O_NOCTTY) = 8 read(8, 0: 3 2/2 0/200 0/2\n..., 4096) = 31 close(8)= 0 lstat(/proc/keys, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open(/proc/keys, O_RDONLY|O_NOCTTY) = 8 read(8, ..., 4096)= 0 close(8)= 0 lstat(/proc/kpageflags, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0 open(/proc/kpageflags, O_RDONLY|O_NOCTTY) = 8 read(8, \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 4096) = 4096 close(8)= 0 lstat(/proc/kpagecount, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0 open(/proc/kpagecount, O_RDONLY|O_NOCTTY) = 8 read(8, \1\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\1..., 4096) = 4096 close(8)= 0 lstat(/proc/kmsg, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0 open(/proc/kmsg, O_RDONLY|O_NOCTTY) = 8 read(8, unfinished ... mtn: operation canceled: Interrupt (proc/kmsg blocks ) On Tue, Jun 2, 2009 at 3:54 PM, Zack Weinberg za...@panix.com wrote: On Tue, Jun 2, 2009 at 3:24 PM, J Decker d3c...@gmail.com wrote: How can I validate (other than with netstat) that monotone is opening a tcp port? (I tried adding the --bind 0.0.0.0:4691 and --bind :4691 and --bind specific IP:4691, and none of them opened a port, as seen in 'netstat -ant' (linux) Try strace; the last few operations should be something like this (beware, the trace may include your pass phrase in cleartext): $ strace mtn -d monotone.mtn serve ... socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 13 fcntl(13, F_GETFL) = 0x2 (flags O_RDWR) setsockopt(13, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(13, {sa_family=AF_INET, sin_port=htons(4691), sin_addr=inet_addr(0.0.0.0)}, 16) = 0 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 14 fcntl(14, F_GETFL) = 0x2 (flags O_RDWR) setsockopt(14, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(14, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0 bind(14, {sa_family=AF_INET6, sin6_port=htons(4691), inet_pton(AF_INET6, ::, sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0 listen(13, 128) = 0 listen(14, 128) = 0 write(2, mtn: beginning service on all i..., 50) = 50 mtn: beginning service on all interfaces : 4691 select(15, [13 14], [13 14], [13 14], NULL and then it should block until a connection is received. zw ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Monotone serve - no listen port opened?
On Tue, Jun 02, 2009 at 05:30:43PM -0700, J Decker wrote: uhmm... how do I track what code is to blame for this ? [...] (proc/kmsg blocks ) *blush* This looks a lot like it is botan polling /proc to get entropy to seed the PRNG. Can you post `mtn version --full`? -Jack ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Monotone serve - no listen port opened?
(I did find a work around: if I run it as a user account, it kindly fails[eaccess], and proceeds ) monotone 0.44 (base revision: 7a4832143b3146ca89f5cb91e0e571d05e29d4b9) Running on : Linux 2.6.29.2 #1 SMP Tue May 12 18:14:24 PDT 2009 x86_64 C++ compiler: GNU C++ version 4.3.3 C++ standard library: GNU libstdc++ version 20090124 Boost version : 1_38 SQLite version : 3.6.14.1 (compiled against 3.6.14.1) Lua version : Lua 5.1 PCRE version: 7.9 2009-04-11 (compiled against 7.9) Botan version : 1.8.1 (compiled against 1.8.1) Changes since base revision: format_version 1 new_manifest [e4fc965aec46ce8b371e818de6092168e1b6f52f] old_revision [7a4832143b3146ca89f5cb91e0e571d05e29d4b9] Generated from data cached in the distribution; further changes may have been made. On Tue, Jun 2, 2009 at 5:32 PM, Jack Lloyd ll...@randombit.net wrote: On Tue, Jun 02, 2009 at 05:30:43PM -0700, J Decker wrote: uhmm... how do I track what code is to blame for this ? [...] (proc/kmsg blocks ) *blush* This looks a lot like it is botan polling /proc to get entropy to seed the PRNG. Can you post `mtn version --full`? -Jack ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Monotone serve - no listen port opened?
On Tue, Jun 02, 2009 at 05:37:38PM -0700, J Decker wrote: (I did find a work around: if I run it as a user account, it kindly fails[eaccess], and proceeds ) So, this bug is completely my fault rather than anything the monotone devs did - I never thought to test the /proc walking code as root. There are a couple of ways to fix this I can think of off the top of my head; probably using select or equivalent to limit read attempts to a small timeout will be the safest and most general. I'll get something to resolve this into the next release of botan, but until then your options seem to be either to continue running mtn as non-root, or to recompile botan and disabling the /proc walker (using ./configure.pl --disable-module=proc_walk). Thank you for the report and sorry about the mess, -Jack ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
[Monotone-devel] Re: git_export improvement
On Sun, May 24, 2009 at 2:37 AM, Felipe Contreras felipe.contre...@gmail.com wrote: However, there's one missing feature: now that I'm not testing any more I would like git_export to abort when the author is not listed. Can you do that? By not listed do you mean not present in the authors-file? Note that this doesn't have much, if anything, to do with the unknown string used as the default author when there are *no* author certs. In that case, there's not much else to do, some string needs to be used for the author, and this string is looked up in the authors-file allowing you to change it if you like. At the moment, if the authors-file lookup fails the author string is checked to ensure that it is wrapped in '' and '' characters which seems to work ok for many historical monotone names and avoids the need to create a full authors-file. It sounds like you want to require a successful authors-file lookup and disable this name fixup. I think it might be better to use a lua hook for doing whatever name fixups are required if the authors-file lookup fails and if this hook fails we'll cancel the export. This should allow for using either the authors-file, or the hook or both. IMHO putting some fake id such as 'unknown' is good for testing purposes so perhaps it should be turned on with --enable-author-guess or something. As mentioned above, the unknown string is used when there are no author certs available. We could provide an option to set the value of this string to something else, but you can already change this string using the authors-file so another option would be redundant. Cheers, Derek ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel