SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 67406: A segmentation violation might occur when you query a SAS® view with a SELECT COUNT(*) clause

DetailsHotfixAboutRate It

A segmentation violation can occur when the following is true:

  • You define a SAS view of a database management system (DBMS) table with a combination of DISTINCT, CATX, and ORDER BY functions.
  • You then run a query that includes a SELECT COUNT(*) clause against the SAS view.

Here is an example of the SAS view definition:

proc sql;
create view work.test as
  select  distinct (catx(" ", Make, Model)) as Make_Model from dbmslib.cars
order by Make_Model;
quit;

Here is an example of the query against the SAS view:

proc sql noprint;
   select count(*) into :_anz
   from work.test
   ;
quit;

The segmentation violation might look similar to the following:

ERROR:  An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [SQL     ]
Segmentation Violation
Traceback of the Exception:
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sas(+0x16844e) [0x7f68ffaf444e]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sas(+0x4ee1f) [0x7f68ff9dae1f]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/tkmk.so(bkt_signal_handler+0x144) [0x7f68fddcdac4]
/lib64/libpthread.so.0(+0x3d36c0f790) [0x7f68ff33e790]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlu(+0x23eff) [0x7f68c6175eff]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlu(+0x22ac3) [0x7f68c6174ac3]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlu(+0x2f9d8) [0x7f68c61819d8]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlu(+0x391a1) [0x7f68c618b1a1]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlu(sqltxt2+0x51e) [0x7f68c616711e]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlp(+0x5089d) [0x7f68c640d89d]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlp(sqlpsel+0xfb6) [0x7f68c640c5f6]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlp(sqlplan+0x219) [0x7f68c63f8de9]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqlp(sqlprep+0x3ee) [0x7f68c642a89e]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqx(+0x3be91) [0x7f68c6dc4e91]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassqx(sqlloop+0x417) [0x7f68c6dc4617]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sassql(sassql+0x362) [0x7f68c7416402]
/home/sas/sas94m6/SASFoundation/9.4/sasexe/sas(vvtentr+0x18a) [0x7f68ff9da97a]
/lib64/libpthread.so.0(+0x3d36c07a51) [0x7f68ff336a51]
/lib64/libc.so.6(clone+0x6d) [0x7f68fe9c496d]

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASz/OS9.4_M69.4_M89.4 TS1M69.4 TS1M8
z/OS 64-bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft® Windows® for x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8 Enterprise 32-bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8 Enterprise x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8 Pro 32-bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8 Pro x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8.1 Enterprise 32-bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8.1 Enterprise x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8.1 Pro 32-bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 8.1 Pro x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows 109.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows Server 20089.4_M69.4 TS1M6
Microsoft Windows Server 2008 R29.4_M69.4 TS1M6
Microsoft Windows Server 2008 for x649.4_M69.4 TS1M6
Microsoft Windows Server 2012 Datacenter9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows Server 2012 R2 Datacenter9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows Server 2012 R2 Std9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows Server 2012 Std9.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows Server 20169.4_M69.4_M89.4 TS1M69.4 TS1M8
Microsoft Windows Server 20199.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Enterprise 32 bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Enterprise x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Home Premium 32 bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Home Premium x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Professional 32 bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Professional x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Ultimate 32 bit9.4_M69.4_M89.4 TS1M69.4 TS1M8
Windows 7 Ultimate x649.4_M69.4_M89.4 TS1M69.4 TS1M8
64-bit Enabled AIX9.4_M69.4_M89.4 TS1M69.4 TS1M8
64-bit Enabled Solaris9.4_M69.4_M89.4 TS1M69.4 TS1M8
HP-UX IPF9.4_M69.4_M89.4 TS1M69.4 TS1M8
Linux for x649.4_M69.4_M89.4 TS1M69.4 TS1M8
Solaris for x649.4_M69.4_M89.4 TS1M69.4 TS1M8
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.