DATA Step, Macro, Functions and more

Win 7 9.4M4 "sas.exe has stopped working" at startup

Reply
PROC Star
Posts: 1,434

Win 7 9.4M4 "sas.exe has stopped working" at startup

[ Edited ]

Hi All,

 

I'm having an intermittent error where when I launch a new session of SAS 9.4M4 on a Win 7 PC, I get the error "sas.exe has stopped working."  It happens on occasion (<5% of the time, I'd say), both when starting an interactive session and when starting a batch session. I haven't been able to reproduce it reliably, and haven't been able to get a log file from it. When it happens, if I immediately repeat the command (i.e. either double click the SAS icon to start DM SAS session, or resubmit the batch job), it runs fine.  So it has the feel of a file locking problem (like an anti-virus scan locking some file that SAS wants to read, or some file backup process locking a file).  The only time I get this error is during startup.

 

I suspect I'll have to contact tech support, but thought I'd throw it out to the group first to see if it sounded familiar.  And if anyone has hints for SAS or Windows logs I should look for.

 

It's possible that it started happening recently when I installed 64-bit 9.4M4 on a PC that previously had 9.4M3 and 9.3.  But honestly, I haven't been using DM SAS much in the past year, so that could be a red herring (i.e. false lead).    I have also seen the error when starting 9.3 on the same PC.  Since it happens when starting both an interactive session and a batch session, it seems like it is not the error reported in http://support.sas.com/kb/54/246.html.

 

Thanks,

--Q.

 

 

SASstoppedWorking.PNG

Super User
Posts: 10,623

Re: Win 7 9.4M4 "sas.exe has stopped working" at startup

Quentin,
I don't know if the following could solve your problem. 
But deserve a try.

Right click sas icon and select Run As Administrator  .

Super User
Posts: 13,084

Re: Win 7 9.4M4 "sas.exe has stopped working" at startup

Do have an autoexec.sas that does anything more interesting than setting libraries or such? Maybe something in there is running into a problem.

PROC Star
Posts: 1,434

Re: Win 7 9.4M4 "sas.exe has stopped working" at startup

No, no autoexec.  My config file does point sasautos toward a directory on a network share.  It's possible those files are being backed up or virus scanned. But I wouldn't think that would crash SAS.

PROC Star
Posts: 1,434

Re: Win 7 9.4M4 "sas.exe has stopped working" at startup

I put in a ticket to tech support, will follow-up with any useful resolution.

 

Today I wrote a little macro that uses SYSTASK to spawn &n SAS batch jobs in series, where each batch job is a trivial SAS program. 

 

%macro spawn(n);
%local i mystatus;

%do i=1 %to &n;
  systask command """%sysget(SASROOT)\sas.exe"" -noterminal
                  -sysin ""Q:\Junk\SASbug\sample.sas""
                  -log   ""Q:\Junk\SASbug\sample_%now(datetime=1,format=b8601dt15).log""
                  -sysparm ""blah""
                  "
                  status=mystatus wait
                  ;
                  
  %put Loop &i ;
  %put >>&sysrc<<;
  %put >>&mystatus<<;
  %if NOT (&sysrc=0 and &mystatus=0) %then %put ER%str()ROR: (%nrstr(%%)&sysmacroname) ;

  %let mystatus=;

  data _null_;
    y=sleep(1);
  run;
%end;

%mend spawn;

%spawn(5)

 

 

I ran it 500 times, and got the error twice (on consecutive runs, interestingly).

 

When it errored, the status returned by systask was -1073741819.  I googled a bit, apparently it's a fairly generic Windows error code.  I'm running Windows 7, I found a few hits from google but nothing too exciting.

 

The Q:\ drive where I have the code stored is a network drive, I'm going to try running it a few more times there and see if I can get the problem again, and also try running the same test from a local drive.  I suppose it's possible that it's a networking hiccup.

PROC Star
Posts: 1,434

Re: Win 7 9.4M4 "sas.exe has stopped working" at startup

I checked the Windows logs in the Event Viewer.  When SAS fails to start, it does log an error there:

 

Faulting application name: sas.exe, version: 9404.0.22563.55383, time stamp: 0x5823d872
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0000000000000000
Faulting process id: 0x1a2c
Faulting application start time: 0x01d354e02d99d0a1
Faulting application path: C:\Program Files\SASHome2\SASFoundation\9.4\sas.exe
Faulting module path: unknown
Report Id: 6b8b6451-c0d3-11e7-8301-30e171976bdf

 

Unfortunately, the exception code seems fairly generic.  I'm going to try running it repeatedly on a local drive and the network drive.  If it only happens on the network drive, I'll probably ascribe it to an annoying virus scan or backup.

Ask a Question
Discussion stats
  • 5 replies
  • 226 views
  • 0 likes
  • 3 in conversation