Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - can't create pipe - try again from telnet shell: (8 Items)
   
can't create pipe - try again from telnet shell  
Big loop shell script runs a long time and then crashes with error message:
./runloop[25]: can't create pipe - try again

After this error the shell seems to have lost its enviroment or has gotten
into some wacko state.  The only way I know to clear this problem
is to reboot, even if I log out and open a new shell the system
does not recover.  I see this happening every few days but have not 
precisely correlated it with the things that I am doing.

All suggestions welcome,
Augie Mattheiss
http://civspace.jhuapl.edu/

# cat runloop1
#!/bin/sh
date
loopcnt=0
looplist="1 2 3 4 5 6 7 8 9 10"
#looplist="1 2"
for index6 in $looplist ; do
for index5 in $looplist ; do
for index4 in $looplist ; do
for index3 in $looplist ; do
  for index2 in $looplist ; do
    for index1 in $looplist ; do
      pciwrite 0x11aa 0x1770 0 2 0 $loopcnt
      PCIREADANS=$(pciread 0x11aa 0x1770 0 2 0)
     # echo $loopcnt $PCIREADANS
      printf "%d should == %X\n" "$loopcnt" "$PCIREADANS"
      let loopcnt=loopcnt+1
      # sleep 1
     # date
    done
  done
done
done
done
done
date
#


> ./runloop1[25]: can't create pipe - try again



login: root
sh: /etc/profile[21]: can't create pipe - try again
sh: /root/.profile[5]: can't create pipe - try again
# ls






Re: can't create pipe - try again from telnet shell  
> Big loop shell script runs a long time and then crashes with error message:
> ./runloop[25]: can't create pipe - try again
> 
> After this error the shell seems to have lost its enviroment or has gotten
> into some wacko state.  The only way I know to clear this problem
> is to reboot, even if I log out and open a new shell the system
> does not recover.  I see this happening every few days but have not 
> precisely correlated it with the things that I am doing.
> 
> All suggestions welcome,
> Augie Mattheiss
> http://civspace.jhuapl.edu/
> 
> # cat runloop1
> #!/bin/sh
> date
> loopcnt=0
> looplist="1 2 3 4 5 6 7 8 9 10"
> #looplist="1 2"
> for index6 in $looplist ; do
> for index5 in $looplist ; do
> for index4 in $looplist ; do
> for index3 in $looplist ; do
>   for index2 in $looplist ; do
>     for index1 in $looplist ; do
>       pciwrite 0x11aa 0x1770 0 2 0 $loopcnt
>       PCIREADANS=$(pciread 0x11aa 0x1770 0 2 0)
>      # echo $loopcnt $PCIREADANS
>       printf "%d should == %X\n" "$loopcnt" "$PCIREADANS"
>       let loopcnt=loopcnt+1
>       # sleep 1
>      # date
>     done
>   done
> done
> done
> done
> done
> date
> #
> 
> 
> > ./runloop1[25]: can't create pipe - try again
> 
> 
> 
> login: root
> sh: /etc/profile[21]: can't create pipe - try again
> sh: /root/.profile[5]: can't create pipe - try again
> # ls
> 

Is pipe running ?

/root# which pipe
/sbin/pipe

/root# pidin -ppipe
     pid tid name               prio STATE       Blocked
486264928   1 sbin/pipe           10r SIGWAITINFO
486264928   2 sbin/pipe           10r RECEIVE     1
486264928   3 sbin/pipe           10r RECEIVE     1
486264928   4 sbin/pipe           10r RECEIVE     1
486264928   5 sbin/pipe           10r RECEIVE     1

Hope this helps.
Jeevan
AW: can't create pipe - try again from telnet shell  
Hi Augie,

...how are you starting that script? 
Can you post the command line?
Do you do any redirection?
Does the script run a while, or fail immediately?

Maybe you're running out of either fds or memory - the docs for pipe() 
(which is the function failing here) list the following error causes:
   EMFILE - The calling process doesn't have at least 2 unused file 
            descriptors available. 
   ENFILE - The number of simultaneously open files in the system would 
            exceed the configured limit. 
   ENOSPC - There's insufficient space available to allocate the pipe 
            buffer. 
   ENOSYS - There's no pipe manager running. 
   EROFS  - The pipe pathname space is a read-only filesystem. 

I attached a version of ksh that should, together with "can't create
pipe",
display the error string.

In case of EMFILE, ENFILE, or ENOSPC, you could e.g. monitor the
resource 
usage in your system with 
  pidin info  (for overall memory usage)
  pidin fd    (for fds usage)

Hope this helps...

- Thomas Haupt

> -----Ursprungliche Nachricht-----
> Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> Gesendet: 06 June 2008 20:49
> An: osmeta-core_os
> Betreff: can't create pipe - try again from telnet shell
> 
> 
> Big loop shell script runs a long time and then crashes with 
> error message:
> ./runloop[25]: can't create pipe - try again
> 
> After this error the shell seems to have lost its enviroment 
> or has gotten
> into some wacko state.  The only way I know to clear this problem
> is to reboot, even if I log out and open a new shell the system
> does not recover.  I see this happening every few days but have not 
> precisely correlated it with the things that I am doing.
> 
> All suggestions welcome,
> Augie Mattheiss
> http://civspace.jhuapl.edu/
> 
> # cat runloop1
> #!/bin/sh
> date
> loopcnt=0
> looplist="1 2 3 4 5 6 7 8 9 10"
> #looplist="1 2"
> for index6 in $looplist ; do
> for index5 in $looplist ; do
> for index4 in $looplist ; do
> for index3 in $looplist ; do
>   for index2 in $looplist ; do
>     for index1 in $looplist ; do
>       pciwrite 0x11aa 0x1770 0 2 0 $loopcnt
>       PCIREADANS=$(pciread 0x11aa 0x1770 0 2 0)
>      # echo $loopcnt $PCIREADANS
>       printf "%d should == %X\n" "$loopcnt" "$PCIREADANS"
>       let loopcnt=loopcnt+1
>       # sleep 1
>      # date
>     done
>   done
> done
> done
> done
> done
> date
> #
> 
> 
> > ./runloop1[25]: can't create pipe - try again
> 
> 
> 
> login: root
> sh: /etc/profile[21]: can't create pipe - try again
> sh: /root/.profile[5]: can't create pipe - try again
> # ls
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> OSMeta
> http://community.qnx.com/sf/go/post8849
> 
> 
Attachment: Compressed file ksh.tgz 173.23 KB
AW: can't create pipe - try again from telnet shell  
Hi Augie,

...how are you starting that script? 
Can you post the command line?
Do you do any redirection?
Does the script run a while, or fail immediately?

Maybe you're running out of either fds or memory - the docs for pipe() 
(which is the function failing here) list the following error causes:
   EMFILE - The calling process doesn't have at least 2 unused file 
            descriptors available. 
   ENFILE - The number of simultaneously open files in the system would 
            exceed the configured limit. 
   ENOSPC - There's insufficient space available to allocate the pipe 
            buffer. 
   ENOSYS - There's no pipe manager running. 
   EROFS  - The pipe pathname space is a read-only filesystem. 

I attached a version of ksh that should, together with "can't create
pipe",
display the error string.

In case of EMFILE, ENFILE, or ENOSPC, you could e.g. monitor the
resource 
usage in your system with 
  pidin info  (for overall memory usage)
  pidin fd    (for fds usage)

Hope this helps...

- Thomas Haupt

> -----Ursprungliche Nachricht-----
> Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> Gesendet: 06 June 2008 20:49
> An: osmeta-core_os
> Betreff: can't create pipe - try again from telnet shell
> 
> 
> Big loop shell script runs a long time and then crashes with 
> error message:
> ./runloop[25]: can't create pipe - try again
> 
> After this error the shell seems to have lost its enviroment 
> or has gotten
> into some wacko state.  The only way I know to clear this problem
> is to reboot, even if I log out and open a new shell the system
> does not recover.  I see this happening every few days but have not 
> precisely correlated it with the things that I am doing.
> 
> All suggestions welcome,
> Augie Mattheiss
> http://civspace.jhuapl.edu/
> 
> # cat runloop1
> #!/bin/sh
> date
> loopcnt=0
> looplist="1 2 3 4 5 6 7 8 9 10"
> #looplist="1 2"
> for index6 in $looplist ; do
> for index5 in $looplist ; do
> for index4 in $looplist ; do
> for index3 in $looplist ; do
>   for index2 in $looplist ; do
>     for index1 in $looplist ; do
>       pciwrite 0x11aa 0x1770 0 2 0 $loopcnt
>       PCIREADANS=$(pciread 0x11aa 0x1770 0 2 0)
>      # echo $loopcnt $PCIREADANS
>       printf "%d should == %X\n" "$loopcnt" "$PCIREADANS"
>       let loopcnt=loopcnt+1
>       # sleep 1
>      # date
>     done
>   done
> done
> done
> done
> done
> date
> #
> 
> 
> > ./runloop1[25]: can't create pipe - try again
> 
> 
> 
> login: root
> sh: /etc/profile[21]: can't create pipe - try again
> sh: /root/.profile[5]: can't create pipe - try again
> # ls
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> OSMeta
> http://community.qnx.com/sf/go/post8849
> 
> 
Attachment: Compressed file ksh.tgz 173.23 KB
RE: can't create pipe - try again from telnet shell  
Thomas

Unfortuately I have had the problem after updating the shell
application.  But I do now know that the pipe process is stopping.
Do I have any options for trying to determine why the pipe
process stops?  I can easily restart it and things start working
again so this is no longer a significant issue but, obviously
long term, I'd like to figure out what is happening.

Thanks for your help,
Augie

>>>...how are you starting that script? 
looptest01
>>>Can you post the command line?

>>>Do you do any redirection?
generally no, but sometimes I do use indirection

>>>Does the script run a while, or fail immediately?
Most of the time the script runs normally all the way
through completion (it takes minutes and does lots
of terminal (stdout) I/O), I have not
correlated what I am doing with this unable to create
pipe issue.



 

-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com] 
Sent: Monday, June 16, 2008 2:17 AM
To: osmeta-core_os
Subject: AW: can't create pipe - try again from telnet shell

Hi Augie,

...how are you starting that script? 
Can you post the command line?
Do you do any redirection?
Does the script run a while, or fail immediately?

Maybe you're running out of either fds or memory - the docs for pipe()
(which is the function failing here) list the following error causes:
   EMFILE - The calling process doesn't have at least 2 unused file 
            descriptors available. 
   ENFILE - The number of simultaneously open files in the system would 
            exceed the configured limit. 
   ENOSPC - There's insufficient space available to allocate the pipe 
            buffer. 
   ENOSYS - There's no pipe manager running. 
   EROFS  - The pipe pathname space is a read-only filesystem. 

I attached a version of ksh that should, together with "can't create
pipe", display the error string.

In case of EMFILE, ENFILE, or ENOSPC, you could e.g. monitor the
resource usage in your system with
  pidin info  (for overall memory usage)
  pidin fd    (for fds usage)

Hope this helps...

- Thomas Haupt

> -----Ursprungliche Nachricht-----
> Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> Gesendet: 06 June 2008 20:49
> An: osmeta-core_os
> Betreff: can't create pipe - try again from telnet shell
> 
> 
> Big loop shell script runs a long time and then crashes with error 
> message:
> ./runloop[25]: can't create pipe - try again
> 
> After this error the shell seems to have lost its enviroment or has 
> gotten into some wacko state.  The only way I know to clear this 
> problem is to reboot, even if I log out and open a new shell the 
> system does not recover.  I see this happening every few days but have

> not precisely correlated it with the things that I am doing.
> 
> All suggestions welcome,
> Augie Mattheiss
> http://civspace.jhuapl.edu/
> 
> # cat runloop1
> #!/bin/sh
> date
> loopcnt=0
> looplist="1 2 3 4 5 6 7 8 9 10"
> #looplist="1 2"
> for index6 in $looplist ; do
> for index5 in $looplist ; do
> for index4 in $looplist ; do
> for index3 in $looplist ; do
>   for index2 in $looplist ; do
>     for index1 in $looplist ; do
>       pciwrite 0x11aa 0x1770 0 2 0 $loopcnt
>       PCIREADANS=$(pciread 0x11aa 0x1770 0 2 0)
>      # echo $loopcnt $PCIREADANS
>       printf "%d should == %X\n" "$loopcnt" "$PCIREADANS"
>       let loopcnt=loopcnt+1
>       # sleep 1
>      # date
>     done
>   done
> done
> done
> done
> done
> date
> #
> 
> 
> > ./runloop1[25]: can't create pipe - try again
> 
> 
> 
> login: root
> sh: /etc/profile[21]: can't create pipe - try again
> sh: /root/.profile[5]: can't create pipe - try again # ls
> 
> 
> 
> 
> 
>...
AW: can't create pipe - try again from telnet shell  
Hi Augie,

You wrote:
> Unfortuately I have had the problem after updating the shell
> application.

No surprise at all - the only change I made was to print out 
a more informative error message when pipe creation failed, 
so I didn't expect it to actually perform any better...  8-)

> But I do now know that the pipe process is stopping.

That's good. Does 'stopping' mean, 'go into STOPPED state', 
'terminate' or 'crash'?

> Do I have any options for trying to determine why the pipe
> process stops? 

...hm... if "pipe" actually crashes and you have "dumper" running,
we might be able to make something out of the core file. I'll build 
a debug-"pipe" and post here, so it's easier to analyze...

What target platform was that again?

> I can easily restart it and things start working
> again so this is no longer a significant issue but, obviously
> long term, I'd like to figure out what is happening.

Good to know.

Cheers,
- Thomas 
 
> Thanks for your help,
> Augie
> 
> >>>...how are you starting that script? 
> looptest01
> >>>Can you post the command line?
> 
> >>>Do you do any redirection?
> generally no, but sometimes I do use indirection
> 
> >>>Does the script run a while, or fail immediately?
> Most of the time the script runs normally all the way
> through completion (it takes minutes and does lots
> of terminal (stdout) I/O), I have not
> correlated what I am doing with this unable to create
> pipe issue.
> 
> 
> 
>  
> 
> -----Original Message-----
> From: Thomas Haupt [mailto:thaupt@qnx.com] 
> Sent: Monday, June 16, 2008 2:17 AM
> To: osmeta-core_os
> Subject: AW: can't create pipe - try again from telnet shell
> 
> Hi Augie,
> 
> ...how are you starting that script? 
> Can you post the command line?
> Do you do any redirection?
> Does the script run a while, or fail immediately?
> 
> Maybe you're running out of either fds or memory - the docs for pipe()
> (which is the function failing here) list the following error causes:
>    EMFILE - The calling process doesn't have at least 2 unused file 
>             descriptors available. 
>    ENFILE - The number of simultaneously open files in the 
> system would 
>             exceed the configured limit. 
>    ENOSPC - There's insufficient space available to allocate the pipe 
>             buffer. 
>    ENOSYS - There's no pipe manager running. 
>    EROFS  - The pipe pathname space is a read-only filesystem. 
> 
> I attached a version of ksh that should, together with "can't create
> pipe", display the error string.
> 
> In case of EMFILE, ENFILE, or ENOSPC, you could e.g. monitor the
> resource usage in your system with
>   pidin info  (for overall memory usage)
>   pidin fd    (for fds usage)
> 
> Hope this helps...
> 
> - Thomas Haupt
> 
> > -----Ursprungliche Nachricht-----
> > Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> > Gesendet: 06 June 2008 20:49
> > An: osmeta-core_os
> > Betreff: can't create pipe - try again from telnet shell
> > 
> > 
> > Big loop shell script runs a long time and then crashes with error 
> > message:
> > ./runloop[25]: can't create pipe - try again
> > 
> > After this error the shell seems to have lost its enviroment or has 
> > gotten into some wacko state.  The only way I know to clear this 
> > problem is to reboot, even if I log out and open a new shell the 
> > system does not recover.  I see this happening every few 
> days but have
> 
> > not precisely correlated it with the things that I am doing.
> > 
> > All suggestions welcome,
> > Augie Mattheiss
>...
View Full Message
AW: can't create pipe - try again from telnet shell  
Hi Augie,

...sorry for the delay. Attached is a debug version of 'pipe',
'pipe_g'. Could you run that instead of the regular pipe manager, 
make sure 'dumper' is running, then provoke your 'can't create pipe'
error, see if a 'pipe_g.core' file was produced, and if so, send 
that to me ?

Thanks,
- Thomas

> -----Ursprungliche Nachricht-----
> Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> Gesendet: 16 June 2008 16:39
> An: osmeta-core_os
> Betreff: RE: can't create pipe - try again from telnet shell
> 
> 
> Thomas
> 
> Unfortuately I have had the problem after updating the shell
> application.  But I do now know that the pipe process is stopping.
> Do I have any options for trying to determine why the pipe
> process stops?  I can easily restart it and things start working
> again so this is no longer a significant issue but, obviously
> long term, I'd like to figure out what is happening.
> 
> Thanks for your help,
> Augie
> 
> >>>...how are you starting that script? 
> looptest01
> >>>Can you post the command line?
> 
> >>>Do you do any redirection?
> generally no, but sometimes I do use indirection
> 
> >>>Does the script run a while, or fail immediately?
> Most of the time the script runs normally all the way
> through completion (it takes minutes and does lots
> of terminal (stdout) I/O), I have not
> correlated what I am doing with this unable to create
> pipe issue.
> 
> 
> 
>  
> 
> -----Original Message-----
> From: Thomas Haupt [mailto:thaupt@qnx.com] 
> Sent: Monday, June 16, 2008 2:17 AM
> To: osmeta-core_os
> Subject: AW: can't create pipe - try again from telnet shell
> 
> Hi Augie,
> 
> ...how are you starting that script? 
> Can you post the command line?
> Do you do any redirection?
> Does the script run a while, or fail immediately?
> 
> Maybe you're running out of either fds or memory - the docs for pipe()
> (which is the function failing here) list the following error causes:
>    EMFILE - The calling process doesn't have at least 2 unused file 
>             descriptors available. 
>    ENFILE - The number of simultaneously open files in the 
> system would 
>             exceed the configured limit. 
>    ENOSPC - There's insufficient space available to allocate the pipe 
>             buffer. 
>    ENOSYS - There's no pipe manager running. 
>    EROFS  - The pipe pathname space is a read-only filesystem. 
> 
> I attached a version of ksh that should, together with "can't create
> pipe", display the error string.
> 
> In case of EMFILE, ENFILE, or ENOSPC, you could e.g. monitor the
> resource usage in your system with
>   pidin info  (for overall memory usage)
>   pidin fd    (for fds usage)
> 
> Hope this helps...
> 
> - Thomas Haupt
> 
> > -----Ursprungliche Nachricht-----
> > Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> > Gesendet: 06 June 2008 20:49
> > An: osmeta-core_os
> > Betreff: can't create pipe - try again from telnet shell
> > 
> > 
> > Big loop shell script runs a long time and then crashes with error 
> > message:
> > ./runloop[25]: can't create pipe - try again
> > 
> > After this error the shell seems to have lost its enviroment or has 
> > gotten into some wacko state.  The only way I know to clear this 
> > problem is to reboot, even if I log out and open a new shell the 
> > system does not recover.  I see this happening every few 
> days but have
> 
> > not precisely correlated it with the things that I am doing.
> > 
> > All suggestions welcome,
> > Augie Mattheiss
> >...
View Full Message
Attachment: Compressed file pipe_g.tgz 30.13 KB
RE: can't create pipe - try again from telnet shell  
Thomas

I will do what you ask, it may take some time for the problem
(assuming it isn't corrected with this change, of course...)
to pop back up.  The "can't create pipe" problem actually hasn't
happened in the past few days.  We also may not rely heavily on
scripting if an approach to use L3's InControl ground control
system to "drive" a Neutrino/hardware front-end works out.

Thanks for your help,
Augie

 

-----Original Message-----
From: Thomas Haupt [mailto:thaupt@qnx.com] 
Sent: Thursday, June 19, 2008 6:18 AM
To: osmeta-core_os
Subject: AW: can't create pipe - try again from telnet shell

Hi Augie,

...sorry for the delay. Attached is a debug version of 'pipe', 'pipe_g'.
Could you run that instead of the regular pipe manager, make sure
'dumper' is running, then provoke your 'can't create pipe'
error, see if a 'pipe_g.core' file was produced, and if so, send that to
me ?

Thanks,
- Thomas

> -----Ursprungliche Nachricht-----
> Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> Gesendet: 16 June 2008 16:39
> An: osmeta-core_os
> Betreff: RE: can't create pipe - try again from telnet shell
> 
> 
> Thomas
> 
> Unfortuately I have had the problem after updating the shell 
> application.  But I do now know that the pipe process is stopping.
> Do I have any options for trying to determine why the pipe process 
> stops?  I can easily restart it and things start working again so this

> is no longer a significant issue but, obviously long term, I'd like to

> figure out what is happening.
> 
> Thanks for your help,
> Augie
> 
> >>>...how are you starting that script? 
> looptest01
> >>>Can you post the command line?
> 
> >>>Do you do any redirection?
> generally no, but sometimes I do use indirection
> 
> >>>Does the script run a while, or fail immediately?
> Most of the time the script runs normally all the way through 
> completion (it takes minutes and does lots of terminal (stdout) I/O), 
> I have not correlated what I am doing with this unable to create pipe 
> issue.
> 
> 
> 
>  
> 
> -----Original Message-----
> From: Thomas Haupt [mailto:thaupt@qnx.com]
> Sent: Monday, June 16, 2008 2:17 AM
> To: osmeta-core_os
> Subject: AW: can't create pipe - try again from telnet shell
> 
> Hi Augie,
> 
> ...how are you starting that script? 
> Can you post the command line?
> Do you do any redirection?
> Does the script run a while, or fail immediately?
> 
> Maybe you're running out of either fds or memory - the docs for pipe()

> (which is the function failing here) list the following error causes:
>    EMFILE - The calling process doesn't have at least 2 unused file 
>             descriptors available. 
>    ENFILE - The number of simultaneously open files in the system 
> would
>             exceed the configured limit. 
>    ENOSPC - There's insufficient space available to allocate the pipe 
>             buffer. 
>    ENOSYS - There's no pipe manager running. 
>    EROFS  - The pipe pathname space is a read-only filesystem. 
> 
> I attached a version of ksh that should, together with "can't create 
> pipe", display the error string.
> 
> In case of EMFILE, ENFILE, or ENOSPC, you could e.g. monitor the 
> resource usage in your system with
>   pidin info  (for overall memory usage)
>   pidin fd    (for fds usage)
> 
> Hope this helps...
> 
> - Thomas Haupt
> 
> > -----Ursprungliche Nachricht-----
> > Von: Augie Mattheiss [mailto:augie.mattheiss@jhuapl.edu]
> > Gesendet: 06 June 2008 20:49
> > An: osmeta-core_os
> > Betreff: can't create pipe - try again from telnet shell
> > 
> > 
> > Big loop shell script...
View Full Message