SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 56979: A segmentation violation or Read access violation might occur when you are accessing a DBMS table via the SQL procedure

DetailsHotfixAboutRate It

A segmentation violation or a Read access violation error can occur when the following is true:

  • You have an SQL view that references a database management system (DBMS) table and creates a new variable constant.
  • You have a second SQL view that references a different DBMS table.
  • You have a third SQL view that
    • contains the constant variable that was created in the first SQL view, and this variable is included in the SELECT clause along with a column modifier like length, format, or label
    • joins the first and second SQL views with two other DBMS tables referenced with a LIBNAME engine, and
    • contains a WHERE clause that is used to subset the results of the joins.
  • And you have a fourth SQL view that references the third SQL view and renames the constant variable in the SELECT clause.

The segmentation violation might look similar to the following:

Segmentation Violation In Task [ DATASTEP ]
sqltxt2+0x1f10c             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqludf+0x065a0              - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x264fc             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x31934             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqludf+0x07430              - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x30034             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x0d8a8             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x15abc             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x0085c             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqltxt2+0x0034c             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlu
sqlpnas+0x01268             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlp
sqlpsel+0x021ec             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlp
sqlplan+0x00044             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlp
sqlprep+0x00618             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sassqlp
esoopen+0x00658             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasesql
yyoopen+0x04c48             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasyoio
yoopen+0x00554              - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasyoio
dsdbivl+0x0023c             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasdsa
dscdsio+0x01628             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasdsc
ysprstm+0x00d14             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasxshel
dsccomp+0x00498             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasdsc
sasds+0x00270               - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sasds
vvtentr+0x00130             - /sas/10101_sas92ebidi/SASFoundation/9.2/sasexe/sas
___makecontext_v2+0x00108   - /lib/sparcv9/libc.so.1

The Read access 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 [DATASTEP]
ERROR:  Read Access Violation DATASTEP
Exception occurred at (28FED171)
Task Traceback
Address   Frame     (DBGHELP API Version 4.0 rev 5)
0000000028FED171  00000000071B9030  sassqlu:tkvercn1+0x2C131
0000000028FEF919  00000000071B9320  sassqlu:tkvercn1+0x2E8D9
0000000028FEA64C  00000000071B95D0  sassqlu:tkvercn1+0x2960C
0000000028FD5717  00000000071B9800  sassqlu:tkvercn1+0x146D7
0000000028FDDED1  00000000071B9AA0  sassqlu:tkvercn1+0x1CE91
0000000028FE58C8  00000000071B9C20  sassqlu:tkvercn1+0x24888
0000000028FCB8BA  00000000071BA180  sassqlu:tkvercn1+0xA87A
000000002989EA14  00000000071BA188  sassqlp:tkvercn1+0x3D9D4
000000002989D41E  00000000071BAB00  sassqlp:tkvercn1+0x3C3DE
000000002988EA92  00000000071BACF0  sassqlp:tkvercn1+0x2DA52
00000000298BD50D  00000000071BADF0  sassqlp:tkvercn1+0x5C4CD
0000000029C218D4  00000000071BADF8  sasesql:tkvercn1+0x894
0000000029808C1D  00000000071BB068  sasyoio:tkvercn1+0x17BDD
00000000298051A1  00000000071BEFB0  sasyoio:tkvercn1+0x14161
000000002999D33B  00000000071BEFB8  sasdsa:tkvercn1+0xC2FB
00000000299CBE77  00000000071BF1D8  sasdsc:tkvercn1+0xAE37
0000000004D7075B  00000000071BF2A8  sasxshel:tkvercn1+0x4F71B
00000000299C1286  00000000071BFC50  sasdsc:tkvercn1+0x246
000000002997124A  00000000071BFC58  sasds:tkvercn1+0x20A
0000000003868FD7  00000000071BFCB8  sashost:Main+0xF917
000000000386D61D  00000000071BFF50  sashost:Main+0x13F5D
00000000772F5A4D  00000000071BFF58  kernel32:BaseThreadInitThunk+0xD
000000007742B831  00000000071BFF88  ntdll:RtlUserThreadStart+0x21

To work around this issue, create intermediate tables rather than views.

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



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.2 TS2M39.4 TS1M3
Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS2M3
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS2M3
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS2M3
Microsoft Windows XP 64-bit Edition9.2 TS2M3
Microsoft® Windows® for x649.2 TS2M39.4 TS1M3
Microsoft Windows Server 2003 Datacenter Edition9.2 TS2M3
Microsoft Windows Server 2003 Enterprise Edition9.2 TS2M3
Microsoft Windows Server 2003 Standard Edition9.2 TS2M3
Microsoft Windows Server 2003 for x649.2 TS2M3
Microsoft Windows Server 20089.2 TS2M39.4 TS1M3
Microsoft Windows Server 2008 R29.2 TS2M39.4 TS1M3
Microsoft Windows Server 2008 for x649.2 TS2M39.4 TS1M3
Microsoft Windows XP Professional9.2 TS2M3
Windows 7 Enterprise 32 bit9.2 TS2M39.4 TS1M3
Windows 7 Enterprise x649.2 TS2M39.4 TS1M3
Windows 7 Home Premium 32 bit9.2 TS2M39.4 TS1M3
Windows 7 Home Premium x649.2 TS2M39.4 TS1M3
Windows 7 Professional 32 bit9.2 TS2M39.4 TS1M3
Windows 7 Professional x649.2 TS2M39.4 TS1M3
Windows 7 Ultimate 32 bit9.2 TS2M39.4 TS1M3
Windows 7 Ultimate x649.2 TS2M39.4 TS1M3
Windows Vista9.2 TS2M3
Windows Vista for x649.2 TS2M3
64-bit Enabled AIX9.2 TS2M39.4 TS1M3
64-bit Enabled HP-UX9.2 TS2M39.4 TS1M3
64-bit Enabled Solaris9.2 TS2M39.4 TS1M3
HP-UX IPF9.2 TS2M39.4 TS1M3
Linux9.2 TS2M39.4 TS1M3
Linux for x649.2 TS2M39.4 TS1M3
OpenVMS on HP Integrity9.2 TS2M39.4 TS1M3
Solaris for x649.2 TS2M39.4 TS1M3
* 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.