path hanging

S

Stefano Zanella

Guest
Hi,

I recently had this problem: in an ocean script I am issueing
something like:

apply('path remove("/somepath" parseString(car(path()))))

For some reasons (problems with cad environment) this hangs for few
seconds. I think that the path function is the one that causes the
trouble. Do you know if path() contains some code that may depend upon
the network or maybe if it talks to some server that can not be reached?

Thanks a lot,
Stefano
 
On Wed, 13 Apr 2005 18:12:10 -0700, Stefano Zanella
<stefanoDOTzanella@pdf.com> wrote:

Hi,

I recently had this problem: in an ocean script I am issueing
something like:

apply('path remove("/somepath" parseString(car(path()))))

For some reasons (problems with cad environment) this hangs for few
seconds. I think that the path function is the one that causes the
trouble. Do you know if path() contains some code that may depend upon
the network or maybe if it talks to some server that can not be reached?

Thanks a lot,
Stefano
Hi Stefano,

Having looked through the code, the only things I can see which could be an
issue are that for each entry in the path it:

a) does an isDir() to check whether the directory exists
b) does a simplifyFilename() to expand links, tildes etc.

Potentially these could be slow for a few reasons off the top of my head:

1. NFS lookup is slow, because you have a remotely mounted disk as a path
2. NIS/LDAP lookup is slow to expand tildes in path
3. There are directories which need automounting to do the above - but even
then I would not normally expect it to be so slow.

Perhaps you could try doing:

foreach(dir remove("/somepath" parseString(car(path())))
printf("%L %L\n" isDir(dir) simplifyFilename(dir))
)

to see if that is slow too?

Regards,

Andrew.
 
Hi Andrew,

Thanks for the hints.
That's why I am suspecting some time-out issues. However, the weird
thing is that the amount of the slow down seemed to depend upon the load
of the machine and all the other lines of my big ocean script had no
problems whatsoever. Anyhow, I will keep you posted with my findings.

Regards,
Stefano


Hi Stefano,

Having looked through the code, the only things I can see which could be an
issue are that for each entry in the path it:

a) does an isDir() to check whether the directory exists
b) does a simplifyFilename() to expand links, tildes etc.

Potentially these could be slow for a few reasons off the top of my head:

1. NFS lookup is slow, because you have a remotely mounted disk as a path
2. NIS/LDAP lookup is slow to expand tildes in path
3. There are directories which need automounting to do the above - but even
then I would not normally expect it to be so slow.

Perhaps you could try doing:

foreach(dir remove("/somepath" parseString(car(path())))
printf("%L %L\n" isDir(dir) simplifyFilename(dir))
)

to see if that is slow too?

Regards,

Andrew.
 
Hi Andrew,

I can fully reproduce the problem with a simple ocean script:

simulator( 'spectre )

hostMode('remote)
hostName("<some valid host>")
remoteDir("/homes/stefano/tmp")
path("/homes/stefano/tmp")
modelFile('("include.scs" ""))

system("echo -n \" before apply \" ;date")
apply('path remove("/dev" parseString(car(path()))))
apply('path cons("/dev" parseString(car(path()))))
apply('path remove("/dev" parseString(car(path()))))


system("echo -n \" after apply \" ;date")

exit()

I also get the following warning:

*WARNING* artFindBadDirList: exit status = -111

Please notice that if:
1) I run comment out hostName("<some valid host>") I do not get the
slow down (same as if I comment out both hostName and hostMode)
2) commenting out path("<some valid path>") alleviates the problem,
bug does not alleviate it
3) commenting out modelFile does not have any impact

This happens for all the versions of IC I have tested (500, 5033,
5141) on both linux and solaris.

Any ideas?

Thanks a lot!
Stefano



Andrew Beckett wrote:
On Wed, 13 Apr 2005 18:12:10 -0700, Stefano Zanella
stefanoDOTzanella@pdf.com> wrote:


Hi,

I recently had this problem: in an ocean script I am issueing
something like:

apply('path remove("/somepath" parseString(car(path()))))

For some reasons (problems with cad environment) this hangs for few
seconds. I think that the path function is the one that causes the
trouble. Do you know if path() contains some code that may depend upon
the network or maybe if it talks to some server that can not be reached?

Thanks a lot,
Stefano


Hi Stefano,

Having looked through the code, the only things I can see which could be an
issue are that for each entry in the path it:

a) does an isDir() to check whether the directory exists
b) does a simplifyFilename() to expand links, tildes etc.

Potentially these could be slow for a few reasons off the top of my head:

1. NFS lookup is slow, because you have a remotely mounted disk as a path
2. NIS/LDAP lookup is slow to expand tildes in path
3. There are directories which need automounting to do the above - but even
then I would not normally expect it to be so slow.

Perhaps you could try doing:

foreach(dir remove("/somepath" parseString(car(path())))
printf("%L %L\n" isDir(dir) simplifyFilename(dir))
)

to see if that is slow too?

Regards,

Andrew.
 
Ah,

There was a bit in the code I'd not spotted. The complication mainly
comes from the fact you're running remotely.

What happens is that will do the following:

ipcBeginProcess("artNotDir /dev /homes/stefano/tmp" "remoteHostName")

So it needs to be able to rsh onto the remote host, and invoke this artNotDir
command. This is done so that it can make sure the paths are accessible on
the remote machine.

Does that help?

Regards,

Andrew.


On Thu, 14 Apr 2005 19:11:20 -0700, Stefano Zanella
<stefanoDOTzanella@pdf.com> wrote:

Hi Andrew,

I can fully reproduce the problem with a simple ocean script:

simulator( 'spectre )

hostMode('remote)
hostName("<some valid host>")
remoteDir("/homes/stefano/tmp")
path("/homes/stefano/tmp")
modelFile('("include.scs" ""))

system("echo -n \" before apply \" ;date")
apply('path remove("/dev" parseString(car(path()))))
apply('path cons("/dev" parseString(car(path()))))
apply('path remove("/dev" parseString(car(path()))))


system("echo -n \" after apply \" ;date")

exit()

I also get the following warning:

*WARNING* artFindBadDirList: exit status = -111

Please notice that if:
1) I run comment out hostName("<some valid host>") I do not get the
slow down (same as if I comment out both hostName and hostMode)
2) commenting out path("<some valid path>") alleviates the problem,
bug does not alleviate it
3) commenting out modelFile does not have any impact

This happens for all the versions of IC I have tested (500, 5033,
5141) on both linux and solaris.

Any ideas?

Thanks a lot!
Stefano



Andrew Beckett wrote:
On Wed, 13 Apr 2005 18:12:10 -0700, Stefano Zanella
stefanoDOTzanella@pdf.com> wrote:


Hi,

I recently had this problem: in an ocean script I am issueing
something like:

apply('path remove("/somepath" parseString(car(path()))))

For some reasons (problems with cad environment) this hangs for few
seconds. I think that the path function is the one that causes the
trouble. Do you know if path() contains some code that may depend upon
the network or maybe if it talks to some server that can not be reached?

Thanks a lot,
Stefano


Hi Stefano,

Having looked through the code, the only things I can see which could be an
issue are that for each entry in the path it:

a) does an isDir() to check whether the directory exists
b) does a simplifyFilename() to expand links, tildes etc.

Potentially these could be slow for a few reasons off the top of my head:

1. NFS lookup is slow, because you have a remotely mounted disk as a path
2. NIS/LDAP lookup is slow to expand tildes in path
3. There are directories which need automounting to do the above - but even
then I would not normally expect it to be so slow.

Perhaps you could try doing:

foreach(dir remove("/somepath" parseString(car(path())))
printf("%L %L\n" isDir(dir) simplifyFilename(dir))
)

to see if that is slow too?

Regards,

Andrew.
 
Hi Andrew,

No, it does not help.

ipcBeginProcess("artNotDir /dev /homes/stefano/tmp" "remoteHostName")

works with no problems. If you try the script I have attached in my
previous post, you should see the problem. I could reproduce it for
every valid and invalid combinations of hosts/paths/model files. I guess
that this is an ocean bug. Have you tried the script? Does it work for you?

Thanks a lot for your help!
Stefano

Andrew Beckett wrote:
Ah,

There was a bit in the code I'd not spotted. The complication mainly
comes from the fact you're running remotely.

What happens is that will do the following:

ipcBeginProcess("artNotDir /dev /homes/stefano/tmp" "remoteHostName")

So it needs to be able to rsh onto the remote host, and invoke this artNotDir
command. This is done so that it can make sure the paths are accessible on
the remote machine.

Does that help?

Regards,

Andrew.


On Thu, 14 Apr 2005 19:11:20 -0700, Stefano Zanella
stefanoDOTzanella@pdf.com> wrote:


Hi Andrew,

I can fully reproduce the problem with a simple ocean script:

simulator( 'spectre )

hostMode('remote)
hostName("<some valid host>")
remoteDir("/homes/stefano/tmp")
path("/homes/stefano/tmp")
modelFile('("include.scs" ""))

system("echo -n \" before apply \" ;date")
apply('path remove("/dev" parseString(car(path()))))
apply('path cons("/dev" parseString(car(path()))))
apply('path remove("/dev" parseString(car(path()))))


system("echo -n \" after apply \" ;date")

exit()

I also get the following warning:

*WARNING* artFindBadDirList: exit status = -111

Please notice that if:
1) I run comment out hostName("<some valid host>") I do not get the
slow down (same as if I comment out both hostName and hostMode)
2) commenting out path("<some valid path>") alleviates the problem,
bug does not alleviate it
3) commenting out modelFile does not have any impact

This happens for all the versions of IC I have tested (500, 5033,
5141) on both linux and solaris.

Any ideas?

Thanks a lot!
Stefano



Andrew Beckett wrote:

On Wed, 13 Apr 2005 18:12:10 -0700, Stefano Zanella
stefanoDOTzanella@pdf.com> wrote:



Hi,

I recently had this problem: in an ocean script I am issueing
something like:

apply('path remove("/somepath" parseString(car(path()))))

For some reasons (problems with cad environment) this hangs for few
seconds. I think that the path function is the one that causes the
trouble. Do you know if path() contains some code that may depend upon
the network or maybe if it talks to some server that can not be reached?

Thanks a lot,
Stefano


Hi Stefano,

Having looked through the code, the only things I can see which could be an
issue are that for each entry in the path it:

a) does an isDir() to check whether the directory exists
b) does a simplifyFilename() to expand links, tildes etc.

Potentially these could be slow for a few reasons off the top of my head:

1. NFS lookup is slow, because you have a remotely mounted disk as a path
2. NIS/LDAP lookup is slow to expand tildes in path
3. There are directories which need automounting to do the above - but even
then I would not normally expect it to be so slow.

Perhaps you could try doing:

foreach(dir remove("/somepath" parseString(car(path())))
printf("%L %L\n" isDir(dir) simplifyFilename(dir))
)

to see if that is slow too?

Regards,

Andrew.
 
Hi,

Cadence support could reproduce the issue. PCR 800176 has been filed
for this.

Regards,
Stefano

Stefano Zanella wrote:
Hi Andrew,

No, it does not help.

ipcBeginProcess("artNotDir /dev /homes/stefano/tmp" "remoteHostName")

works with no problems. If you try the script I have attached in my
previous post, you should see the problem. I could reproduce it for
every valid and invalid combinations of hosts/paths/model files. I guess
that this is an ocean bug. Have you tried the script? Does it work for you?

Thanks a lot for your help!
Stefano

Andrew Beckett wrote:

Ah,

There was a bit in the code I'd not spotted. The complication mainly
comes from the fact you're running remotely.

What happens is that will do the following:

ipcBeginProcess("artNotDir /dev /homes/stefano/tmp" "remoteHostName")

So it needs to be able to rsh onto the remote host, and invoke this
artNotDir
command. This is done so that it can make sure the paths are
accessible on
the remote machine.

Does that help?

Regards,

Andrew.


On Thu, 14 Apr 2005 19:11:20 -0700, Stefano Zanella
stefanoDOTzanella@pdf.com> wrote:


Hi Andrew,

I can fully reproduce the problem with a simple ocean script:

simulator( 'spectre )

hostMode('remote)
hostName("<some valid host>")
remoteDir("/homes/stefano/tmp")
path("/homes/stefano/tmp")
modelFile('("include.scs" ""))

system("echo -n \" before apply \" ;date")
apply('path remove("/dev" parseString(car(path()))))
apply('path cons("/dev" parseString(car(path()))))
apply('path remove("/dev" parseString(car(path()))))


system("echo -n \" after apply \" ;date")

exit()

I also get the following warning:

*WARNING* artFindBadDirList: exit status = -111

Please notice that if:
1) I run comment out hostName("<some valid host>") I do not get the
slow down (same as if I comment out both hostName and hostMode)
2) commenting out path("<some valid path>") alleviates the problem,
bug does not alleviate it
3) commenting out modelFile does not have any impact

This happens for all the versions of IC I have tested (500, 5033,
5141) on both linux and solaris.

Any ideas?

Thanks a lot!
Stefano



Andrew Beckett wrote:

On Wed, 13 Apr 2005 18:12:10 -0700, Stefano Zanella
stefanoDOTzanella@pdf.com> wrote:



Hi,

I recently had this problem: in an ocean script I am issueing
something like:

apply('path remove("/somepath" parseString(car(path()))))

For some reasons (problems with cad environment) this hangs for few
seconds. I think that the path function is the one that causes the
trouble. Do you know if path() contains some code that may depend
upon the network or maybe if it talks to some server that can not
be reached?

Thanks a lot,
Stefano



Hi Stefano,

Having looked through the code, the only things I can see which
could be an
issue are that for each entry in the path it:

a) does an isDir() to check whether the directory exists
b) does a simplifyFilename() to expand links, tildes etc.

Potentially these could be slow for a few reasons off the top of my
head:

1. NFS lookup is slow, because you have a remotely mounted disk as a
path
2. NIS/LDAP lookup is slow to expand tildes in path
3. There are directories which need automounting to do the above -
but even
then I would not normally expect it to be so slow.

Perhaps you could try doing:

foreach(dir remove("/somepath" parseString(car(path())))
printf("%L %L\n" isDir(dir) simplifyFilename(dir))
)

to see if that is slow too?

Regards,

Andrew.
 
On Mon, 16 May 2005 11:16:24 -0700, Stefano Zanella
<stefanoDOTzanella@pdf.com> wrote:

Hi,

Cadence support could reproduce the issue. PCR 800176 has been filed
for this.

Regards,
Stefano
Thanks Stefano for this. Sorry I'd not had a chance to look into your problem
in more detail (the day job kept getting in the way ;-> )

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top