Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL2VJ-0005ds-0Y for pgsql-odbc@arkaria.postgresql.org; Wed, 23 Sep 2020 11:00:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kL2VH-0008Cj-T2 for pgsql-odbc@arkaria.postgresql.org; Wed, 23 Sep 2020 11:00:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL2VH-0008Cc-Ga for pgsql-odbc@lists.postgresql.org; Wed, 23 Sep 2020 11:00:03 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kL2VE-00075h-HG for pgsql-odbc@postgresql.org; Wed, 23 Sep 2020 11:00:02 +0000 Received: by mail-pj1-x102e.google.com with SMTP id bw23so3038135pjb.2 for ; Wed, 23 Sep 2020 04:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=ocM2jpfFIjezj4cG6CSy21IAoFUpxGisQGLa6qZvrZs=; b=kyQLGOJljTGl3+ED6XFEJdPXBbrn6Ua//3UnJhv5BFmInSjZ5uWXLohCi4c9+ThIOr +3wEjQaXjCpPxAcIczJAhfcLik/5w2wzWczRBNos/4xcOstCx1kpc0w09k3d/1YcTvVA JWgzvjJedgbrrGh4HwyQO3briutbA3yfpqSnlZJUjHwuxDw1WRA/2vVzNfNsN91XMu+Q CWrwqC6nt3Osm/tPgOcE+oj4GdZK7dCiJoxhiVQZQW3Il3vrd+pG04ZxlwbqZHgzfQaU cJ2RIW2uWxcoLQHiQy4EIyg8kxbaiWpXe1UZsnVaKz9ZnPw1Gr3Ir6CgY/OGebqPUrKO IAXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ocM2jpfFIjezj4cG6CSy21IAoFUpxGisQGLa6qZvrZs=; b=nyaNLvYtvy3oc0nEsA/1Hz/mXzb7H75v6RINvAd80niN5SnEU2dqBzJWjpsiZMjK/3 xFMCjnwpeZAZU7Rj3QZms5O3cMYgwc0H+JD2EV6/Ngd0s5Gy2oK9hNWEmvS/uQiRpAEO 6TYbLs67ooz/8SN5SWFrC9tqr+aNnbcdaRINLmhU0UpdRuJViLhDFpyTaOVqAe+jf76J IOH1Z0+QAuF/6REL7UqEQqBdtfo1HDl+Mv5nOUdKy7VfKl3Cq0VYMfAyitTvAaR0Q9jE R6uuil8Wo/DlkJOR4TYUWNmp8AYfWBlzkeDNt0IZuqClsa7DGJCwZ6UPcL2uxreSgrFo mrDw== X-Gm-Message-State: AOAM533b333yav+g+PrOdpdQWjPXdDlklgvHUd1C7PHIDorsY46g4WN9 5hgaLjpU7czhl/iWLIUUr2d1w8SCK8z8AA== X-Google-Smtp-Source: ABdhPJwFTjNPVw23mtuCB/m6poPukpmPH5tGfmyAlV6hdKKwqOlDscPhIfRcQf63DkjSUkMGd49VfA== X-Received: by 2002:a17:90a:e697:: with SMTP id s23mr7727929pjy.175.1600858798844; Wed, 23 Sep 2020 03:59:58 -0700 (PDT) Received: from ?IPv6:240f:a2:1c7e:1:e85e:4727:b6b0:a6e2? ([240f:a2:1c7e:1:e85e:4727:b6b0:a6e2]) by smtp.gmail.com with ESMTPSA id k27sm7679893pgm.29.2020.09.23.03.59.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Sep 2020 03:59:58 -0700 (PDT) Subject: Re: Crashing with copy_and_convert_field To: Henrik Krohns Cc: pgsql-odbc@postgresql.org References: <20200824144131.GA32577@hege.li> <20200901043648.GA2161@hege.li> <20200920080114.GA9518@hege.li> <20200922080031.GA32213@hege.li> From: "Inoue,Hiroshi" Message-ID: Date: Wed, 23 Sep 2020 19:59:55 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200922080031.GA32213@hege.li> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Henrik, On 2020/09/22 17:00, Henrik Krohns wrote: > Compiled fresh stack with unixODBC 2.3.9 / libpq 12.4 / psqlodbc git, with > debugging info. > > Actually I can reproduce this with simple isql help command, forget the > previous Oracle stuff. I guess it's related to Solaris 11 somehow, I've > tried both Solaris Studio 12.6 and GCC 9.3 for compiling. Maybe I'll try > compiling later on Linux if it's the same. Could you show me config.h and config.log? regards, Hiroshi Inoue > > > $ isql linkkitesti ... > +---------------------------------------+ > | Connected! | > | | > | sql-statement | > | help [tablename] | > | quit | > | | > +---------------------------------------+ > SQL> select * from testitaulu; > +---------------------------------------------------+ > | foo | > +---------------------------------------------------+ > | bar | > +---------------------------------------------------+ > SQLRowCount returns -1 > 1 rows fetched > SQL> help testitaulu > Bus Error (core dumped) > > > (gdb) where > #0 copy_and_convert_field (stmt=0x100147280, field_type=26, atttypmod=-1, valuei=0x100131a30, fCType=4, precision=0, rgbValue=0xffffffff7fffe9cc, cbValueMax=4, pcbValue=0x0, pIndicator=0x0) at convert.c:1887 > #1 0xfffffffef464e218 in copy_and_convert_field_bindinfo (stmt=0x100147280, field_type=26, atttypmod=-1, value=0x100131a30, col=11) at convert.c:785 > #2 0xfffffffef46a3e38 in SC_fetch (self=0x100147280) at statement.c:1814 > #3 0xfffffffef4682a28 in PGAPI_Fetch (hstmt=0x100147280) at results.c:1212 > #4 0xfffffffef462cd24 in PGAPI_Columns (hstmt=0x1001451a0, szTableQualifier=0x0, cbTableQualifier=0, szTableOwner=0x0, cbTableOwner=0, szTableName=0x100131650 "testitaulu", cbTableName=-3, szColumnName=0x0, cbColumnName=0, flag=2, reloid=0, attnum=0) at info.c:2588 > #5 0xfffffffef46b5a18 in SQLColumns (StatementHandle=0x1001451a0, CatalogName=0x0, NameLength1=0, SchemaName=0x0, NameLength2=0, TableName=0x100131650 "testitaulu", NameLength3=-3, ColumnName=0x0, NameLength4=0) at odbcapi.c:125 > #6 0xfffffffef4827b18 in SQLColumns (statement_handle=0x100144b10, catalog_name=0x0, name_length1=0, schema_name=0x0, name_length2=0, table_name=0x100131650 "testitaulu", name_length3=-3, column_name=0x0, name_length4=0) at SQLColumns.c:369 > #7 0x0000000100007bac in ExecuteHelp (hDbc=0x100115600, szSQL=0x100110f20 "help testitaulu", cDelimiter=0 '\000', bColumnNames=0, bHTMLTable=0) at isql.c:1212 > #8 0x00000001000050e0 in main (argc=5, argv=0xffffffff7ffff608) at isql.c:500 > > > enterprisedb@linkkitesti=# \d testitaulu > Table "public.testitaulu" > Column | Type | Collation | Nullable | Default > --------+-----------------------+-----------+----------+--------- > foo | character varying(50) | | not null | > > enterprisedb@linkkitesti=# select version(); > version > ----------------------------------------------------------------------------------------------------------------------------------------------- > PostgreSQL 12.4 (EnterpriseDB Advanced Server 12.4.5) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit > > > Cheers, > Henrik > > > On Sun, Sep 20, 2020 at 11:01:14AM +0300, Henrik Krohns wrote: >> TL;DR psqlodbc is dumping core regarding copy_and_convert_field. No one >> here can help debug it? >> >> On Tue, Sep 01, 2020 at 07:36:48AM +0300, Henrik Krohns wrote: >>> Any developer around? >>> >>> >>> On Mon, Aug 24, 2020 at 05:41:31PM +0300, Henrik Krohns wrote: >>>> Hello, >>>> >>>> I've been trying to get Oracle 18c -> EnterpriseDB 12.4 ODBC connection >>>> working without success.. >>>> >>>> Compiled unixODBC 2.3.7 / libpq 12.2 / psqlodbc 12.02 stack for our Oracle >>>> server, running Solaris 11.4 SPARC. >>>> >>>> >>>> Basic conf: >>>> >>>> >>>> ### ORACLE_HOME/hs/admin/initLINKKITESTI.ora >>>> HS_FDS_CONNECT_INFO = linkkitesti >>>> HS_FDS_TRACE_LEVEL = 255 >>>> HS_FDS_SHAREABLE_NAME = /opt/unixODBC/lib/libodbc.so >>>> >>>> ### odbc.ini >>>> [linkkitesti] >>>> Driver = PostgreSQL >>>> Database = linkkitesti >>>> Servername = ppas.server.com >>>> Port = 5432 >>>> UseDeclareFetch = 1 >>>> Debug = 1 >>>> LowerCaseIdentifier = 1 >>>> >>>> ### odbcinst.ini >>>> [PostgreSQL] >>>> Description = PostgreSQL ODBC driver >>>> Driver = /opt/unixODBC/lib/psqlodbcw.so >>>> Setup = /opt/unixODBC/lib/libodbcpsqlS.so >>>> FileUsage = 1 >>>> >>>> >>>> Results in: >>>> >>>> >>>> Connected to: >>>> Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production >>>> Version 18.11.0.0.0 >>>> >>>> SQL> create database link linkkitesti connect to "linkkitesti" identified by "xxxx" using 'LINKKITESTI'; >>>> >>>> Database link created. >>>> >>>> SQL> select * from "testitaulu"@linkkitesti; >>>> select * from "testitaulu"@linkkitesti >>>> * >>>> ERROR at line 1: >>>> ORA-28511: lost RPC connection to heterogeneous remote agent using >>>> SID=ORA-28511: lost RPC connection to heterogeneous remote agent using >>>> SID=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1522)) >>>> )(CONNECT_DATA=(SID=LINKKITESTI))) >>>> ORA-02063: preceding line from LINKKITESTI >>>> >>>> >>>> >>>> Getting core dump with references to copy_and_convert_field function. The >>>> test table I have contains nothing but single varchar col with short string. >>>> >>>> Here's bunch of odbc/oracle trace files: >>>> >>>> https://pastebin.com/RMG5V5vR >>>> https://pastebin.com/NGtt9hmN >>>> https://pastebin.com/6Nea2emc >>>> https://pastebin.com/8qfjsMJw >>>> >>>> >>>> I've tried playing with all sorts of HS_ language settings etc, nothing >>>> makes a difference. Downgrading way back to psqlodbc-10.03.0000 stops >>>> crashing, but the query fails anyway with other errors. >>>> >>>> Cheers, >>>> Henrik >>>> >>>> >