Understanding open syscall on FIFO with dtrace

Hi all,
I'm trying to understand open syscall behaviour with respect to FIFOs using dtrace. We have a very intermittent failure with FIFOs, when writer process fails in opening pipe, but reader succeeds. I tried debugging with dtrace and found some weirdness in the failing condition. I'd appreciate if you can throw some light.
Program desc:
READER opens in blocking mode (O_RDONLY = 0)
WRITER opens in non-blocking mode (O_WRONLY | O_NONBLOCK = 1 + 128 = 129)
During failure conditions open() returns -1 to writer (non-blocking call) but reader gets a valid file descriptor.
Please find below the filtered dtrace output (sorted by timestamp - I have stripped off some trivial information)
{color:#999999}timestamp walltimestamp pid tid exe probe func fifo flag/return-value errno
===========================================================
Failure:
1103747969678386 2009 Aug 12 06:22:56 20656 1182 reader open entry /data/fifo1 0 0
1103747970243629 2009 Aug 12 06:22:56 6702 14 writer open entry /data/fifo1 129 0
1103747970401069 2009 Aug 12 06:22:56 20656 1182 reader open return /data/fifo1 48 0
1103747970413489 2009 Aug 12 06:22:56 6702 14 writer open return /data/fifo1 -1 6{color}
{color:#999999}In a successful open, dtrace outs like below:
1103747860071143 2009 Aug 12 06:22:56 20656 1235 reader open entry /data/fifo2 0 0
1103747880222083 2009 Aug 12 06:22:56 6702 14 writer open entry /data/fifo2 129 0
1103747880376943 2009 Aug 12 06:22:56 6702 14 writer open return /data/fifo2 23 0
1103747880394596 2009 Aug 12 06:22:56 20656 1235 reader open return /data/fifo2 49 0{color}
I saw that errno=6 is the expected error returned by a non-blocking fifo open when there's no reader on pipe.
Our assumption is Synchronization by open(FIFO) by reader and writer should be taken care by the OS, which implies when writer gets a valid FD, the reader must also get a valid fd. On this assumption, our guess is there's an intermittent problem with open() implementation.
I'd appreciate if someone can confirm above, or if our assumption is wrong, or any points on further debugging.
Thanks,
KR
Other details:
*uname -a</s
<p>SunOS xxxx 5.10 Generic_125100-09 sun4v sparc SUNW,Sun-Fire-T200
D script:*
syscall::open:entry, syscall::creat:entry,
syscall::open64:entry, syscall::creat64:entry,
syscall::unlink:entry, syscall::rename:entry
printf("%u %Y %5d %5d %5d %5d %5d %-12s %-10s %-10s %25s %d %s %d %d\n",
timestamp,walltimestamp, pid, tid, execname, probefunc,probename, copyinstr(arg0), arg1, errno);
self->file=arg0;
syscall::open:return, syscall::creat:return,
syscall::open64:return, syscall::creat64:return,
syscall::unlink:return, syscall::rename:return
printf("%u %Y %5d %5d %5d %5d %5d %-12s %-10s %-10s %25s %d %s %d\n",
timestamp,walltimestamp, pid, tid, execname, probefunc,probename, stringof(copyinstr(self->file)),arg1,errno);
self->file = 0;

Hi all,
Any thoughts on this would help.
@ Moderator,
Please let me know if this should be moved another forum.
Thanks,
KR

Similar Messages

  • Pages 5.1 error "This document is too old. To open it, save it with Pages '09 first."

    When trying to open a Pages '08 file from a MacBook Pro in Pages 5.1 on an iMac, I get thr error message, "This document is too old. To open it, save it with Pages '09 first". I cannot locate a Pages '09 to use.  I can export the file from Pages '08 into a Microsoft Word Doc file and can open it then. How I do I solve the problem and open files in Pages 5.1?

    It is A solution that works if you don't have too many Page files to convert, but is very poor solution if trying to move everything off of the MacBook Pro to the iMac.  I don't necessarily need to open the 5 years of files, but if I need to look at something archived, I'm dead in the water.
    It doesn't make sense that a Mac can open a Microsoft product but cannot open a Mac product.  I can understand that a program is not forward compatibale, but almost all programs are backward compatible. This same problem appears with Numbers 3.1.
    Apple needs Microsoft as a solution?

  • Problems understanding open text for access, please help

    Hi all,
    I'm experiencing some problems with this script, and I think knowing what the error is will help me a lot to understand better how applescript handles access to files.
    When i launch this script it tells me somethihng like "document some object has not been opened" (could be slightly different in english).
    So, i guess is a problem with openening and closing, but as you can see i open and close the doc, so I shouldn't encounter this problem. Do I?
    Thanks for any tip!
    set Report to "myfile.txt"
    -- in case previously not closed I'll close again
    try
      close access Report
    end try
    set the_file to (open for access Report with write permission)
    write return to the_file starting at eof
    write "test" to the_file
    write return to the_file
    write return to the_file
    close access the_file
    repeat with numero from 1 to 3
      write numero to the_file starting at eof
      write return to the_file
      write return to the_file
      close access the_file
    end repeat

    Each time your application is run the files associated with it will also be released, so all you need to do is make sure that each open is balanced with a close.  This can be done easiest by using a handler that has been tested, so you don't have to worry about leaving something out elsewhere in your script.  For example:
    on run -- example
              set report to ((path to desktop) as text) & "myFile.txt"
      write_toFile_("testing one" & return, report)
      write_toFile_("testing two, three" & return, report)
      write_toFile_("testing again" & return, report)
    end run
    on write_toFile_(someThing, someFile)
      try
        set theOpenFile to (open for access someFile with write permission)
        write someThing to theOpenFile starting at eof
        close access theOpenFile
      on error -- make sure file is closed on any error
        try
          close access theOpenFile
        end try
      end try
    end write_toFile_

  • HT4484 I let my grandson open an apple account with my credit card.  He has been charging a little to much and I would like my credit card removed from this account.  I do not know the apple id or password.  How do i proceed?

    I let my grandsn open and itunes account with my credit card.  I want to remove my cc# from his account.  I do not know his apple id or password.  How do I proceed?

    I would say let him fess up and give him a chance to mend his ways, but there is at least one app that goes for $900 (according to another poster's request for a refund).  You may end up $1000+ deeper gone.
    Change the account number which will close the current links and freeze/prevent charges under the old number.  As I understand it Apple gets grumpy when charges get rejected, and you need to jump through hoops to get a payment method reattached.
    Yes this is a grumpy answer.

  • How to open a DWG file with AutoCAD options (AppleScript)?

    Hi,
    I'm looking for help specifying the AutoCAD options when opening DWG files.  I have DWG files of floor plans that I always want to open at the same scale. 
    I can successfully open a DWG file with the default options using:
    open POSIX file "/Users/crmckinnon/Desktop/cabin_floor_plan.dwg" as alias without dialogs
    But I don't want the default options, so if I try to specify them:
    open POSIX file "/Users/crmckinnon/Desktop/cabin_floor_plan.dwg" as alias with options {class:AutoCAD options, scale unit:"autocad inches"} without dialogs
    I get a "Can't find alias" error.  How do I specify the AutoCAD options?  I'm sure this is due to my lack of understanding of AppleScript.  Any help would be appreciated!
    Thanks,
    Chris

    I'll answer my own question.  Here's how I specified the options:
    open POSIX file filePath as alias with options {pGSO:original size, pASU:inches, pASR:12.0 / 0.1875} without dialogs
    I had to look in the Apple Script dictionary to get the "codes" to use.  The variable names didn't work.  I think that's because some have "global" in the name which is a keyword in Apple Script.  Here's what the codes translate to:
    pGSO = "global scale options"
    pASU = "scale unit"
    pASR = "scale ratio"
    Thanks,
    Chris

  • Can't open a object view with mapinfo

    i have created this object view (with toad 7.6 in a server oracle 9i ITA, i use mapinfo 7.5 ITA):
    CREATE OR REPLACE FORCE VIEW PRG.VISTAMORD
    (PIANO_STORIA_ID, ANAGR_ID, PIANO_ID, TIPOMOD_COD, ZTO,
    PRG, PIANO_STATO, ATTO_DATA, ATTO_TIPO, ATTO_NUM,
    PIANO_VARIANTE, PIANO_NOME, PIANO_NOTE, PIANO_POS_ARCH, PIANO_LEGGE,
    ANAGR_COD_COM, MI_STYLE, MI_PRINX, GEOLOC, ST)
    AS
    SELECT a.Piano_storia_id, a.Anagr_id, a.Piano_id, a.tipomod_cod,
    a.ZTO, a.PRG, b.piano_stato, b.atto_data, b.atto_tipo, b.atto_num,
         b.piano_variante, b.piano_nome, b.piano_note,
         b.piano_pos_arch, b.piano_legge, c.anagr_cod_com,
         d.mi_style, d.mi_prinx, d.geoloc, d.st
    from (piano b inner join ((oggetti_storia a
    inner join aux_indice e on (a.piano_storia_id=e.piano_storia_id)
              and (a.anagr_id=e.anagr_id) and
    (a.piano_id=e.piano_id)) inner join anagrafica c on a.anagr_id = c.anagr_id)
         on b.piano_id = a.piano_storia_id) inner join oggetti_spazial d
              on a.anagr_id = d.anagr_id
    where ((a.tipomod_cod)<>'DEL')
    order by piano_storia_id;
    where oggetti_spazial is a object table (a mapinfo map imported in Oracle)
    if i don't add the order by clause the view is ok and i can open it in mapinfo,
    with the order by clause, when i try to open the view mapinfo give the error:
    "errore Oracle: ORA-00600: codice errore INT., argom.:[15819],[5582],[],[],[],[],[],[]. Impossibile recuperare i record nella tavola.
    can You Help me?

    Hi Gabriel,
    I think with enough patience one could get the ASCII DataPlugin Wizard to create a DataPlugin that would work for your file, but the resulting code generated by the wizard is not easily understandable, and it would not have correctly devined the sampling rate from your file format.  I've written a DataPlugin from scratch which correctly reads the data snippet you sent over.  I included an implicit time channel so that you could easily see the time values inferred from the "SampleRate" line.  The implicit time channel rerquires all the lines in the ASCII file to be parsed in order to figure out the correct channel length (line 58), so if you have large data files you should comment out the time channel lines (44, 45, 58) and use just the implict time information already encoded in the data channel waveform properties (for faster file indexing).  Unless your files are verry large, though, I think you'll like the DataPlugin as it is.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Fischerg_TXT.zip ‏2 KB

  • An attempt to open a pdf file with Photoshop Elements (version 12) resulted in a pop generated by the Photoshop Editor stated "Impossible to execute this operation (opening file) because one of the specified colour is not managed". Is there any mean to ad

    An attempt to open a pdf file with Photoshop Elements (version 12) resulted in a pop generated by the Photoshop Editor stated "Impossible to execute this operation (opening file) because one of the specified colour is not managed". Is there any mean to adapt the file to make its reading possible?
    Did somebody get the same problem?

    It is a high order probability that your SQL's report generator is creating the PDF, not Acrobat (which by design and EULA cannot be used in as/with server).
    That the report generator outputs to an old-old version of PDF bears this out.
    Wiki articles on PDF are very nice for those high level intro summaries.
    To know / understand PDF you purchase and study the ISO Standard for PDF (ISO 32000-1:2008).
    Rather than "PDF validation" you may want to consider addressing the appearent root cause of the problem(s).
    You can change the email2fax application to one that can deal with older PDF versions.
    You can change the report generator to one that can output to the ISO Standard.
    (Perhaps the in-use application can be configured to output to the current version of PDF (i.e., the ISO Standard).
    Be well...

  • Can't open libHaru-generated PDF with Reader, other readers work.

    Our application uses libHaru to export PDF images.  These PDFs can be opened using PDFlite on Windows, Preview on Mac and some other readers.  However, I have tried several versions of Adobe Reader on both platforms and the files fail to open with the message: "There was an error processing a page.  There was a problem reading this document (14)."   So, it seams that Adobe Reader believes that there is problem with this file.  However, from my very limited understanding of PDF structure, I have no idea what might be wrong, so I don't know how to fix it.  The file is written unencrypted.  It is about as simple a PDF as we can generate - a red-filled rectangle.  I would greatly appreciate any suggestions or help.
    Here is a sample PDF:
    %PDF-1.3
    %∑æ≠™
    1 0 obj
    <<
    /Type /Catalog
    /Pages 2 0 R
    >>
    endobj
    2 0 obj
    <<
    /Type /Pages
    /Kids [ 4 0 R ]
    /Count 1
    >>
    endobj
    3 0 obj
    <<
    /Producer (Haru Free PDF Library 2.3.0-dev)
    >>
    endobj
    4 0 obj
    <<
    /Type /Page
    /MediaBox [ 0 0 236 207 ]
    /Contents 5 0 R
    /Resources <<
    /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
    /Pattern <<
    /Type /Pattern
    /PatternType 1
    /PaintType 2
    /TilingType 2
    /BBox [ 0 0 100 100 ]
    /XStep 100
    /YStep 100
    >>
    >>
    /Parent 2 0 R
    >>
    endobj
    5 0 obj
    <<
    /Length 6 0 R
    >>
    stream
    1 0 0 -1 -118 296 cm
    1 w
    0 0 0 RG
    [] 0 d
    1 0.3 0.3 rg
    q
    % Rect
    119.25 90 m
    352.5 90 l
    352.5 294.75 l
    119.25 294.75 l
    119.25 90 l
    h
    B
    Q
    endstream
    endobj
    6 0 obj
    135
    endobj
    xref
    0 7
    0000000000 65535 f
    0000000015 00000 n
    0000000064 00000 n
    0000000123 00000 n
    0000000188 00000 n
    0000000458 00000 n
    0000000647 00000 n
    trailer
    <<
    /Root 1 0 R
    /Info 3 0 R
    /Size 7
    >>
    startxref
    666
    %%EOF

    You would need to post a sample PDF that demonstrates the problem.  All you posted there is text.  (PDF is a BINARY file format)
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 13 Oct 2011 11:02:42 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Can't open libHaru-generated PDF with Reader, other readers work.
    Can't open libHaru-generated PDF with Reader, other readers work.
    created by Fred Snerd<http://forums.adobe.com/people/Fred+Snerd> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/3969828#3969828

  • Problem in automatically clear open items on  FIFO basis

    Hi all
       My requirement is like that I want to automatically clear open items on  FIFO basis with only one condition on Customer Code should be match.
    Is there is standard program or BAPI for that except sapf124(f.13).  Or I have to write a new program . Because my configuration does not allow me to do so by SAPF124(f.13).
    Thanks in advance.

    Hi,
    look here:
    1)there's a documentation in se38
    2) http://help.sap.com/saphelp_45b/helpdata/en/e9/cb8a85eb0011d184650000e8a6bfbe/content.htm
    Andreas

  • Open Item Import fails with a process_flag = -999 or -888

    Problem description
    ============
    The Open Item Import fails with a process_flag = -999 in
    mtl_system_items_interface. This keeps the item from being imported into
    mtl_system_items. The process_flag has to be set back to 1 to have the row(s)
    reprocessed.
    Solution
    ======
    UPDATE mtl_system_items_interface
    set transaction_type='CREATE'
    where transaction_type=<'>
    Commit;
    Re run the Item Import it should go fine.
    Regards,
    Mehboob

    Hi,
    It looks like you have posted the same in below thread.
    Item Import completed with Process_Flag = 31, 41 and 42
    Any way if you have problem you can refer to below metalink notes.
    NOTE:103869.1 - Item Attribute vs Template Attributes Using IOI
    NOTE:106812.1 - Instructions for Running Item Open Import (IOI) Including Historical Revision Da
    NOTE:109628.1 - FAQ for Item Import
    NOTE:268968.1 - Understanding Item Import and Debugging Problems with Item Import
    NOTE:458544.1 - Inventory Item Open Interface ITAR Template
    NOTE:52746.1 - A Guideline to IOI Error Messages and Solutions
    Thanks
    Vishalaksha

  • Issues opening AE CC project with CS6 despite the "save as CS6" option

    Hello all,
    I wish I wouldn't have to bother anyone with my noob question but I tried it all. I've been through the FAQ, the Search tool, lost myself on the Net for hours and... I can't find my problem resolved anywhere. It makes me feel sooOOo lonely.
    So, I know "After Effects CC (12.0) has a feature to save projects in a format that can be opened by After Effects CS6 (11.0)".
    BUT, as I used that precise feature (as well as the XML feature) and still have to face the impossibility to open my project file on CS6, I wondered if... anyone could help me to find an explanation at least. Or maybe even a solution.
    I know about the pt_OpenSesame script, but it seems to be less efficient than the feature "save as CS6" itself (as said by Adobe on several forums), and... it costs money
    Any idea why this "save as CS6" feature could possibly not work ? Any link to allow me to understand ?
    Could it be caused by the difference in OS updates ?
    Thanks a lot in advance !
    Config :
    From recent MBP with Lion 10.8.5 and CC (12.2)
    To less recent MBP with Lion 10.6.8 and CS6 (11.0)
    Message :
    "The file you are trying to open has been created with AE v12.2 (Macintosh 64) and can not be open with your actual version of it" (sorry it's a translation from french, not sure it is totally accurate)

    Hello Todd,
    Thank you for taking time to answer me.
    I am trying to open a copy, not the original file. This copy is named after a new name, totally different from the name of the initial project.
    As I said it to Szalam, the original project is saved in a AE CC 12.2 version and the copy is (not) opened on a AE CS6 11.0.4...

  • Opening file to automatica​lly open and run program with input file

    My program has the ability to save and open a text file with a custom extension.  How do I make the system in which the program is being installed to recognize this file to open the program, AND how to I gather the input file in my program and load it.
    Thanks
    Solved!
    Go to Solution.

    Ok I have found on a different thread how to setup/register the file path association in the classes root.  What I don't understand is how my program will know what the input file is.  For example, the reg setting is C:/.../MyProgram.exe %1
    When my program loads, is the %1 in the argc/argv part of the main thread? And if so, how do I debug/test this?
    Thanks

  • Cant open a file made with older aftereffects

    i just downloaded this file from the internet it is a aftereffects template. i downloaded the aep file and tried opening with AE cs6. it said that it cant open cuz its made with a old version of AE. I am pretty sure that it should have backwards compatibility, i mean i would understand if CS4 cant open CS6 file. but if CS6 cant open CS4 file that's weird, and i am really confused.

    Are you sure the file is CS4 and not AE4. CS6, according to the documentation CS6 can open AE7 and newer files.
    The file could also be corrupted.

  • Signed applet to open local file problem with IE6 / Firefox

    Hello
    I have a signed applet to open a local file, with this code :
    try{
       URL destination=null;
       File f=new File(adresse);
       destination=f.toURL();
       AppletContext ac=applet.getAppletContext();
       ac.showDocument(destination,"_blank");
    catch (MalformedURLException e)
       System.out.println(e.toString());
    ...It works perfectly with Netscape 7.01 and IE 5.5, but not with IE6.0 or Firefox 1.0...
    (using SUN JVM 1.4.2_04), and there is no trace/error message
    With a http link, it works for all browsers...
    try{
       URL destination=new URL("http://my.site/mypage.htm");
       AppletContext ac=applet.getAppletContext();
       ac.showDocument(destination,"_blank");
    catch (MalformedURLException e)
       System.out.println(e.toString());
    ...Any idea ??
    Thanks

    Hello again
    There's something I don't undestand...
    java applet code
    import java.applet.*;
    import java.net.*;
    public class test extends Applet {
         public void init() {
              try {          
                   String path = "file:/C:/Temp/";
                   URL destination = new URL(new URL(path) ,"test.jpg");
                   System.out.println("URL is now: " + destination.getPath() );          
                   AppletContext ac = this.getAppletContext();
                   ac.showDocument(destination, "_blank");
              } catch (Exception e) {
                   e.printStackTrace();
    html code
    <html>
    <head>
    <title>test</title>
    </head>
    <body>
    <applet CODE = "test.class" ARCHIVE = "sTest.jar" width=350 height=200></applet>
    </body>
    </html>
    Signature
    javac -classpath ".;D:\Program Files\Java\j2re1.4.2_04\lib\plugin.jar" test.java
    keytool -genkey -keystore mag -keyalg rsa -alias harm -validity 3600 -keypass password -storepass password
    jar cf0 test.jar *.class
    jarsigner -keystore mag -storepass password -keypass password -signedjar sTest.jar test.jar harm With a debug the signature looks good in the logs (translation by google, not sure of the correct words...)
    The checking of the certificate using the certificates CA root failed
    Piled up method
    Unstacked method
    Selected user: 0
    The user granted the rights of access to the code for this session only
    Addition of the certificate in the storage section of the certificates of session JPI
    Certificate added in the storage section of the certificates of session JPI
    Recording of the certificates in the storage section of the certificates of session JPI
    Certificates recorded in the storage section of the certificates of session JPI
    URL is now: /C:/Temp/test.jpg
    Javascript: Activated UniversalBrowserRead
    Javascript: Activated UniversalJavaPermission
    What are the 2 last line ?? (appears only in firefox, not in IE55...don't have another browser yet 'cause my graphic card and motherboard are out of order :-(
    Why in firefox, in the javascript console, there is a "message" (again translation by google...) but everything is alright in the java console ??
    Error of safety: the contents located at http://www.distantserver.com/Demo/test/test.html cannot charge of data or establish a bond towards file:///C:/Temp/test.jpg.
    Thanks in advance (and sorry if I only don't understand something from your link because of my english level...)

  • Open a CS3 fla with Flash CS5

    I'm not sure this is the right forum, so if the admin want to put this tread in the right place, please, do it!
    I'm going to buy a site template provided with fla source, but it is developed in CS3.
    Do you know if there are same problem opening and modifing this kind of fla with Flash CS5?
    Thanks in advance.

    there is no problem opening fla files, made with earlier versions of flash pro, in later flash pro versions (except for as2 containing files and flash pro after cs6).
    so, you're ok.
    except, and this is an excerpt from a book i wrote (Flash Game Development: In a Social, Mobile and 3D World),
    Spreading code across more than one frame of a timeline and especially in more than one timeline is a time-wasting mess and strongly discouraged. Anyone who has ever worked on a Flash file with significant bits of code spread over more than one timeline more than a few weeks after creating that code understands the incredible amount of time that can be wasted looking for pertinent code.
    The worst offenders that I have seen (and I have seen hundreds of problematic Flash projects), in the highly competitive worst Flash coding derby, are templates sold by websites like http://www.entheosweb.com/. Do not be fooled into thinking you can get a head-start on a project by starting with a web template offered for sale. There may be some well-coded templates sold online but I have never seen one.

Maybe you are looking for

  • Tables created with PHP 'while' function

    Hi All, I am new at this, so please be gentle. I have written a page that uses the PHP "while" function, to get data from a mysql database, and display it in a page. I have enclosed the function within a table so that the results are contained togeth

  • Long time to sleep

    Hi, When I first got my mbp it would go into sleep within a few seconds of closing the lid. Recently it has started to take some time in going to sleep when I close the lid, or when I select sleep from the apple menu. I just timed it and it took 40 s

  • Displaying Summary Column Values

    I have just learned about summary columns in Developer 2000...But I can't complete the task... I'd like to display the # of records for each value in the status column of my report. I have created the break group with Status column. Then I added a su

  • Php sql image editor - help with submit buttons!

    Hi, I have recently setup a website for my real-estate company, with a makeshift CMS behind it for my staff to use when updating properties. I have a slideshow on my site for each property, which is populated through sql blobs (I know alot of people

  • What kind of rechargable batteries (AAA) should i u

    Hi ! I would like to know what kind of rechargable batteries i could use on my Nomad Muvo. The player works with AAA batteries and i've seen many tipes of rechargable batteries for sale (Ni-Cad,Ni-Mh and others). Thanks for the attention.