Bug in OraOLEDB?

We have recently transfered from oracle 8 on a win2K platform to oracle 10g on a windows 2003 platform. We use VBscripts to carry out various tasks on the database via an ADO connection e.g.
Set dbUser = CreateObject("ADODB.Connection")
dbUser.Open "Provider=OraOLEDB.Oracle;User Id=???;Password=???;"
set rst = dbUser.execute(sql)
running our query in SQLPlus returns 300 records
running the same query via ADO using the same account returns 1 record
ADO version is 2.8
We are running the script on the database machine itself.
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
Does anyone have any suggestions?

I have similar problem in query
with subset as (select ... from ... LEFT join ... )
select ... from ...
- where main query use 'subbset' twice (inner and left joined). Sometimes second subset do not return any rows, sometimes return less rows than expected (compared to results of query from PL/SQL developer or other tools) - depends on contents of where clause. Note this problem on OraOledb.Oracle provider, not using default (MSDASQL).
Have anyone suggestion / or rewrote sql?
Regards
JU
Database: 10g (10.2.0.2)
Oracle ODBC 9.02.00.54
oraoledb.dll 9.2.04

Similar Messages

  • 64bit OraOLEDB failed when calling stored procedure with Ref Cursor

    Hi everyone,
    I used the ADO VB sample provided with the Oracle 10g provider installation.
    But I compiled it in 64bit Visual Studio 2005 and ran on Windows 2003 x64 server.
    The function call "cmd.Execute" when it is trying to call a stored procedure which has an Out Ref Cursor parameter. The exception is
    "PLS-00306: wrong number or types arguments in call"
    I already set the property "PLSQLRSet" to true. But it doesn't help.
    The same code works if I compiled in 32 bit.
    It also works if the stored procedure does not have Ref Cursor parameter.
    I am guessing this is a bug in the 64bit Oracle provider. Anyone can confirm this please? or am I missing anything?
    Wilson

    It appears to work with 11.1.0.6.20 OLEDB provider but only for ExecuteNonQuery, I'm not able to work with Fill, and yes... in x86 works perfectly, but in x64 we are still having the ORA-06550 and PLS-00306 error.
    Our Connection string is as follows:
    "Provider=OraOLEDB.Oracle.1;OLEDB.NET=true;Password=xxxxx;Persist Security Info=True;User ID=exxxxx;Data Source=ECOR; PLSQLRSet=True"
    We are not using ODP.NET.
    Can you confirm that Fill method works with such update?

  • Oracle ORAOLEDB Provider removes trailing blanks in parameter values of Type IN CHAR

    Hi,
    I often use StoredProcedures With Ref_Cursor parameters to read data from an Oracle 11g DB.
    Because we use VARCHAR2 columns in our tables, we have to pad blanks for an exact match, the Input Parameter has to contain For example "WW2 ",
    This was working fine over the years using the Microsoft-Ado Provider MSDAORA ( with Excel 10, VBA ).
    Now we want to use the Oracle ORAOLEDB Provider. In our tests all resultsets were empty(rs.EOF/rs.BOF)
    The reason is, that inside the StoredProcedure  the ParameterValue was trimmed ( "WW2" ), and so the Where-Clause doesn't match.
    Is it possible to change this behaviour( bug or bad feature ? ) by setting a property of an object , in registry or somewhere else ?
    I am aware of the differences between the two character types VARCHAR2 / CHAR ( blankpadded / no blankpadded compare ).
    But the parameters of the stored procedure is CHAR (fixed length). and in this case strings are usually padded with blanks, and so I think, that no component has to modify a fixed length object,
    especially if the length of the parameter is a hard setting in vba code( Set Param = SqlCmd.CreateParameter("strAnlage", adChar, adParamInput, 4) , and in PL/SQL : strAnlage IN CHAR ).
    Thanks.
    Best regards
    Dirk

    Can you post how you are trying to call the procedure from a package body?
    Check this:
    SQL> create or replace package hits_11 as
      2  procedure my_process(a number);
      3  end;
      4  /
    Package created.
    SQL> create or replace package body hits_11 is
      2  procedure my_process(a number) is
      3  begin
      4  dbms_output.put_line(a);
      5  end;
      6  end;
      7  /
    Package body created.
    SQL> exec hits_11.my_process;
    BEGIN hits_11.my_process; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'MY_PROCESS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL> exec hits_11.my_process(1);
    1
    PL/SQL procedure successfully completed.
    SQL>

  • OraOLEDB 9.2.0.4.0 production release is available

    OraOLEDB 9.2.0.4.0 production release is available for download from OTN. Broken download link issue has been fixed.
    What's new in this release?
    ===========================
    New Data Types Support
    Oracle9i and later versions data types:
    - TIMESTAMP
    - TIMESTAMP WITH TIME ZONE
    - TIMESTAMP WITH LOCAL TIME ZONE
    - INTERVAL YEAR TO MONTH
    - INTERVAL DAY TO SECOND
    TIMESTAMP, TIMESTAMP WITH TIME ZONE, and TIMESTAMP WITH LOCAL TIME ZONE data types are mapped to OLE DB DBTYPE_DBTIMESTAMP; INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND are to DBTYPE_STR.
    OLE DB DBTYPE_DBTIMESTAMP data type does not have TIME ZONE information. For data insertion into a TIMESTAMP WITH TIME ZONE or TIMESTAMP WITH LOCAL TIME ZONE, the client's time zone setting is used. For data retrieval, TIME ZONE is dropped for TIMESTAMP WITH TIME ZONE columns, but TIME ZONE is used for TIMESTAMP WITH LOCAL TIME ZONE columns.
    For TIMESTAMP, TIMESTAMP WITH TIME ZONE, and TIMESTAMP WITH LOCAL TIME ZONE, ADO consumers must specify the CursorLocation as adUseServer and use Recordset for DML operations.
    Fractional second is not supported for TIMESTAMP binding with Command objects. Note that using ALTER SESSION to change time zone information will not change the time zone information in the new and existent Recordsets. Recordsets use the client's time zone setting in Operating System's Regional Options.
    Supported INTERVAL Formats:
    - INTERVAL YEAR TO MONTH: "(sign)years-months"
    Example:
    "2-3" (2 years and 3 months)
    "+2-3" (2 years and 3 months)
    "-2-3" (negative 2 years and 3 months)
    - INTERVAL DAY TO SECOND: "(sign)days hours:minutes:seconds.fraction"
    Example:
    "7 10:20:30.123456"
    (7 days, 10 hours, 20 minutes, and 30.123456 seconds)
    "+7 10:20:30.123456"
    (7 days, 10 hours, 20 minutes, and 30.123456 seconds)
    "-7 10:20:30.123456"
    (negative 7 days, 10 hours, 20 minutes, and 30.123456 seconds)
    OraOLEDB-specific Connection String Attributes
    ==============================================
    UseSessionFormat - specifies whether to use the default NLS session formats or let OraOLEDB override some of these formats for the duration of the session.
    Valid values are 0 (FALSE) and 1 (TRUE). The default is FALSE which lets OraOLEDB override some of the default NLS session formats. If the value is TRUE, OraOLEDB uses the default NLS session formats.
    Note that this connection attribute does not appear under the OLEDB registry key.
    BUG FIXES (in 9.2.0.4.0)
    ========================
    1. -2147217887 is generated when inserting data using accessor class (Bug #3114560)
    2. Calls to OpenSchema leak memory (Bug #3038113)
    3. Fraction gets truncated for FLOAT column when decimal separator changed to comma (Bug #1633090)
    4. Returns incorrect data for LONG-RAW columns with default ChunkSize 100 bytes (Bug #3069807)
    5. Failures and access violation occur on 'SELECT CASE' queries (Bug #2910141)
    6. Memory leaks during connect/disconnect (Bug #2794171)
    7. Oracle OLE DB Provider returns DBTYPE_STR when it should return DBTYPE_WSTR (Bug #2651518)
    8. SELECT with a parameter bind of type number in WHERE clause causes ORA-1722 error (Bug #2391768)
    9. Corrupts data when using multi-threaded application (Bug #2822641)
    10. Does not return DBSTATUS_S_TRUNCATED appropriately (Bug #2743415)
    11. Memory leaks when using "SELECT DISTINCT" and aduseclient (Bug #2626329)
    12. ORA-01036 error occurs when using bind variable (Bug #2665941)
    13. 'SELECT CASE' returns ORA-923: FROM keyword not found (Bug #2457001)
    14. Wrong order of ADO output parameters crash appl/vb when one param is of Timestamp type (Bug #3158709)
    15. ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ', ' truncates float after decimal (Bug #3158709)
    16. Date values cause intermittent DB_E_ERRORSOCCURRED in COM+ application (Bug #3209734)
    17. OraOLEDB crashes with 800 bind parameters and PL/SQL anonymous block (Bug #2744164)
    18. Oraoledbgmr!odbcsqltoorclsql crashes with COM+ under load (Bug #2730995)

    Is the recommended 9.2.0.4 patchset needed for the Database Server only? Is there a patchset to upgrade the 9i Client to 9.2.0.4 also?

  • BUG With 10g OleDB Provider!

    Hi there!
    I originally thought I was going mad, but now I think there's a bug in the 10g Oracle OleDB Provider. I can repeat this at will on my systems:
    * Windows XP SP2 (with all the latest Windows Update Patches)
    * Oracle Client (including OleDB Provider) v10.2.0.1.0
    * MDAC 2.8 SP1 (with Windows XP SP2)
    or
    * Windows 2000 Workstation (with all the latest Windows Update Patches)
    * Oracle Client (including OleDB Provider) v10.2.0.1.0
    * MDAC 2.7
    Here's all I have to do!
    1) Create a table with some data in Oracle (have tested this against 8i, 9i and 10g databases):
    CONN your_username/your_password@your_tns_service_name
    CREATE TABLE OLEDB_TEST
         RECORD_ID     NUMBER(5) NOT NULL,
         RECORD_DESC     VARCHAR2(50) NOT NULL
    INSERT INTO OLEDB_TEST VALUES(0    , '0     is OK!');
    INSERT INTO OLEDB_TEST VALUES(1    , '1     is OK!');
    INSERT INTO OLEDB_TEST VALUES(10   , '10    is wrong - comes out as 0');
    INSERT INTO OLEDB_TEST VALUES(12   , '12    is OK');
    INSERT INTO OLEDB_TEST VALUES(100  , '100   is wrong - comes out as 0');
    INSERT INTO OLEDB_TEST VALUES(120  , '120   is wrong - comes out as 20');
    INSERT INTO OLEDB_TEST VALUES(1200 , '1200  is wrong - comes out as 0');
    INSERT INTO OLEDB_TEST VALUES(1230 , '1230  is wrong - comes out as 230');
    INSERT INTO OLEDB_TEST VALUES(12300, '12300 is wrong - comes out as 300');
    INSERT INTO OLEDB_TEST VALUES(12340, '12340 is wrong - comes out as 2340');
    COMMIT;2) Run some VBScript (which you can do in VB6, ASP or however else you want to add it in):
    ' Constants for the connection string
    Const strUSER = "your_username"                    ' e.g. SCOTT
    Const strPASSWORD = "your_password"               ' e.g. TIGER
    Const strTNS_SERVICE_NAME = "your_tns_service_name"     ' e.g. ORCL
    Dim objConnection
    Dim objRecordset
        ' make sure we have a temp directory to write to, and that any existing file is deleted
        On Error Resume Next
        MkDir "C:\temp\"
        Kill "c:\temp\oledb_test.txt"
        On Error GoTo 0
        ' create the ADO connection
        Set objConnection = CreateObject("ADODB.Connection")
        ' set the connection string
        ' Using the Microsoft OLEDB Provider for Oracle works fine and dandy!
        'objConnection.ConnectionString = "Provider=MSDAORA.1;User ID=" & strUSER & ";Password=" & strPASSWORD & ";Persist Security Info=True;Data Source=" & strTNS_SERVICE_NAME
        ' But using Oracle Provider for OLEDB causes us problems!!
        objConnection.ConnectionString = "Provider=OraOLEDB.Oracle.1;User ID=" & strUSER & ";Password=" & strPASSWORD & ";Persist Security Info=True;PLSQLRSet=1;Data Source=" & strTNS_SERVICE_NAME
        ' set the cursor to open on the client
        objConnection.CursorLocation = 3    ' adUseClient
        ' open the connection
        objConnection.Open
        ' create the ADO recordset object
        Set objRecordset = CreateObject("ADODB.Recordset")
        ' set its active connection
        Set objRecordset.ActiveConnection = objConnection
        ' open it up, pulling in the data from the oledb connection
        objRecordset.Open "SELECT * FROM OLEDB_TEST"
        ' disconnect the recordset
        Set objRecordset.ActiveConnection = Nothing
        ' persist the recordset's data to XML
        objRecordset.Save "C:\temp\oledb_test.txt", 1       ' adPersistXML
        ' clean up our objects
        objRecordset.Close
        Set objRecordset = Nothing
        objConnection.Close
        Set objConnection = Nothing3) The resulting file in c:\temp\oledb_test.txt is as follows:
    <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
         xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
         xmlns:rs='urn:schemas-microsoft-com:rowset'
         xmlns:z='#RowsetSchema'>
    <s:Schema id='RowsetSchema'>
         <s:ElementType name='row' content='eltOnly'>
              <s:AttributeType name='RECORD_ID' rs:number='1' rs:writeunknown='true'>
                   <s:datatype dt:type='number' rs:dbtype='numeric' dt:maxLength='19' rs:scale='0' rs:precision='5' rs:fixedlength='true'
                    rs:maybenull='false'/>
              </s:AttributeType>
              <s:AttributeType name='RECORD_DESC' rs:number='2' rs:writeunknown='true'>
                   <s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='50' rs:maybenull='false'/>
              </s:AttributeType>
              <s:extends type='rs:rowbase'/>
         </s:ElementType>
    </s:Schema>
    <rs:data>
         <z:row RECORD_ID='0'    RECORD_DESC='0     is OK!'/>
         <z:row RECORD_ID='1'    RECORD_DESC='1     is OK!'/>
         <z:row RECORD_ID='0'    RECORD_DESC='10    is wrong - comes out as 0'/>
         <z:row RECORD_ID='12'   RECORD_DESC='12    is OK'/>
         <z:row RECORD_ID='0'    RECORD_DESC='100   is wrong - comes out as 0'/>
         <z:row RECORD_ID='20'   RECORD_DESC='120   is wrong - comes out as 20'/>
         <z:row RECORD_ID='0'    RECORD_DESC='1200  is wrong - comes out as 0'/>
         <z:row RECORD_ID='230'  RECORD_DESC='1230  is wrong - comes out as 230'/>
         <z:row RECORD_ID='300'  RECORD_DESC='12300 is wrong - comes out as 300'/>
         <z:row RECORD_ID='2340' RECORD_DESC='12340 is wrong - comes out as 2340'/>
    </rs:data>
    </xml>Note that the RECORD_ID field is incorrect!! Somewhere along the line, for every 0 at the end of the RECORD_ID (when the RECORD_ID is not 0), a digit is removed from the beginning of the RECORD_ID!
    This is KILLING me!!!
    You will notice that there is a line of code that is commented out which uses the Microsoft OLE DB Provider for Oracle instead. This works fine and dandy. The trouble is I can't use it, as I need functionality in the Oracle provider that the MS provider doesn't have! OUCH!
    Can anyone confirm that they get the same problems, or is there something else in my system that is messing things up??
    Many thanks for any help!
    James
    Message was edited by:
    JAMES_2JS

    It does not affect VS2005. I tried this code on
    * Windows XP SP2 (with all the latest Windows Update Patches)
    * Oracle Data Access Client v10.2.0.2.20
    static void Main(string[] args)
        try
            // create connection
            string cnString = "Provider=OraOLEDB.Oracle.1;User ID=hr;Password=hr;Data Source=//localhost/xe";
            OleDbConnection conn = new OleDbConnection(cnString);
            // create and fill dataset
            OleDbDataAdapter da = new OleDbDataAdapter("select * from oledb_test", conn);
            DataSet ds = new DataSet();
            da.Fill(ds);
            // write to XML
            ds.WriteXml("c:\\temp\\oledb_test1.txt");
            // done
            Console.WriteLine("XML file created, press any key...");
            Console.ReadKey();
        catch (Exception ex)
            Console.WriteLine("Error: " + ex.Message);
            Console.ReadKey();
    }and the result is,
    <?xml version="1.0" standalone="yes"?>
    <NewDataSet>
      <Table>
        <RECORD_ID>0</RECORD_ID>
        <RECORD_DESC>0     is OK!</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>1</RECORD_ID>
        <RECORD_DESC>1     is OK!</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>10</RECORD_ID>
        <RECORD_DESC>10    is wrong - comes out as 0</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>12</RECORD_ID>
        <RECORD_DESC>12    is OK</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>100</RECORD_ID>
        <RECORD_DESC>100   is wrong - comes out as 0</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>120</RECORD_ID>
        <RECORD_DESC>120   is wrong - comes out as 20</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>1200</RECORD_ID>
        <RECORD_DESC>1200  is wrong - comes out as 0</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>1230</RECORD_ID>
        <RECORD_DESC>1230  is wrong - comes out as 230</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>12300</RECORD_ID>
        <RECORD_DESC>12300 is wrong - comes out as 300</RECORD_DESC>
      </Table>
      <Table>
        <RECORD_ID>12340</RECORD_ID>
        <RECORD_DESC>12340 is wrong - comes out as 2340</RECORD_DESC>
      </Table>
    </NewDataSet>

  • Future of OraOleDb

    Hello All,
    Does anyone know if Oracle plans to continue developing OleDb drive for Oracle (OraOleDb)? There seems to be a version of OraOleDb for Oracle 10g Release 2. But will Oracle continue to developing it for future releases or will they deprecate the product and support just ODP.NET only. Also, what is the future of OO4O (Oracle Objects for Ole).
    Any insight / information will be helpful.
    Thanks

    Oracle Provider for OLE DB is actively supported by Oracle. OraOLEDB 10.2.0.2.20 version has been released recently as part of ODAC 10.2.0.2.20 release with performance improvement and high priority bug fixes.
    Oracle Objects for OLE (OO4O) is also actively supported by Oracle.

  • Command.text with ODBC escape sequence is not working in VC++, Bug in OLEDB ?

    Command.text with ODBC escape sequence is not working in VC++. The Code, which written in VB is working perfectly. Is there any different syntax in VC++ or bug in
    OLE DB provider ?. I am using OraOLEDB 8.1.7 version.
    Thanks
    Mani
    VB Code
    ' Enable PLSQLRSet property
    Cmd.Properties("PLSQLRSet") = True
    ' Stored Procedures returning resultsets must be called using the
    ' ODBC escape sequence for calling stored procedures.
    Cmd.CommandText = "{CALL corpuser.GetCorpUserRec(?, ?)}"
    Set Rst1 = Cmd.Execute
    VC++ Code (while execute it is giving error )
    pCommand->CommandText = "{CALL corpuser.GetCorpUserRec(?, ?)}";
    pRs1 = pCommand->Execute(NULL,NULL,adCmdStoredProc);

    Hi
    The odbc escape sequence for calling stored procedures works fine with VC++ also.
    You can check the sampe application at following url :
    http://otn.oracle.com/sample_code/tech/windows/ole_db/content.html
    Hope this helps
    Chandar

  • OraOLEDB.Oracle-Provider cannot be found. It may not be properly installed.

    I have a traditional ASP page that uses the OraOLEDB.Oracle.1 provider to connect to an Oracle database. The oracle 9 client is installed on the Webserver and the asp page can successfully connect to the oracle database using the Microsoft OLE DB provider for Oracle. The problem with using the Microsoft provider is that the database has a datatype that is not recognized by the Microsoft provider. I cannot understand why the OraOLEDB.Oracle provider is not working. I have verified permissions on the Ora90 directory and it is set to allow EVERYONE read and execute permissions currently. I have .NET apps on the server that use the OracleClient.dll successfully.
    Does anyone have any ideas on what I could try to get the OraOLEDB.Oracle provider working?

    Just as an FYI for everyone.
    The base version of the Oracle Client 9.2.0.1.0 has a known bug with installing DLLs with incorrect permissions for Authtenicated Users. You will see this type of error message when connecting from ASP or ASPX but not client server applications.
    This is fixed in 9.2.0.7.0 client patchset, restart and it should work fine. Other scenarios can cause same error like the provider not being installed, the key different is that you can connect via client server but not Web Applications when you are hitting this permissions bug.
    Feedback and Comments Welcome
    J

  • Provider = OraOLEDB.Oracle - provider not found after Dev Install of O8i

    When I run my VB application and try to connect to the Oracle database using ADO and the
    Provider = OraOLEDB.Oracle
    I get the error message "Provider not found or is installed incorrectly."
    This is strange as I have installed the developer version of Oracle and I can connect to the database using SQLPLUS.
    Does anyone know what the problem could be?
    Thanks

    Hi Vincent,
    Here is what you are looking for.
    NOTE> Installing the 11.2.0.3 Oracle Provider for OLE DB from the Client Install Media Does Not Properly Register the Provider [ID 1380742.1]
    Bug:13417266 WHILE UPGRADING TO 11.2.0.3, INSTALLER FAILS TO REGISTER ORAOLEDB DLL
    Regards!
    Stefanie

  • Index with "or" clause (BUG still exists?)

    The change log for 2.3.10 mentions "Fixed a bug that caused incorrect query plans to be generated for predicates that used the "or" operator in conjunction with indexes [#15328]."
    But looks like the Bug still exists.
    I am listing the steps to-repro. Let me know if i have missed something (or if the bug needs to be fixed)
    DATA
    dbxml> openContainer test.dbxml
    dbxml> getDocuments
    2 documents found
    dbxml> print
    <node><value>a</value></node>
    <node><value>b</value></node>
    INDEX (just one string equality index on node "value")
    dbxml> listIndexes
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: node-element-equality-string for node {}:value
    2 indexes found.
    QUERY
    setVerbose 2 2
    preload test.dbxml
    query 'let $temp := fn:compare("test", "test") = 0
    let $results := for $i in collection("test.dbxml")
    where ($temp or $i/node[value = ("a")])
    return $i
    return <out>{$temp}{$results}</out>'
    When $temp is true i expected the result set to contain both the records, but that was not the case with the index. It works well when there is no index!
    Result WITH INDEX
    dbxml> print
    <out>true<node><value>a</value></node></out>
    Result WITHOUT INDEX
    dbxml> print
    <out>true<node><value>a</value></node><node><value>b</value></node></out>

    Hi Vijay,
    This is a completely different bug, relating to predicate expressions that do not examine nodes. Please try the following patch, to see if it fixes this bug for you:
    --- dbxml-2.3.10-original/dbxml/src/dbxml/optimizer/QueryPlanGenerator.cpp     2007-04-18 10:05:24.000000000 +0100
    +++ dbxml-2.3.10/dbxml/src/dbxml/optimizer/QueryPlanGenerator.cpp     2007-08-08 11:32:10.000000000 +0100
    @@ -1566,11 +1572,12 @@
         else if(name == Or::name) {
              UnionQP *unionOp = new (&memMgr_) UnionQP(&memMgr_);
    +          result.operation = unionOp;
              for(VectorOfASTNodes::iterator i = args.begin(); i != args.end(); ++i) {
                   PathResult ret = generate(*i, ids);
                   unionOp->addArg(ret.operation);
    +               if(ret.operation == 0) result.operation = 0;
    -          result.operation = unionOp;
         // These operators use the presence of the node arguments, not their valueJohn

  • Bug report follow-up

    is there a way to follow-up on a bug report that i submitted?  i have the bug number, but would like to see if the report was understood, filled out properly and determine the status of the bug report.
    thanks,
    doug

    They comment on bugs if actions were taken. Otherwise - don't expect any feedback.

  • Solaris8 and 9 (possibly 7) /dev/poll driver bug report.

    Hello,
    I'd like to report a bug in the solaris 8 and 9 /dev/poll driver (poll(7d)).
    As i do not have a support account with sun or anything like that, there
    seems to be no other way to do that here (which is of course a very sad
    thing).
    Bug details:
    The /dev/poll device provides an ioctl-request (DP_ISPOLLED) for checking
    if a particular filedescriptor is currently in the set of monitored
    filedescriptors for that particular /dev/poll fd set (open /dev/poll fd).
    A quote from the documentation of the poll(7d) manual page taken from
    Solaris9:
    "DP_ISPOLLED ioctl allows you to query if a file descriptor is already in
    the monitored set represented by fd. The fd field of the pollfd structure
    indicates the file descriptor of interest. The DP_ISPOLLED ioctl returns 1
    if the file descriptor is in the set. The events field contains the
    currently polled events. The revents field contains 0. The ioctl returns 0
    if the file descriptor is not in the set. The pollfd structure pointed by
    pfd is not modified. The ioctl returns a -1 if the call fails."
    It says that when you query for an filedescriptor which is currently being
    monitored in the set, that it would return 1, and change the events field of
    the pollfd structure to the events it's currently monitoring that fd for.
    The revents field would be set to zero.
    However the only thing which actually happens here, is that FD_ISPOLLED
    returns 1 when the fd is in the set and 0 if not. When the fd is in the
    set, when FD_ISPOLLED returns 1, the events field remains unmodified, but
    the revents field gets changed.
    A small sample code to illustrate:
    #include <stdio.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <sys/devpoll.h>
    main() {
    struct pollfd a;
    int dp_fd = open("/dev/poll", O_WRONLY);
    a.fd = 0; /* stdin */
    a.events = POLLIN; /* we monitor for readability, POLLIN=1 */
    a.revents = 0;
    write(dp_fd, &a, sizeof(a));
    a.fd = 0;
    a.events = 34; /* filled in with bogus number to show malfunctioning */
    a.revents = 0;
    printf("DP_ISPOLLED returns: %d\n", ioctl(dp_fd, DP_ISPOLLED, &a));
    printf("a.fd=%d, a.events=%hd, a.revents=%hd\n", a.fd, a.events,
    a.revents);
    According to the documentation of /dev/poll and namely DP_ISPOLLED this
    program is supposed to print the following:
    DP_ISPOLLED returns: 1
    a.fd=0, a.events=1, a.revents=0
    However it prints the following:
    DP_ISPOLLED returns: 1
    a.fd=0, a.events=34, a.revents=1
    You can take any number instead of '34' and it will simply remain untouched
    after the DP_ISPOLLED ioctl-request.
    I hope it's clear now that the solaris8 and solaris9 (and probably solaris7
    with /dev/poll patch too) DP_ISPOLLED implementation is broken.
    This bug is also easily illustrated by looking at the solaris8 kernel sourcecode:
    <snippet osnet_volume/usr/src/uts/common/io/devpoll.c:dpioctl()>
    case DP_ISPOLLED:
    pollfd_t pollfd;
    polldat_t *pdp;
    if (pollfd.fd < 0) {
    mutex_exit(&pcp->pc_lock);
    break;
    pdp = pcache_lookup_fd(pcp, pollfd.fd);
    if ((pdp != NULL) && (pdp->pd_fd == pollfd.fd) &&
    (pdp->pd_fp != NULL)) {
    pollfd.revents = pdp->pd_events;
    if (copyout(&pollfd, (caddr_t)arg,
    sizeof(pollfd_t))) {
    mutex_exit(&pcp->pc_lock);
    DP_REFRELE(dpep);
    return (set_errno(EFAULT));
    *rvalp = 1;
    </snippet>
    its' clearly visible that the code writes the current monitored events to
    the revents field:
    'pollfd.revents = pdp->pd_events;'
    and that it doesnt set revents to zero.
    It's funny to see that this has been like this since Solaris8 (possibly 7). That means nobody ever used DP_ISPOLLED that way or people were simply to lazy to file a bug report.
    Another funny thing related to this. is that Hewlett-Packard did seem to know about this. Since HP-UX11i version 1.6 they also support /dev/poll. From their manual page i ll quote some sentences from their WARNING session:
    "The ioctl(DP_ISPOLLED) system call also returns its result in the revents member of the pollfd structure, in order to be compatible with the implementation of the /dev/poll driver by some other vendors."
    Hopefully this will get fixed.
    I also like to reexpress my very negative feelings towards the fact that you're not able to file bug reports when you do not have a support contract. Ridiculous.
    Thanks,
    bighawk

    Have I mentioned how much i love my playbook now Great job on os 2.0

  • [bdb bug]repeatly open and close db may cause memory leak

    my test code is very simple :
    char *filename = "xxx.db";
    char *dbname = "xxx";
    for( ; ;)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    I try to run my test program for a long time opening and closing db repeatly, then use the PS command and find the RSS is increasing slowly:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 466 588 4999 980 0.3 -bash
    2615 pts/0 R 0:01 588 2 5141 2500 0.9 ./test
    after a few minutes:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 473 588 4999 976 0.3 -bash
    2615 pts/0 R 30:02 689 2 156561 117892 46.2 ./test
    I had read bdb's source code before, so i tried to debug it for about a week and found something like a bug:
    If open a db with both filename and dbname, bdb will open a db handle for master db and a db handle for subdb,
    both of the two handle will get an fileid by a internal api called __dbreg_get_id, however, just the subdb's id will be
    return to bdb's log region by calling __dbreg_pop_id. It leads to a id leak if I tried to open and close the db
    repeatly, as a result, __dbreg_add_dbentry will call realloc repeatly to enlarge the dbentry area, this seens to be
    the reason for RSS increasing.
    Is it not a BUG?
    sorry for my pool english :)
    Edited by: user9222236 on 2010-2-25 下午10:38

    I have tested my program using Oracle Berkeley DB release 4.8.26 and 4.7.25 in redhat 9.0 (Kernel 2.4.20-8smp on an i686) and AIX Version 5.
    The problem is easy to be reproduced by calling the open method of db handle with both filename and dbname being specified and calling the close method.
    My program is very simple:
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/time.h>
    #include "db.h"
    int main(int argc, char * argv[])
    int ret, count;
    DB_ENV *dbenvp;
    char * filename = "test.dbf";
    char * dbname = "test";
    db_env_create(&dbenvp, 0);
    dbenvp->open(dbenvp, "/home/bdb/code/test/env",DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL, 0);
    for(count = 0 ; count < 10000000 ; count++)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    dbenvp->close(dbenvp, 0);
    return 0;
    DB_CONFIG is like below:
    set_cachesize 0 20000 0
    set_flags db_auto_commit
    set_flags db_txn_nosync
    set_flags db_log_inmemory
    set_lk_detect db_lock_minlocks
    Edited by: user9222236 on 2010-2-28 下午5:42
    Edited by: user9222236 on 2010-2-28 下午5:45

  • Multiple return values (Bug-ID 4222792)

    I had exactly the same request for the same 3 reasons: strong type safety and code correctness verification at compile-time, code readability and ease of mantenance, performance.
    Here is what Sun replied to me:
    Autoboxing and varargs are provided as part of
    JSRs 14 and 201
    http://jcp.org/en/jsr/detail?id=14
    http://jcp.org/en/jsr/detail?id=201
    See also:
    http://forum.java.sun.com/forum.jsp?forum=316
    http://developer.java.sun.com/developer/earlyAccess/adding_generics/index.html
    Multiple return values is covered by Bug-ID 4222792
    Typically this is done by returning an array.
    http://developer.java.sun.com/developer/bugParade/bugs/4222792.html
    That's exactly the problem: we dynamically create instances of array objects that would better fit well within the operand stack without stressing the garbage collector with temporary Array object instances (and with their backing store: 2 separate allocations that need to be recycled when it is clearly a pollution that the operand stack would clean up more efficiently)
    If you would like to engage in a discussion with the Java Language developers, the Generics forum would be a better place:
    http://forum.java.sun.com/forum.jsp?forum=316
    I know that (my report was already refering to the JSR for language extension) Generics is not what I was refering to (even if a generic could handle multiple return values, it would still be an allocated Object
    instance to pack them, i.e. just less convenient than using a static class for type safety.
    The most common case of multiple return values involve values that have known static datatypes and that should be checked with strong typesafety.
    The simple case that involves returning two ints then will require at least two object instances and will not solve the garbage collection overhead.
    Using a array of variable objects is exactly similar, except that it requires two instances for the components and one instance for the generic array container. Using extra method parameters with Integer, Byte, ... boxing objects is more efficient, but for now the only practical solution (which causes the least pollution in the VM allocator and garbage collector) is to use a custom class to store the return values in a single instance.
    This is not natural, and needlessly complexifies many interfaces.
    So to avoid this pollution, some solutions are used such as packing two ints into a long and returning a long, depacking the long after return (not quite clean but still much faster at run-time for methods that need to be used with high frequencies within the application. In some case, the only way to cut down the overhead is to inline methods within the caller code, and this does not help code maintenance by splitting the implementation into small methods (something that C++ can do very easily, both because it supports native types parameters by reference, and because it also supports inline methods).
    Finally, suppose we don't want to use tricky code, difficult to maintain, then we'll have to use boxing Object types to allow passing arguments by reference. Shamely boxed native types cannot be allocated on the operand stack as local variables, so we need to instanciate these local variables before call, and we loose the capacity to track the cases where these local variables are not really initialized by an effective call to the method that will assign them. This does not help debugging, and is against the concept of a strongly typed language like Java should be:
    Java makes lots of efforts to track uninitialized variables, but has no way to determine if an already instanciated Object instance refered in a local variable has effectively received an effective assignment because only the instanciation is kept. A typical code will then need to be written like this:
    Integer a = null;
    Integer b = null;
    if (some condition) {
    //call.method(a, b, 0, 1, "dummy input arg");
    // the method is supposed to have assigned a value to a and b,
    // but can't if a and b have not been instanciated, so we perform:
    call.method(a = new Integer(), b = new Integer(), 0, 1, "dummy input
    arg");
    // we must suppose that the method has modified (not initialized!)
    the value
    // of a and b instances.
    now.use(a.value(), b.value())
    // are we sure here that a and b have received a value????
    // the code may be detected at run-time (a null exception)
    // or completely undetected (the method() above was called but it
    // forgot to assign a value to its referenced objects a and b, in which
    // case we are calling in fact: now.use(0, 0); with the default values
    // or a and b, assigned when they were instanciated)
    Very tricky... Hard to debug. It would be much simpler if we just used:
    int a;
    int b;
    if (some condition) {
    (a, b) = call.method(0, 1, "dummy input arg");
    now.use(a, b);
    The compiler would immediately detect the case where a and b are in fact not always initialized (possible use bere initialization), and the first invoked call.method() would not have to check if its arguments are not null, it would not compile if it forgets to return two values in some code path...
    There's no need to provide extra boxing objects in the source as well as at run-time, and there's no stress added to the VM allocator or garbage collector simply because return values are only allocated on the perand stack by the caller, directly instanciated within the callee which MUST (checked at compile-time) create such instances by using the return statement to instanciate them, and the caller now just needs to use directly the variables which were referenced before call (here a and b). Clean and mean. And it allows strong typechecking as well (so this is a real help for programmers.
    Note that the signature of the method() above is:
    class call {
    (int, int) method(int, int, String) { ... }
    id est:
    class "call", member name "method", member type "(IILjava.lang.string;)II"
    This last signature means that the method can only be called by returning the value into a pair of variables of type int, or using the return value as a pair of actual arguments for another method call such as:
    call.method(call.method("dummy input arg"), "other dummy input arg")
    This is strongly typed and convenient to write and debug and very efficient at run-time...

    Can anyone give me some real-world examples where
    multiple return values aren't better captured in a
    class that logically groups those values? I can of
    course give hundreds of examples for why it's better
    to capture method arguments as multiple values instead
    of as one "logical object", but whenever I've hankered
    for multiple return values, I end up rethinking my
    strategy and rewriting my code to be better Object
    Oriented.I'd personally say you're usually right. There's almost always a O-O way of avoiding the situation.
    Sometimes though, you really do just want to return "two ints" from a function. There's no logical object you can think of to put them in. So you end up polluting the namespace:
    public class MyUsefulClass {
    public TwoInts calculateSomething(int a, int b, int c) {
    public static class TwoInts {
        //now, do I use two public int fields here, making it
        //in essence a struct?
       //or do I make my two ints private & final, which
       //requires a constructor & two getters?
      //and while I'm at it, is it worth implementing
      //equals(), how about hashCode()? clone()?
      //readResolve() ?
    }The answer to most of the questions for something as simple as "TwoInts" is usually "no: its not worth implementing those methods", but I still have to think about them.
    More to the point, the TwoInts class looks so ugly polluting the top level namespace like that, MyUsefulClass.TwoInts is public, that I don't think I've ever actually created that class. I always find some way to avoid it, even if the workaround is just as ugly.
    For myself, I'd like to see some simple pass-by-value "Tuple" type. My fear is it'd be abused as a way for lazy programmers to avoid creating objects when they should have a logical type for readability & maintainability.
    Anyone who has maintained code where someone has passed in all their arguments as (mutable!) Maps, Collections and/or Arrays and "returned" values by mutating those structures knows what a nightmare it can be. Which I suppose is an argument that cuts both ways: on the one hand you can say: "why add Tuples which would be another easy thing to abuse", on the other: "why not add Tuples, given Arrays and the Collections framework already allow bad programmers to produce unmainable mush. One more feature isn't going to make a difference either way".
    Ho hum.

  • Extensions like Ghostery, WOT or AdBlock stop working after two or three times. Restarting the webpage in a new tab the extensions will work again for several times and then stop again. Has anybody an explanation or a workaround for this bug in Safari 5?

    Extensions like Ghostery, WOT or AdBlock stop working after two or three times. Restarting the webpage in a new tab the extensions will work again for several times and then stop again. Has anybody an explanation or a workaround for this bug in Safari 5?

    Remove the extensions, redownload Safari, reload the extensions.
    http://www.apple.com/safari/download/
    And if you really want a better experience, use Firefox, tons more choices and possibilities there.
    Firefox's "NoScript" will block the Trojan going around on websites. Best web security you can get.
    https://addons.mozilla.org/en-US/firefox/addon/noscript/
    Ghostery, Ad Block Plus and thousands of add-ons more have originated on Firefox.

Maybe you are looking for

  • How to embed PDF document to a view in WDJ?

    Hi, experts, I have a PDF document for helping user to use a software product. I want to embed it to a view through interactiveform in web dynpro for java so that other users may read the PDF document. I don't how to implement it? Do you give me some

  • PASS DATE as parameter

    Hi all, I have a mapping which i need to pass in 2 DATE parameters, i try in OWB with TO_DATE('1-Jan-1990') and TO_DATE('1-Jan-2010') and i get result as my expected. But when i try to run the mapping sqlplus with following statement, I get differenc

  • Image size jumps from 10.3mp to 58.9mp?

    I shoot DNG in camera at 10.3mp. When opened in CC and I go to image size it is suddenly 58.9mp but only 11.9in by 9.6in in size.  Why?  I am looking to get a 16x20 print out of it with oul loss of image quality.

  • I can not delete unwanted message because I am not getting the delete button popup to activate deletion. Where did it go!?

    I can not delete unwanted emails because my delete prompt button is not appearing after I prompt edit and choose my email to edit. How do I make the prompt button to appear on edit page as before?    Thanks MRH

  • Generate clients for multiple WSLDs using 'clientgen' task.

    Issue - I am trying to generate WS clients for multiple Services(WSDLs). I am using 'clientgen' task. But a 'clientgen'task accepts only one WSDL. If I have more one that one 'clientgen' task, some of the common classes (generated) are overwritten. F