Re: [9fans] Acme-sac integration with Windows NT

2010-05-19 Thread Arvindh Rajesh Tamilmani
acme-sac on windows is my development environment too. b2 on 'win os cmd' gives a cmd.exe window. i prefer sh(1), so i use just 'win' and access the windows files from /n/C. i have shell functions defined in $home/lib/functions to invoke specific windows commands. for example: fn ant {

[9fans] thread STACK size

2010-05-19 Thread Mathieu Lonjaret
Hi all, A while ago, while working on btfs, I stumbled upon some sort of overflow (http://9fans.net/archive/2009/07/77) which was in fact due to the thread STACK being too small (and hence if I understood correctly things would get written out of it, in the heap). To be on the safe side, I have

[9fans] thread STACK size

2010-05-19 Thread Sape Mullender
A while ago, while working on btfs, I stumbled upon some sort of overflow (http://9fans.net/archive/2009/07/77) which was in fact due to the thread STACK being too small (and hence if I understood correctly things would get written out of it, in the heap). To be on the safe side, I have it

Re: [9fans] thread STACK size

2010-05-19 Thread Francisco J Ballesteros
I've found it useful to use the testing of the program to also force it to get into what I think is a worst case and then printing the stack size (doing this is simple by printing argument addresses). hth On Wed, May 19, 2010 at 11:55 AM, Federico G. Benavento benave...@gmail.com wrote: also if

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Ethan Grammatikidis
On 19 May 2010, at 05:37, David Leimbach wrote: On Tue, May 18, 2010 at 7:13 PM, ron minnich rminn...@gmail.com wrote: On Wed, May 19, 2010 at 1:54 AM, David Leimbach leim...@gmail.com wrote: Were all of the binaries within recompiled against this code? Running 9vx on my iMac is

Re: [9fans] thread STACK size

2010-05-19 Thread erik quanstrom
As a general rule in threaded programs, avoid declaring local arrays or large structs. Instead, malloc them and free them when you're done. A file server, as an example, should never allocate an 8K message buffer on the stack. If you can manage to obey the rule of not having arrays on the

Re: [9fans] APE port: lout(1)

2010-05-19 Thread Richard Miller
[3] The execution that fails is actually a crucial part of the `make install' process. I've attached the whole output of the build and install processes. The problem is in /sys/src/ape/lib/ap/stdio/vfscanf.c -- semantics of %n is incorrect if an item is terminated by EOF (i.e. end of string

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Tue, May 18, 2010 at 10:40 PM, Bakul Shah bakul+pl...@bitblocks.com wrote: term% 8.out -c /bin/echo Boo! 511 echo Brk 0x3233 b450 = 0 0x11af077310cde470 0x11af077310d0da40 511 echo Pwrite 0x31d6 1 a458/Boo!. 5 -0x1Boo!  = 5 0x11af07731e11e758

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Tue, May 18, 2010 at 10:45 PM, erik quanstrom quans...@quanstro.net wrote: ron, please enlighten the ignorant.  could you constrast this with truss?  or maybe there's a man page? I need to write one. The biggest diff from truss is that the program itself is dead simple, since most of the

[9fans] wheel on logitech usb mouse

2010-05-19 Thread yaroslav
hi, The wheel on my Logitech USB mouse does not work. Injection of a few debug prints in /sys/src/cmd/usb/kb/kb.c:/^ptrwork revealed that wheel events are not available on ptrfd at all. what may be wrong here? thanks.

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Bakul Shah
On Wed, 19 May 2010 08:09:50 PDT ron minnich rminn...@gmail.com wrote: The format arose out of discussions with nemo and others. It is a straight text layout of system call params and return. The = separates the params and return. The format is: pid textname syscall-name pc [params] =

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 10:18 AM, Bakul Shah bakul+pl...@bitblocks.com wrote: 0. Name syscalltrace is too long :-) pick a name and I'll change it. 1. Curiously, an actual errstr is not enclosed in ... that goes on the bug list. If you want, use the bugtracker at bitbucket.org, on my

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread erik quanstrom
if (cmd[0] != '/') { char* pcmd = malloc(strlen(cmd) + 5); sprintf(pcmd, /bin/%s, cmd); exec(pcmd, args); } shouldn't that be

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
I'll only take that patch if it does NOT include stdio.h. As for output ... I'm conflicted on output on 1 vs. 2. But it is nice that you can see normal output of the traced process. But, hmm, if traced process prints on 2, well ... you'll lose it. So, my feeling is, if you are *really* concerned

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 10:51 AM, erik quanstrom quans...@labs.coraid.com wrote:                     if (cmd[0] != '/') {                             char* pcmd = malloc(strlen(cmd) + 5);                             sprintf(pcmd, /bin/%s, cmd);                             exec(pcmd, args);

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Bakul Shah
On Wed, 19 May 2010 10:41:26 PDT ron minnich rminn...@gmail.com wrote: On Wed, May 19, 2010 at 10:18 AM, Bakul Shah bakul+pl...@bitblocks.com wrote 0. Name syscalltrace is too long :-) pick a name and I'll change it. I used strace but don't really care what you call it as long as it is

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread erik quanstrom
Ok! I don't feel strongly either way. But I hope you do consider counted bytestrings to represent random memory. It is cheap to parse and produce and doesn't lose info. no keep it text. plan 9 wins this way. bytestrings (it seems to me that byte strings are neither) would require knowledge

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 11:23 AM, Bakul Shah bakul+pl...@bitblocks.com wrote: Ok! I don't feel strongly either way.  But I hope you do consider counted bytestrings to represent random memory. It is cheap to parse and produce and doesn't lose info. bear in mind that 99.999% of the time

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Bakul Shah
On Wed, 19 May 2010 10:53:59 PDT ron minnich rminn...@gmail.com wrote: I'll only take that patch if it does NOT include stdio.h. Well, you have the trivial diff so do what you want. As for output ... I'm conflicted on output on 1 vs. 2. But it is nice that you can see normal output of the

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 11:43 AM, Bakul Shah bakul+pl...@bitblocks.com wrote: BTW, truss does the same thing (output to stderr).  ktrace on FreeBSD finesses by just dumping trace output to a file and then kdump is used to show it. strace on linux sends to stderr as well. OK, you win, I'll

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread erik quanstrom
strace on linux sends to stderr as well. OK, you win, I'll change that one. It bothers me to lose error output however. if you really need bug-for-bug compatability, you can always ratrace [1=2] | ... - erik

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Bakul Shah
On Wed, 19 May 2010 11:33:24 PDT ron minnich rminn...@gmail.com wrote: On Wed, May 19, 2010 at 11:23 AM, Bakul Shah bakul+pl...@bitblocks.com wrote: Ok! I don't feel strongly either way. =A0But I hope you do consider counted bytestrings to represent random memory. It is cheap to parse

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 1:30 PM, Bakul Shah bakul+pl...@bitblocks.com wrote: You write startsyscall to pid/syscall for every trace buffer read  -- don't quite understand why that is needed. It gives you the option of not restarting the system call until later. There could be more complex usage

Re: [9fans] Acme-sac integration with Windows NT

2010-05-19 Thread Aram Hăvărneanu
On Wed, May 19, 2010 at 9:36 AM, Arvindh Rajesh Tamilmani arvin...@gmail.com wrote: acme-sac on windows is my development environment too. b2 on 'win os cmd' gives a cmd.exe window.  i prefer sh(1), so i use just 'win' and access the windows files from /n/C. i have shell functions defined in

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
1.name changed to ratrace 2. output now to stderr 3. phooey. For some reason when a syscall fails the errstr prints an empty string. 9vx/trap.c: any suggestions? ron

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Bakul Shah
On Wed, 19 May 2010 13:38:36 PDT ron minnich rminn...@gmail.com wrote: On Wed, May 19, 2010 at 1:30 PM, Bakul Shah bakul+pl...@bitblocks.com wro= te: You write startsyscall to pid/syscall for every trace buffer read -- don't quite understand why that is needed. It gives you the option

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 3:02 PM, Bakul Shah bakul+pl...@bitblocks.com wrote: It gives you the option of not restarting the system call until later. There could be more complex usage scenarios. I don't understand this. You read the start of the system call message. The process is stopped. It

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 2:48 PM, ron minnich rminn...@gmail.com wrote: 3. phooey. For some reason when a syscall fails the errstr prints an empty string. 9vx/trap.c: any suggestions? Fixed. Ron

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Devon H. O'Dell
2010/5/19 ron minnich rminn...@gmail.com: On Wed, May 19, 2010 at 3:02 PM, Bakul Shah bakul+pl...@bitblocks.com wrote: It gives you the option of not restarting the system call until later. There could be more complex usage scenarios. I don't understand this. You read the start of the

Re: [9fans] APE port: lout(1)

2010-05-19 Thread Akshat Kumar
Ah! Thank you for this! The initialization works perfectly now. I wonder, however, if there is another problem around z38.c:254, like the one you have mentioned here? I get the following (extra debugging info removed) when I try to do cpu% cd doc/slides cpu% lout -r2 all slides.ps snip cm:

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread Bakul Shah
On Wed, 19 May 2010 15:25:52 PDT ron minnich rminn...@gmail.com wrote: On Wed, May 19, 2010 at 3:02 PM, Bakul Shah bakul+pl...@bitblocks.com wrote : It gives you the option of not restarting the system call until later. There could be more complex usage scenarios. I don't understand

Re: [9fans] system call trace version of 9vx available.

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 5:26 PM, Bakul Shah bakul+pl...@bitblocks.com wrote: time ratrace -o /dev/null -c mk # about 19.67 seconds did you want [2]/dev/null? mk clean time mk                         # about 0.88 seconds And here I thought naming it ratrace would make it go faster. Speed

[9fans] Replica (partly?) stuck in time

2010-05-19 Thread a
On my cpu server, replica seems to be confused over its current point in time. When I first ran it today, I got a bunch of (correct) local conflicts, and several files were updated. I resolved a few of the local conflicts and re-ran, and while several things worked fine, some odd behavior started

Re: [9fans] Replica (partly?) stuck in time

2010-05-19 Thread ron minnich
On Wed, May 19, 2010 at 10:08 PM, a...@9srv.net wrote: I'm stumped. Anyone have any ideas? Yes, what I have done is stop using replica. I pull source from bitbucket.org and build. Replica is an interesting idea that does not work in the wide area. At least not for me ... ron

Re: [9fans] Acme-sac integration with Windows NT

2010-05-19 Thread Arvindh Rajesh Tamilmani
How do you folks using acme-sac on Windows deal with the line-ending issue? pipefs(4) can be used to filter windows directory trees: http://groups.google.com/group/acme-sac/msg/973e8c67b33a7976 and also to filter /chan/snarf (in $home/lib/profile):