PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Segmentation Fault with ODBC SQL Query  (Read 801 times)

JimGwynn

  • Member
  • **
  • Posts: 16
    • View Profile
Segmentation Fault with ODBC SQL Query
« on: August 10, 2020, 05:42:04 PM »
I am getting a segmentation fault when querying an SQL database using the ODBC connection but only when there is a space in the query parameter

Here is my program

0005 BEGIN
0010 LET FROMFILE$="vw_ConcordFullData", SQLUSER$="windx", SQLPASS$="********"
0040 OPEN (HFN,IOL=*)"[ODB]webmssql;"+FROMFILE$+";USER="+SQLUSER$+";PSWD="+SQLPASS$+";NONULLS=1"; LET SQLCHAN=LFO
REM 0070 SELECT * FROM SQLCHAN WHERE MAINCATEGORY$ = "BINDING" ! Works fine
0070 SELECT * FROM SQLCHAN WHERE MAINCATEGORY$ = "BINDING POST" ! Gives Seg Fault
0075 PRINT PARTNUMBER$,@(30),TAXONOMY$
0080 NEXT RECORD
0090 CLOSE (SQLCHAN)

here is the crash dump

Aug 10 14:53 [<sigterm>:50] Segmentation fault
Aug 10 14:53 [<sigterm>:50]  - ERR=0 CTL=0 RET=267 LFA=32767 LFO=32767
Aug 10 14:53 [<sigterm>:50]  - Last path used: [ODB]webmssql;vw_ConcordFullData;
USER=windx;
Aug 10 14:53 [<sigterm>:50] --- Program stack ---
Aug 10 14:53 [<sigterm>:50]  - STK(0) = line 00050 in /home/CDSv67.7bin/SQLTEST
Aug 10 14:53 [<sigterm>:50]    - FILE..... 00070
Aug 10 14:53 [<sigterm>:50] --- Files ---
Aug 10 14:53 [<sigterm>:50]  - PTH(0) = /dev/pts/31
Aug 10 14:53 [<sigterm>:50]  - PTH(32767) = [ODB]webmssql;vw_ConcordFullData;USE
R=windx;
Aug 10 14:53 [<sigterm>:50] --- Err() Info ---
Aug 10 14:53 [<sigterm>:50]        Current Err:15 Prog: /home/CDSv67.7bin/SQLTES
T Stno: 50 LFA: 0 LastPath: SYGERR (pvxsub.c@1433)
Aug 10 14:53 [<sigterm>:50] --- Stack dump ---
Aug 10 14:53 [<sigterm>:50] /lib64/libc.so.6(+0x36400) [0x7f53dfe98400]
Aug 10 14:53 [<sigterm>:50] /lib64/libc.so.6(+0x14cbb0) [0x7f53dffaebb0]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x58288a]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x57a681]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x579a54]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x574c3d]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x46754b]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x40d7ee]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x40d421]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x406a3b]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x405665]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x403fee]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x403bbe]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x403a56]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x403841]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x4e4401]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x4e4339]
Aug 10 14:53 [<sigterm>:50] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f53dfe8
4555]
Aug 10 14:53 [<sigterm>:50] pxplus() [0x403641]

« Last Edit: August 10, 2020, 05:47:01 PM by JimGwynn »

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Segmentation Fault with ODBC SQL Query
« Reply #1 on: August 11, 2020, 08:14:11 AM »
I would suggest creating a help desk ticket to report the error. Make sure to include as much info as you can in the ticket to help us get to the bottom of the issue quicker. Things like your PxPlus serial number, PxPlus version, windX or local, key and field definition of the table etc.

https://helpdesk2.pvxplus.com/open.php
Principal Software Engineer for PVX Plus Technologies LTD.