Why Are My Unix Pipes Broken?

Things all over my system have been hanging lately. After some work trying to isolate the problem it seems that after piping some amout of characters the pipe hangs. Initially the magic number of characters was 127 but now it seems to be around 150.
I created a file, test.txt, consisting of the 'a' character 127 time plus a newline. In terminal I run `cat test.txt` and it works as expected but if I run `cat test.txt | cat` it hangs and I have to Ctrl-C to stop it. If I delete the newline it works correctly but if I replace it with another 'a' it hangs as before.
I've tried it on other compters and they all work fine so it must be something specific to my machine. I'm just out of ideas of things to try and am looking for help.
Thanks,
David

I do not know how Mac OS X handles pipes.
I know that Tru64 UNIX used local network sockets.  That means it acquired kernel buffers from the networking packet pool.
Again, I do not know what Mac OS X uses as the underlying layer in the kernel.
But I think it is a similar resource restriction in the kernel that is affecting your pipes.  I'm guessing maybe GitX was doing something that needed the same kernel buffer resource, and as a result your pipes are starved for buffers.
I know that is a wishy-washy explanation.

Similar Messages

  • Why are my iTunes sections broken?

    As you can see in the picture, the sections are mislabeld and there are random strings rather that actual names. For instance, Music is listed as TV Shows in the left sidebar. Does anyone now the issue? The window ui buttons are also missing, and any popup windows have the wrong titles. I'm running the latest version of iTunes on Snow Leopard 10.6.8. There were no notable console logs on itunes startup.

    I do not know how Mac OS X handles pipes.
    I know that Tru64 UNIX used local network sockets.  That means it acquired kernel buffers from the networking packet pool.
    Again, I do not know what Mac OS X uses as the underlying layer in the kernel.
    But I think it is a similar resource restriction in the kernel that is affecting your pipes.  I'm guessing maybe GitX was doing something that needed the same kernel buffer resource, and as a result your pipes are starved for buffers.
    I know that is a wishy-washy explanation.

  • Why are animated GIFs still broken?

    https://discussions.apple.com/thread/1229922 <-- this
    'nuff said, this has been a problem ever since Preview lost its ability to animate GIFs. It may be a WebKit problem (i.e. yeah, Apple, just go ahead and let yourself off the hook...right), but regardless, how come it has not been addressed sooner? Safari chokes after about 4 frames of animation; if the GIF loops, it starts over fresh, but it chokes again.
    I am using 10.5.8, but I am aware this is still a problem for all 10.6 OSes and iOSes. I don't know about Safari for Windows; not relevant at the moment.
    Why is this still a problem after three-and-a-half years of Safari development have passed?

    Well, here are the issues I have run into.
    1) Gifs load half way and then animate on the base but not on the top.
    2) Gifs animate waaaaaaay too fast.
    I have found no solution for the 1st issue, and it does not always occur.
    As for the second one it has to do with browsers all reading the "0 delay" setting of the animation at uniquee speeds. Most round it to 10/100th of a sec, while Safari loads it at 3/100th resulting in a faster images, but a non-standard speed. Which ***** since I am running animations that follow using a set time out only to have safari throw everything off. I think one other browser runs at something like 6/100ths so Safari is not the only one. Faster could be nice if they all got on the same page, but as they are it is pointless. Pretty much meaning if you want an animated gif you have to avoid the "0 delay setting at all costs, and pretty much anything under 1/10th because it will not display the same in many browsers. It could be this fast speed in Safari that is causing the loading and instability issues with sime.

  • Why are my text boxes broken up in Illustrator CS6?

    I have an iMac at work with Mountain Lion and Ilustrator CS6, I have files that I have created with Illustrator from scratch but when I bring them home and open them on my iMac at home with the same system the text boxes are broken into individual text boxes for each line of text. What is going on. Also everything in the document is a Clipping Path inside the document bound box.

    Danher,
    Are you sure it is the same AI version?

  • Why are most of the links on Oracle's site that relate to Java broken?

    Why are most of the links on Oracle's site that relate to Java broken? For example, try searching for SocketChannel and then clicking on any of the returned links, in particular click on www.oracle.com/technetwork/servers-storage/ts-4222-159193.pdf.
    This is the second time I have tried to search for Java information and both times found broken links.
    Does anyone know where I can find more information on using a SocketChannel?

    Kayaman wrote:
    user8252446 wrote:
    Why are most of the links on Oracle's site that relate to Java broken?Because Oracle doesn't really care about Java and is hoping that it'll die off.Pretty sure Oracle cares about Java. They have a huge investment in it and would need to replace or discontinue a number of products that they paid quite a bit of money for.
    On the other hand in might just be that they don't much about providing support that doesn't lead to revenue. Thus support contracts have a support channel while public links get little support.

  • Why are some titles in my playlists grayed out with a broken-circle icon to the left in iTunes ?

    Why are some titles in my playlists grayed out with a broken-circle icon to the left in iTunes 12.1.0.50?

    Did you ever get a response on this?
    Thanks!

  • Why are getColumnClass/getColumnName in TableModel, not TableColumnModel?

    Shouldn't the TableColumnModel be responsible for keeping information about the table columns? Things such as column classes and names? Why are these things retrieved through TableModel only? This doesn't seem to follow OO concepts, what am I missing?
    Along those same lines, why are methods such as getColumnCount() in both TableModel and TableColumnModel? Again, this seems appropriate to TableColumnModel, but not TableModel, except maybe as a convenience. Am I misunderstanding the roles of these models?

    The TableModel holds the data for each line and for the headers. So it is naturally the place to ask for informations like "how much rows do I have" or "how much columns do I have" or "what is the name of column x".
    The ColumnModel is responsible for specifications on a column, so it naturally should be able to tell all that the TableModel can tell about it, too.
    I don't see a problem in being able to ask both. I would be annoyed if I would not be able to do so and I can see no OO principle broken.
    Rommie.

  • Using utl_file and unix pipes

    Hi,
    I'm trying to use utl_file and unix pipes to communicate with a unix process.
    Basically I want the unix process to read off one pipe and give me back the result on a different pipe.
    In the example below the unix process is a dummy one just copying the input to the output.
    I cant get this to work for a single plsql block writing and reading to/from the pipes - it hangs on the first read of the return pipe.
    Any ideas?
    ======== TEST CASE 1 ===============
    create directory tmp as '/tmp';
    on unix:
    cd /tmp
    mknod outpip p
    mknod inpip p
    cat < inpip > outpip
    drop table res;
    create table res (m varchar2(200));
    declare
    l_filehandle_rec UTL_FILE.file_type;
    l_filehandle_send UTL_FILE.file_type;
    l_char VARCHAR2(200);
    begin
    insert into res values ('starting');commit;
    l_filehandle_send := UTL_FILE.fopen ('TMP', 'inpip', 'A', 32000);
    insert into res values ('opened inpip ');commit;
    l_filehandle_rec := UTL_FILE.fopen ('TMP', 'outpip', 'R', 32000);
    insert into res values ('opened outpip ');commit;
    FOR i in 1..10 LOOP
    utl_file.put_line(l_filehandle_send,'line '||i);
    insert into res values ('written line '||i); commit;
    utl_file.get_line(l_filehandle_rec,l_char);
    insert into res values ('Read '||l_char);commit;
    END LOOP;
    utl_file.fclose(l_filehandle_send);
    utl_file.fclose(l_filehandle_rec);
    END;
    in a different sql session:
    select * from res:
    starting
    opened inpip
    opened outpip
    written line 1
    ============ TEST CASE 2 =================
    However If I use 2 different sql session (not what I want to do...), it works fine:
    1. unix start cat < inpip > outpip
    2. SQL session 1:
    set serveroutput on size 100000
    declare
    l_filehandle UTL_FILE.file_type;
    l_char VARCHAR2(200);
    begin
    l_filehandle := UTL_FILE.fopen ('TMP', 'outpip', 'R', 32000);
    FOR i in 1..10 LOOP
    utl_file.get_line(l_filehandle,l_char);
    dbms_output.put_line('Read '||l_char);
    END LOOP;
    utl_file.fclose(l_filehandle);
    END;
    3. SQL session 2:
    set serveroutput on size 100000
    declare
    l_filehandle UTL_FILE.file_type;
    begin
    l_filehandle := UTL_FILE.fopen ('TMP', 'inpip', 'A', 32000);
    FOR i in 1..10 LOOP
    utl_file.put_line(l_filehandle,'line '||i);
    --utl_lock.sleep(1);
    dbms_output.put_line('written line '||i);
    END LOOP;
    utl_file.fclose(l_filehandle);
    END;
    /

    > it hangs on the first read of the return pipe.
    Correct.
    A pipe is serialised I/O device. One process writes to the pipe. The write is blocked until a read (from another process or thread) is made on that pipe. Only when there is a reader for that data, the writer is unblocked and the actual write I/O occurs.
    The reverse is also true. A read on the pipe is blocked until another process/thread writes data into the pipe.
    Why? A pipe is a memory structure - not a file system file. If the write was not blocked the writer process can writes GBs of data into the pipe before a reader process starts to read that data. This will drastically knock memory consumption and performance.
    Thus the purpose of a pipe is to serve as a serialised blocking mechanism between a reader and a writer - allowing one to write data that is read by the other. With minimal memory overheads as the read must be serviced by a write and a write serviced by a read.
    If you're looking for something different, then you can open a standard file in share mode and write and read from it using two different file handles within the same process. However, the file will obviously have a file system footprint ito space (growing until the writer stops and the reader terminates and trashes the file) .
    OTOH a pipe's footprint is minimal.

  • Photosmart C4599 w. iMac OS 10.6.8 won't print. Error message "pipe broken" gone; still wont print

    Printer would not print. The error message: "Pipe broken. printer cartridges can't move, Open door and release cartridges."  However, when I opened the door they moved to the left and out of sight; I didn't see a broken pipe. When I closed the door, they moved back to the right.  Did this several times, installed a new black cartridge because mine was low, got a message to align printer, which I did.  Printer printed the alignment sheet, which I then scanned in and learned alignment was OK.  Printer still did not print although error message had disappeared. Then I followed all of the steps in HP's troubleshooting support (all of which I'd done on my own before) Got a message Printer Ready, but printer still doesn't print.  I tried some other files too, in case that one was corrupted in some way.
    I just tried again - with a new file.No success.  New error message: Unable to connect with printer; will try in 30 seconds.  All lights on the printer are fine, including the wireless light.
    Can someone help?  Many thanks.

    Printer would not print. The error message: "Pipe broken. printer cartridges can't move, Open door and release cartridges."  However, when I opened the door they moved to the left and out of sight; I didn't see a broken pipe. When I closed the door, they moved back to the right.  Did this several times, installed a new black cartridge because mine was low, got a message to align printer, which I did.  Printer printed the alignment sheet, which I then scanned in and learned alignment was OK.  Printer still did not print although error message had disappeared. Then I followed all of the steps in HP's troubleshooting support (all of which I'd done on my own before) Got a message Printer Ready, but printer still doesn't print.  I tried some other files too, in case that one was corrupted in some way.
    I just tried again - with a new file.No success.  New error message: Unable to connect with printer; will try in 30 seconds.  All lights on the printer are fine, including the wireless light.
    Can someone help?  Many thanks.

  • Why are my apps not downloading?

    Why are my apps not downloading? They just sit there waiting and I keep getting an error saying that my purchases cannot be downloaded at this time and to try again later. I have tried logging out and in, and rebooting but neither has worked

    Same problem here.  Not able to update any apps or to download new purchased music.  Doesn't work on iPad, iPhone, or iTunes.  Tried with 3G download rather than wifi on the phone and iPad.  It still hasn't worked.  I changed me credit card, but without success.
    The store is currently broken for some users, maybe all.

  • VIs for using UNIX pipes?

    We're going to start working on an application that will eventually run on
    a UNIX machine, but in the meantime we'll develop on NT, which is what we're
    familiar with. One requirement is to communicate with another process through
    a UNIX pipe. Are there VIs built into the UNIX versions of LabVIEW for this?
    Or do we just use file I/O VIs? Or is there some other way to accomplish
    this?
    If there are VIs built in, where is the documentation? I checked the LabVIEW
    manuals, but I didn't find anything.
    Russell Davoli

    Russell Davoli wrote:
    > We're going to start working on an application that will eventually run on
    > a UNIX machine, but in the meantime we'll develop on NT, which is what we're
    > familiar with. One requirement is to communicate with another process through
    > a UNIX pipe. Are there VIs built into the UNIX versions of LabVIEW for this?
    > Or do we just use file I/O VIs? Or is there some other way to accomplish
    > this?
    >
    > If there are VIs built in, where is the documentation? I checked the LabVIEW
    > manuals, but I didn't find anything.
    >
    > Russell Davoli
    Yes there are VIs for named pipes in UNIX, Open, Close, Read, and Write
    They are under the communication palette. Check the online manual in the comm
    section.
    Kevin (my email is down)

  • Why is my Macbook Pro 2.33 so hot and why are my fans on so high?

    So, I'm sitting here with just Safari 3.1.1 open with just this single page, nothing else running on my machine, 3GB of RAM, and activity monitor reports a total 3.5% CPU usage. Why is my Macbook Pro hot like it's really working (not something-is-broken hot, just the temperature I'd expect with Photoshop, Illustrator and Flash all open at the same time) and why are the fans running like a jet engine?
    No weird errors in the console, Spotlight isn't indexing, nothing special in the Dashboard, lots of spare space on the HD, permissions repaired, disks have been checked, I turned off icon previewing on the desktop, top doesn't report anything more than Activity Monitor does -- it really seems like my machine is genuinely wheezing at 3.5%. I was just asked if I wouldn't mind working in another room because my machine is so noisy. You heard me right, my Macbook Pro is getting me kicked out of places.
    I've put up with the clump of dead pixels, airport connection issues, now-useless DVD burner that an Apple update bricked, and early battery death, but this one is just boggling. If anyone has any advice I'd be grateful.

    Welcome to Apple Discussions!
    Do you have iStatPro? You can download it from the Apple site and see what it is that is running so hot. Under the low usage you describe, the fans should be idling silently. And you might be able to tell what is getting so hot.
    If Activity Monitor doesn't show anything, then you might want to run the extended version of the Apple Hardware Test. It sounds like something is getting very hot. If there is a hardware problem, then you should get one or more error codes. The Apple Hardware Test is on Install Disc #1 of the gray discs that came with your Mac--you boot to it by holding down "D". Instructions are on the disc and on the screen.
    Also, be sure you have "All Processes" selected on the Activity Monitor. And the boxes at the bottom should be mostly black with very little red or green at 3.5% CPU usage. Given all the symptoms, I am surprised that there is not some process running amok in the background.
    Good luck!

  • Menu dropdowns dissappear. I loved FFV3 why are there so many changes to Firefox and no update works properly? Can you stick to a version and improve on that one? It seems everything is getting screwed up.

    I think I covered it. I want a stable browser. I work on computers for a living and Firefox has been the proven browser for a very long time and FFV3 was the best browser on the planet. Why fix something that isn't broken. I don't know what other browser will fulfill my needs like firefox did. Why are you guys screwing around with the best browser on the planet? Get it together guys.

    You could take a look at this iTunes Version History on Wikipedia if you want a feel for what goes on in each update and how frequent they are. The last few major updates have been two years apart. Most of the point updates have little impact on the way the user interacts with the software. You don't have to upgrade with each update unless you have bought or upgraded a device that now requires a newer minimum version to work with. E.g. iOS 8 requires iTunes 11.4 or later.
    There are some major layout changes in iTunes 12, but by and large any task that you could do in 11 can be done in 12. For example the new Get Info dialog lacks right-click context menus (at least for now) but it still accepts most standard keyboard shortcuts and drag & drop actions. If you're used to doing everything via a context menu it is going to be confusing to start with. A workaround is to hold down shift as you right-click > get info on a track selection to get the old style dialog.
    Regarding the inability to delete playlists from the device I suspect you were working in the wrong context, i.e. looking at the playlists on the device in say the Music > Playlists sidebar for a device that is synced to the library. You should select the device first from the row of source icons, then Settings > Music from the sidebar, then deselect the playlist in question from the list of playlists scheduled to sync to the device, and sync.
    tt2

  • In Pages 5, why are page thumbnails different sizes?

    So I'm using 5. And I must say I think it's brilliantly done after a long period of ******** about it. I guess I'm not asking of it anything it doesn't provide and what it does it does very well - though I'm puzzled by the behavior of selecting text via the keyboard.
    Anyhow, that's not my question. I'm working with a long text document. I notice that as I work the page thumbnails become different sizes. It's subtle but it's clearly intentional. I reckon it's trying to tell me something but I don't know what. Haven't been able to find any info in the manual and was wondering if any of you clever people here might know. Thanks.

    This is what I meant about how rude you are though.  Your answer DOESN'T EXPLAIN ANY OF THE BEHAVIOUR myself or the other person were reporting.  The only assumption that I can make is that you posted here for the sole purpose of implying that we are both mistaken or stupid. 
    How is this helpful at all? 
    How do you have 32,485 points when you are obviously more concerned with insulting people than helping them out?  It puts the lie to the whole idea of "Apple Support Communities." 
    Also, I specifically informed you that your comments were insulting and unhelpful and politely requested you not post on this thread anymore or at least until you had some kind of actual information, yet here you are.  Posting again, with no content other than the implied insult.
    I'm not stupid.  I know what a section break is, I know what a page break is.  I'm a writer who has used innumerable word processing programs over the years and have been an IT worker for 10 years now. 
    I have a Pages document.  It has no (or only one depending on your point of view), section(s).  It has page breaks only.  The pagination is set to start at "1" on the first page and proceed normally to the end of the document (300 or so pages).  I am using Pages 5.5.2 on a brand new iMac.  I have NONE of the previous or older versions/types of Pages on my computer. 
    The pages thumbnails on the side, do actually CHANGE SIZE randomly as I am editing the document.   These differing sizes are NOT CORRELATED WITH THE BEGINNING OR ENDING OF SECTIONS.  These size changes are also NOT CORRELATED WITH THE PAGE BREAKS (in case you were about to argue the similarity of page breaks and section breaks).  As I work through the document and scroll up and down editing here or there, the size of the thumbnails RANDOMLY CHANGE SIZE.  Sometimes this is correlated with me working on a section, sometimes I can work on a section and no change happens at all.  The thumbnails that change size often change back again when I scroll back to them later on. 
    So please ... Try to act like a decent human being and either help out, or go away.  STOP POSTING THAT WE ARE WRONG, when you DON'T in fact know we are wrong.  STOP INSULTING ME by assuming I am stupid. 
    Why are you even here if you don't want to actually HELP anyone? 
    To anyone else reading this:  I am having a real bad time with this fellow who is just the most insulting person I have met for a while, however many of my posts about him are being deleted.  If anyone knows (including the mods of this forum) of the proper way to REPORT or get rid of a troll/abuser like him on Apple Support Communities or a place to report his behaviour, please let me know. 

  • Why are my current calls being interrupted by new calls?

    Why are my current calls being interrupted by new calls?
    I'm using iPhone 6 plus and reset my network settings multiple times. The issue is random.

    glic1 wrote:
    Why are my current calls being interrupted by new calls?
    I'm using iPhone 6 plus and reset my network settings multiple times. The issue is random.
    Are you saying when your on a phone call and someone else calls you it does what exactly?  Disconnect your current call with the new call?

Maybe you are looking for

  • Process variable string into filename at Save service

    Hello, Does anyone know how to put a string into the Pathname Pattern (Template) property of a Save service (FileUtilsService - Write Document) ? What I'm trying to do is strip the /'s out of a date string and put that date into a filename. For examp

  • Test the performance of JSP application

    is there any trusted tools to test the performance of jsp web applciation with JDBC code ? i need to test the performnce wth huge number of users , thanks

  • Photoshop Elements 13 for Mac

    I have an old version of Photoshop Elements (8) for Mac. I have installed this version 8 on a iMac and a Macbook. Can I install version 13 (the 1 license version) also on my iMac and Macbook and use it alternate?

  • What is a secure browser to use?

    Firefox and safari updated their software and it says mac osx 10.4.11 can't update.  Is there a secure browser to use for my macbook?

  • FCE crashes on iMovie import

    I have some iMovie HD 5 projects that I'd like to convert to FCE, but FCE crashes ("quits unexpectedly") when it tries to open most iMovie projects. I now have iMovie 6 - is that the problem? None of the projects contain iTMS music. I did manage to o