Re: Re[2]: [9fans] Strange 'uintptr' behavior

2022-01-25 Thread Pavel Klinkovský
Ah, thanks! Going to try...

út 25. 1. 2022 v 9:28 odesílatel Alex Musolino  napsal:

> It didn't always work on 9front.  Check the dump!
> 
> After bisecting the dump and looking through the git log, I suspect
> that 9front changeset 71939a82 [1] will fix it for you.
> 
> [1]
> https://git.9front.org/plan9front/plan9front/71939a82ccc505b0baa990d7fe17e7085d0ab8fc/commit.html
> 

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb5fe0dc43447ab2c-Ma557fc25c99094fa66c5fa53
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Strange 'uintptr' behavior

2022-01-24 Thread Pavel Klinkovský
Sorry, I was not precise enough.
I prepared arrays in the initiated data segment:


This program cannot be compiled:

#include 
#include 

uintptr frst[] = {nil, nil, nil, nil, nil};
uintptr scnd[] = {nil, nil, frst, &frst[1]};

void main(void) {
exits(nil);
}

...because of:

cpu% 5c t.c
t.c:5 initializer is not a constant: scnd


This program can be compiled:

#include 
#include 

void* frst[] = {nil, nil, nil, nil, nil};
void* scnd[] = {nil, nil, frst, &frst[1]};

void main(void) {
exits(nil);
}

Pavel

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb5fe0dc43447ab2c-M55c6dc11d2315bac025e3124
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Strange 'uintptr' behavior

2022-01-24 Thread Pavel Klinkovský
> what headers you've included?
>

As usually:

#include 
#include 


with uintptr i get compilation error: incompatible types: "ULONG" and "IND
> VOID" for op AS.
> with void* it compiles without errors.
>
> alex.b.
>
> ps: are you czech?
>

Yes.

Pavel

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb5fe0dc43447ab2c-Mfd55c3e288c7cbeeafb039f5
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] Strange 'uintptr' behavior

2022-01-24 Thread Pavel Klinkovský
Hi all,

I tried some artificial example for Plan9 compiler (5c)...

This code is compiled without any problem:
uintptr frst[] = {nil, nil, nil, nil, nil};
uintptr scnd[] = {nil, nil, frst, &frst[0]};

But this one fails:
uintptr frst[] = {nil, nil, nil, nil, nil};
uintptr scnd[] = {nil, nil, frst, &frst[1]};

...with message:
cpu% 5c -p t.c
/usr/pavel/t.c:16[t.c:888] initializer is not a constant: scnd

OTOH, replacement of 'uintptr' by 'void*' is compiled without any problem:
void* frst[] = {nil, nil, nil, nil, nil};
void* scnd[] = {nil, nil, frst, &frst[1]};

Any explanation is appreciated.

Pavel

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb5fe0dc43447ab2c-M240dd4253f2ea03efc2d9013
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] the fossil (tm) stolen

2018-04-16 Thread Pavel Klinkovský
> I Really use fossil and venti and have done so for the last 12 years,
> though perhaps I am nobody...
>

So we are 2 nobodies, at least... ;)

Pavel


[9fans] Strange behavior of 'go's' DialUDP under Plan9

2018-03-01 Thread Pavel Klinkovský
Hi all,

I am trying a very simple 'go' program under Plan9 (both 386 and ARM):

package main

import (
"fmt"
"net"
"time"
)

func main() {
laddr, err := net.ResolveUDPAddr("udp", ":6000")
if err != nil {
fmt.Println("laddr: ", err)
}

raddr, err := net.ResolveUDPAddr("udp", "cpx61.tk8.lan:6000")
if err != nil {
fmt.Println("raddr: ", err)
}

conn, err := net.DialUDP("udp", laddr, raddr)
if err != nil {
fmt.Println("Error: ", err)
}
defer conn.Close()

time.Sleep(time.Minute)
}

When running I check 'netstat' listing:

udp  0pavel  Open 39505  6000   cpx61.tk8.lan

It seems 'go' port for Plan9 incorrectly handles local port specification
in DialUDP function.

Pavel


Re: [9fans] Change of plan9 partition size

2017-10-17 Thread Pavel Klinkovský
>
> I just created a new partition of PLAN9 type there (according to
>> https://9p.io/wiki/plan9/setting_up_Venti/index.html), saved and
>> rebooted...
>>
>> ...and system failed to boot:
>>
>> boot: can't connect to file server: '/boot/kfs' does not exists
>>
>
> It seems the boot process does not like two PLAN9 partitions on SD.
>

I was wrong.
The problem is in disk/fdisk which probably damaged the partition table
disabling subsequent reboot.

If I partitioned SD under Linux, the problem was over...

Pavel


Re: [9fans] Change of plan9 partition size

2017-10-13 Thread Pavel Klinkovský
>
> I just created a new partition of PLAN9 type there (according to
> https://9p.io/wiki/plan9/setting_up_Venti/index.html), saved and
> rebooted...
>
> ...and system failed to boot:
>
> boot: can't connect to file server: '/boot/kfs' does not exists
>

It seems the boot process does not like two PLAN9 partitions on SD.
Not clear why...

Pavel


Re: [9fans] Change of plan9 partition size

2017-10-12 Thread Pavel Klinkovský
>
> > Maybe it would be wise to use Venti on that unsed space... ;)
>
> If you don't have a venti server somewhere near your pi yet, then
> definitely yes.
>

It will be a fight... ;)

I just created a new partition of PLAN9 type there (according to
https://9p.io/wiki/plan9/setting_up_Venti/index.html), saved and rebooted...

...and system failed to boot:

boot: can't connect to file server: '/boot/kfs' does not exists

Pavel


Re: [9fans] Change of plan9 partition size

2017-10-12 Thread Pavel Klinkovský
>
> 9pi has about 1,7GB plan9 partition size.
> On my 8GB SD card the rest is unused...
>

Maybe it would be wise to use Venti on that unsed space... ;)

Pavel


[9fans] Change of plan9 partition size

2017-10-12 Thread Pavel Klinkovský
>
> Once you have that, you can run it on Plan 9 on the Raspberry Pi to
> bootstrap the current release of go.
>

Another stupid question - sorry for that ;)...

9pi has about 1,7GB plan9 partition size.
On my 8GB SD card the rest is unused...

Is there a way how to extended plan9 partition to use the whole SD space?

Thanks in advance.

Pavel


Re: [9fans] Go 1.4.3 compilation on Raspberry Pi

2017-10-11 Thread Pavel Klinkovský
>
> There are some binaries available here if you want to use them to
> bootstrap:
>
> http://www.9legacy.org/download.html


Already done and working fine. ;)

Thank you.

Pavel


Re: [9fans] Go 1.4.3 compilation on Raspberry Pi

2017-10-11 Thread Pavel Klinkovský
>
> I believe that route to bootstrapping go from scratch on Plan 9
> will work only for 386.
>

I see.


> On arm, you can either cross-compile go1.4 on another go platform
> (eg plan9/386, plan9port on linux/386, or linux/arm), or start with
> a pre-compiled plan9/arm package (there are several to choose from
> on http://www.9legacy.org/download.html).
>

Excellent.

Once you have that, you can run it on Plan 9 on the Raspberry Pi to
> bootstrap the current release of go.
>

Perfect, going to follow your recommendation.

Thank you for such a hint

Pavel


[9fans] Go 1.4.3 compilation on Raspberry Pi

2017-10-11 Thread Pavel Klinkovský
Hi all,

I am trying to compile Go 1.4.3 on my Raspberry Pi following David's
instructions on https://github.com/golang/go/wiki/Plan9.

But still having errors...

term% make.rc
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, plan9/arm.
lib9
libbio
liblink
/usr/glenda/go1.4/include/plan9/../link.h:56[/usr/glenda/go1.4/src/liblink/anames6.c:1487]
syntax error, last name: float64
/usr/glenda/go1.4/include/plan9/../link.h:56[/usr/glenda/go1.4/src/liblink/anames8.c:1487]
syntax error, last name: float64
go tool dist: FAILED: /bin/5c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/glenda/go1.4/include/plan9
-I/usr/glenda/go1.4/include/plan9/arm -I /usr/glenda/go1.4/src/liblink -o
$WORK/anames6.5 /usr/glenda/go1.4/src/liblink/anames6.c:
'/usr/glenda/go1.4/src/liblink/anames8.c' does not exist
/usr/glenda/go1.4/include/plan9/../link.h:56[/usr/glenda/go1.4/src/liblink/asm5.c:1519]
syntax error, last name: float64
go tool dist: FAILED: /bin/5c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/glenda/go1.4/include/plan9
-I/usr/glenda/go1.4/include/plan9/arm -I /usr/glenda/go1.4/src/liblink -o
$WORK/anames8.5 /usr/glenda/go1.4/src/liblink/anames8.c:
'/usr/glenda/go1.4/src/liblink/anames8.c' does not exist
/usr/glenda/go1.4/include/plan9/../link.h:56[/usr/glenda/go1.4/src/liblink/anames5.c:1487]
syntax error, last name: float64
go tool dist: FAILED: /bin/5c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/glenda/go1.4/include/plan9
-I/usr/glenda/go1.4/include/plan9/arm -I /usr/glenda/go1.4/src/liblink -o
$WORK/asm5.5 /usr/glenda/go1.4/src/liblink/asm5.c:
'/usr/glenda/go1.4/src/liblink/anames8.c' does not exist
go tool dist: FAILED: /bin/5c -FTVwp -DPLAN9 -D__STDC__=1
-D__SIZE_TYPE__=ulong -I/usr/glenda/go1.4/include/plan9
-I/usr/glenda/go1.4/include/plan9/arm -I /usr/glenda/go1.4/src/liblink -o
$WORK/anames5.5 /usr/glenda/go1.4/src/liblink/anames5.c:
'/usr/glenda/go1.4/src/liblink/anames8.c' does not exist
term%

Any idea what I am doing wrong?

Thanks in advance.

Pavel


Re: [9fans] Plan9 CPU on Rpi has nvram problem

2016-03-22 Thread Pavel Klinkovský
As expected, it was my fault.

I did not...
cp config-cpu.txt config.txt

Sorry for the noise...

Pavel


Re: [9fans] Plan9 CPU on Rpi has nvram problem

2016-03-22 Thread Pavel Klinkovský
>
> Have you written your key? (hint: auth/wrkey)


Still the same:

cpu% auth/wrkey
readnvram: can't find nvram
authid: bootes
...
can't write key to nvram:
error writing nvram:
cpu%

The nvram partition exists:
/dev/sdM0/nvram

Pavel


[9fans] Plan9 CPU on Rpi has nvram problem

2016-03-22 Thread Pavel Klinkovský
Hello everyone,

I almost succussfully installed P9 CPU server on my Raspberry Pi.
However during the booting it has a problem with nvram each time:

496M memory: 101M kernel data, 395M user, 1877M swap
usb/hub... usb/ether...
etherusb smsc: b827eb19b423
usb/kb... usb/kb... readnvram: can't find nvram
authid: bootes
...

Maybe I made a mistake during the CPU server configuration, but cannot find
which one... :(

Can you help me?

Thanks in advance.

Pavel


Re: [9fans] 9atom boot problem

2015-01-29 Thread Pavel Klinkovský
>
> If I choose to install plan9, I get a result shown in the attached
> a.png (and it does not proceed any further).
>
> If I choose to just boot (not install), it gets stuck after
> init: starting /bin/rc
> and shows the same 'spurious interrupt 39'.
>

Try to play with AHCI settings in BIOS.
IIRC I had similar problems with my IntelAtom based M/B.

Pavel


Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
> +   if(strcmp(f[0], "hangup") == 0){
>> +   qhangup(c->rq, nil);
>> +   qhangup(c->wq, nil);
>> +   return nil;
>> +   }
>
>
You patch works as expected. ;)

Thanks.

Pavel


Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
> the changes to implement udp hangup are trivial tho:
>
> diff -r 51564dc1adae sys/src/9/ip/udp.c
> --- a/sys/src/9/ip/udp.cThu Nov 13 10:23:53 2014 +0100
> +++ b/sys/src/9/ip/udp.cThu Nov 13 15:42:24 2014 +0100
> @@ -518,6 +518,11 @@
>
> ucb = (Udpcb*)c->ptcl;
> if(n == 1){
> +   if(strcmp(f[0], "hangup") == 0){
> +   qhangup(c->rq, nil);
> +   qhangup(c->wq, nil);
> +   return nil;
> +   }
>

I see.
Going to try.

Pavel


Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
> interesting, that might be worth implementing.
>

Maybe.


> the alternative would be to send the reading process a note to
> interrupt the blocking syscall.
>

Actually, it my 'plan B'... ;)

the closer proc should just send the note and not close the fd.
> and the reader proc should close the fd once he's out of the
> reading loop.
>

Exactly!

Well, I would prefer a solution with 'hangup', it seems cleaner to me...
...but since it is not implemented in UDP driver, I will implement the note
based solution.

Pavel


Pavel


Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
OTOH, 'hangup' approach does not work in UDP.
It means, read() is not finished... :(

Pavel

2014-11-13 14:17 GMT+01:00 :

> ah, ok :)
>
> --
> cinap
>
>


Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
> another way to implement these kinds of timeouts is
> alarm(), see sleep(2).
>

Yes, I know.

But it was just a simplified example to explain my real need:
- 'receiver' process
- another 'sender' process, which should have a possibility to close the
TCP connection, and relase 'receiver' from read() call...

Pavel


Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
Hi cinap,

hangup(cfd);/* hangup connection, fd stays valid but i/o will error */
>

thank you for your explanation and help.

Going to use 'hangup' function. ;)

Pavel


[9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'?

2014-11-13 Thread Pavel Klinkovský
Hi all,

I am trying such simple program:

#include 
#include 

static void
closer(int dfd) {
print("closer(%d): 1\n", getpid());
sleep(10 * 1000);
print("closer(%d): 2\n", getpid());
close(dfd);
print("closer(%d): 3\n", getpid());
}

void
main(int, char**)
{
int dfd;
char ddir[NETPATHLEN];
char buf[1024];
long nr;

print("main  (%d): 1\n", getpid());
dfd = dial("tcp!192.168.8.61!23", nil, ddir, nil);
if (dfd < 0)
sysfatal("dial: %r");

print("main  (%d): 2\n", getpid());
switch (rfork(RFPROC|RFREND|RFMEM)) {
case -1:
sysfatal("fork: %r");

case 0:
closer(dfd);
break;

default:
for (;;) {
print("main  (%d): 3\n", getpid());
nr = read(dfd, buf, sizeof buf);
print("main  (%d): 4\n", getpid());
if (nr <= 0)
break;
}

print("main  (%d): 5\n", getpid());
close(dfd);
break;
}

exits(nil);
}

I want to have one process waiting in 'read' function on opened TCP
connection.
I want to close such a TCP connection from another process (created with
shared file descriptor table).
I would expect that 'read' function is finished with -1...
...but it is not.

Here is the output of the program:
main  (2): 1
main  (2): 2
closer(3): 1
main  (2): 3
main  (2): 4
main  (2): 3
closer(3): 2
closer(3): 3

You can see that 'main' process is still pending in 'read' function on
already closed 'fd'.

Do I really have to use notes to release the pending 'main' in 'read' call?

Pavel


Re: [9fans] Failed 'reject' function?

2014-10-10 Thread Pavel Klinkovský
Hi Sergey,

It seems, you do it incorrectly :) dial(2) has an exact example if using
> announce/listen/accept functions.
>

I do exactly what I need. ;)

The sequence announce/listen/accept is very well known to me.

But I need both possibilities:
- accept incoming connection
- reject incoming connection, which failed.

Thank to Charles, I finally understood.

Pavel


[9fans] Failed 'reject' function?

2014-10-10 Thread Pavel Klinkovský
Hi all,

I tried very simple program on native Plan9:

#include 
#include 

void
main(int, char**)
{
int afd, lfd;
char adir[NETPATHLEN], ldir[NETPATHLEN];

afd = announce("tcp!*!20540", adir);
if (afd < 0)
sysfatal("listen: %r");

lfd = listen(adir, ldir);
if (lfd < 0)
sysfatal("listen: %r");

if (reject(lfd, ldir, "unauthorized") < 0)
sysfatal("reject: %r");

close(lfd);
close(afd);
exits(nil);
}

I dicovered that the funtion 'reject' fails:
term% 8.out
reject: unknown control request

In 'ratrace' listing I can really see the 'reject' function failure:
348 8.out Open 33a7 0xdfffe9bc/"/net/cs" 0x2 = 3 "" 1412926762174586973
1412926762174841785
348 8.out Pwrite 5577 3  0x7880/"tcp!*!20540" 11 -1 = 11 ""
1412926762186976342 1412926762187086984
348 8.out Seek 3391 0x7ab8 3 0x0 0 = 0 "" 1412926762198637769
1412926762198646989
348 8.out Pread 557f 3 0xdfffe9bc 255 -1 0xdfffe9bc/"/net/tcp/clone.20540"
255 -1 = 20 "" 1412926762200546351 1412926762200619275
348 8.out Close 1225 3 = 0 "" 1412926762221784602 1412926762221865069
348 8.out Open 33a7 0xdfffebe0/"/net/tcp/clone" 0x2 = 3 ""
1412926762223717492 1412926762223849089
348 8.out Pread 557f 3 0xdfffede9 246 -1 0xdfffede9/"4" 246 -1 = 1 ""
1412926762235853725 1412926762235866298
348 8.out Pwrite 5577 3  0xdfffece0/"announce.20540" 14 -1 = 14 ""
1412926762247454802 1412926762247479948
348 8.out Open 33a7 0xdfffede0/"/net/tcp/4/listen" 0x2 = 4 ""
1412926762259028218 1412926771821372908
348 8.out Pread 557f 4 0xdfffede9 246 -1 0xdfffede9/"6" 246 -1 = 1 ""
1412926771844967723 1412926771844984487
348 8.out Pwrite 5577 4  0xdfffedec/"reject.6.unauthorized" 21 -1 = -1
unknown control request 1412926771854330421 1412926771854347185
348 8.out Errstr 5587 0xdfffe914 128"" 128 = 0  1412926771871626615
1412926771871632483
348 8.out Errstr 5587 0xdfffe914 128"" 128 = 0 unknown control request
1412926771887234674 1412926771887239703
348 8.out Pwrite 5577 2  0xdfffe980/"reject:.unknown.control.request." 32
-1reject: unknown control request
 = 32 "" 1412926771918100040 1412926771932457957
348 8.out Open 33a7 0x7538/"#c/pid" 0x0 = 5 "" 1412926771947976329
1412926771948085295
348 8.out Pread 557f 5 0xdfffeaa0 20 -1 0xdfffeaa0/"348." 20 -1 =
12 "" 1412926771963591547 1412926771963607473
348 8.out Close 1225 5 = 0 "" 1412926771979115786 1412926771979128359
348 8.out Exits 122d 0xdfffeadc/"reject: unknown control request"

Do you have any explanation?
Did I make some bug in the program?

Thanks in advance.

Pavel


Re: [9fans] Mysterious auth again...?

2014-08-05 Thread Pavel Klinkovský
Hi Stevie,

you were right, I missed one point during the server
installation/configuration:
I forgot 'auth/changeuser bootes'... :(

Now 'auth/debug' works well, sorry for a noise.

And thank you.

Pavel



2014-08-05 11:09 GMT+02:00 Pavel Klinkovský :

> Hi Stevie,
>
> I think this thread on 9fans might help:
>>
>> http://marc.info/?l=9fans&m=116732560810918&w=2
>
>
> thanks, going to read it too.
>
>
>
>> Read the whole thread, but I think my linked message has the answer.
>> Do you start keyfs before listen in your cpurc?
>>
>
> Yes, it was 1st thing I checked...
>
> Pavel
>
>


Re: [9fans] Mysterious auth again...?

2014-08-05 Thread Pavel Klinkovský
Hi Stevie,

I think this thread on 9fans might help:
>
> http://marc.info/?l=9fans&m=116732560810918&w=2


thanks, going to read it too.



> Read the whole thread, but I think my linked message has the answer.
> Do you start keyfs before listen in your cpurc?
>

Yes, it was 1st thing I checked...

Pavel


Re: [9fans] Mysterious auth again...?

2014-08-05 Thread Pavel Klinkovský
Hi Stevie,

I know, auth can be tricky...


In fact.


> Without having further information about your setup I
> can only recommend reading this doc:
> http://kamalatta.ddnss.de/config/Plan9Tutorial.txt.
>

Thanks for the link, going to recheck my configuration.


> P.S.: I don't know the full background, but connecting as the
> hostowner seems to have other prerequisites.
>

That's what is surprising me.
I can 'cpu' the machine with 'bootes' (hostowner) uid.
I can 'srv' the machine...
I must have something strange there...

Pavel


[9fans] Mysterious auth again...?

2014-08-04 Thread Pavel Klinkovský
Hi all,

I am fighting with configuration of '9pccpuf' server.

I have configured user 'bootes' as a hostowner.
I have 'listen', 'keyfs' running.

I can 'cpu' such server from another Plan9 terminal ('9pcf') as user
'bootes'.
I can 'srv' such server from another Plan9 terminal ('9pcf') as user
'bootes'.

BUT:

server# auth/debug
p9sk1 key: dom=xxx proto=p9sk1 user=bootes !hex? !password?
successfully dialed auth server
password for bootesxxx [hit enter to skip test]:
cannot decrypt ticket1 from auth server (bad t.num=0x...)
auth server and you do not agree on key for bootesxxx

I found that it was already solved in the past...
http://comments.gmane.org/gmane.os.plan9.general/55049

but it looks I have a correct sequence in /rc/bin/cpurc, /cfg/server/cpurc,
/cfg/server/cpustart...

Any idea what do I have wrong?

Thanks in advance.

Pavel

P.S.: I cannot make 'auth' system to work with another added user... :(


Re: [9fans] Mistake in Plan9 Mercual port?

2014-06-01 Thread Pavel Klinkovský
>
> 1. Is is a new 'python' interpretter implementation? What is a difference
> from 'bichued/python’?
>
>
> It’s a ‘new’ CPython 2.7.x version.  No dependencies on 3rd party libs
> (e.g., openssl, bzip2, …).
>

Ah, excellent. Going to try...
(Personally, I never liked the dependency on openssl...)


> 3. I see a little chicken-egg problem, to clone such 'python' version, I
> need 'bichued/python' and 'bichued/hg' already installed... ;)
>
>
> No problem there, you can download source tar+gz|bz2 directly from both
> bitbucket and selenic.
>

OK


> To build just unpack:
>
> src/
>cpython/
>hg/
>
> and follow the cpython/mkfile rules.
>

Going to follow your recommendation.

Thank you and Erik for your answers.

Pavel


Re: [9fans] Mistake in Plan9 Mercual port?

2014-06-01 Thread Pavel Klinkovský
>
> https://bitbucket.org/jas/cpython
>
> you can pull hg directly from the mainline.
>

Well, I am a little bit confused...

1. Is is a new 'python' interpretter implementation? What is a difference
from 'bichued/python'?
2. Is my original problem with mercurial caused by 'hg' or 'python' on
Plan9?
3. I see a little chicken-egg problem, to clone such 'python' version, I
need 'bichued/python' and 'bichued/hg' already installed... ;)

Pavel


Re: [9fans] Mistake in Plan9 Mercual port?

2014-06-01 Thread Pavel Klinkovský
which version of hg are you using?
>

...from contrib - bichued/hg


>  i'm pretty sure that jeff's version use ape/psh to execute
> commands, but not positive.  it must use psh to be posix-y.
>

Ah, where is it available?

Pavel


Re: [9fans] Mistake in Plan9 Mercual port?

2014-05-31 Thread Pavel Klinkovský
It seems I do not fully understand the discussion about ssh...

When I manually make this command (what 'hg' does)...

ssh xxx.yyy.zzz "hg init test"


...the result is:

bash: hg: Command not found...


When I manually modify it...


ssh xxx.yyy.zzz 'hg init test'

...the result is...

!Adding key: proto=pass server=xxx.yyy.zzz service=ssh user=pavel
password:
!

...and the remote repository is successfully created.

Therefore I though the problem is wrong usage of " instead of ' in the
mercurial port...

Pavel


Re: [9fans] Mistake in Plan9 Mercual port?

2014-05-31 Thread Pavel Klinkovský
Hi Steven,

For the most part, using HTTP/S repositories will give you the best bang
> for the proverbial buck.


I see. In fact I tried to create and use Mercurial repository via 'ssh' and
'ftp' (via ftpfs) and none of them works.

Pavel


[9fans] Mistake in Plan9 Mercual port?

2014-05-31 Thread Pavel Klinkovský
Hi all,

I am using native Plan9.

I tried to create a remote Mercurial repository via 'ssh':

term% hg init ssh://xxx.yyy.zzz/test --verbose
running ssh xxx.yyy.zzz "hg init test"
running ssh xxx.yyy.zzz "hg -R test serve --stdio"
remote: abort: Bad file number
abort: no suitable response from remote hg!


Should not it be?

running ssh xxx.yyy.zzz *'*hg init test*'*
running ssh xxx.yyy.zzz *'*hg -R test serve --stdio*'*


Pavel


Re: [9fans] Maximal number of processes

2014-01-10 Thread Pavel Klinkovský
I discovered another interesting feature in my tests:

If 'fork' exceeds nproc value, kernel panics.
If 'fork' reaches the available memory limit, it is blocked until some
memory is released (e.g. by the finish of some process).

Pavel



2014/1/10 erik quanstrom 

> > launching 32000 processes was not possible.  the kernel got stuck.
>
> sloppy statement.  it's not clear if the kernel was really stuck or just
> hit something exponential.
>
> > here's one thing that's not immediately obvious, even when running the
> > kernel.  conv.nmach must be less than 0x7fff/(1000*1000) = 2147
> > to prevent reprioritize from doing silly things:
> >
> >   /*
> >*  fairshare = 1.000 * conf.nproc * 1.000/load,
> >* except the decimal point is moved three places
> >* on both load and fairshare.
> >*/
> >   fairshare = (conf.nmach*1000*1000)/load;
>
> and, look.  the comment's wrong.  never read the comments!
>
> - erik
>
>
<>

Re: [9fans] Maximal number of processes

2014-01-09 Thread Pavel Klinkovský
Hi Steven,


conf.nproc = 100 + ((conf.npage*BY2PG)/MB)*5;
> if(cpuserver)
> conf.nproc *= 3;
> if(conf.nproc > 2000)
> conf.nproc = 2000;
>
> In general, you will find that 2000 is the highest allowable due to
> limits imposed by proc.c.


but if I understand it correctly it is just "soft limit", not a "hard" one
inborn in CPU architecture.

By the hard limit I consider something like "maximal capacity of GDT, LDT"
or something similar, if exists.


> At the end of the day, the only way to be sure is to read the source.
>

I did (of course, I am not an expert on Plan9 kernel), and I did not find
any "hard limit" there.
However to be sure I issued my question here.

Pavel


[9fans] Maximal number of processes

2014-01-08 Thread Pavel Klinkovský
Hi all,

I would like to know whether there is any hard (based on CPU architecture)
limit of maximal number of processes in Plan9 on Intel or ARM.

I do not think the soft limit like the lack of memory... ;)

Thanks in advance for any hint.

Pavel