You're staring at OSS_CANT_CLOSE_TRACE_FILE (0X8009302E) and OSS ASN just refuses to finish whatever it was doing. Annoying, but it's almost always a locked or inaccessible trace file, not a broken install.
Quick fix: three things, in this order
- Close any running OSS ASN processes and services.
- Fix permissions on the trace folder.
- Clear the stale trace file and try again.
1. Stop OSS ASN and anything holding the folder
Open an elevated Command Prompt and run:
taskkill /F /IM ossasn.exe
taskkill /F /IM osssvc.exe
net stop "OSS ASN Service"
The exe names vary by version (older builds use ossn.exe or ossagent.exe) — check Task Manager if those don't match. You'll know you found the right one because the trace file stops growing in File Explorer.
2. Fix the trace folder permissions
The trace file lives under C:\ProgramData\OSS\ASN\Trace\ on most installs. If the current user or SYSTEM doesn't have Modify rights, the app opens the file but can't close it cleanly — which is exactly what 0X8009302E means.
icacls "C:\ProgramData\OSS\ASN\Trace" /grant "SYSTEM:(OI)(CI)M" /T
icacls "C:\ProgramData\OSS\ASN\Trace" /grant "%USERNAME%:(OI)(CI)M" /T
If you're on a domain, drop the username line and use the service account instead. Network service accounts are the usual suspect when this shows up on managed machines.
3. Nuke the stuck trace file
Delete it. Don't rename it, don't archive it — kill it:
del /F /Q "C:\ProgramData\OSS\ASN\Trace\*.trc"
del /F /Q "C:\ProgramData\OSS\ASN\Trace\*.log"
If del says the file is in use, something still has a handle on it. Grab Sysinternals Handle and find the culprit:
handle.exe "C:\ProgramData\OSS\ASN\Trace"
Nine times out of ten it's the OSS ASN service itself that didn't shut down, or an antivirus real-time scanner sitting on the file. Kill the handle, re-run the delete, then relaunch OSS ASN.
Why this works
OSS ASN opens a trace file when it starts up and writes to it continuously. When it shuts down — or when a specific operation ends — it tries to flush and close that handle. If the file is locked by another process, or the folder permissions don't allow the closing write, the close call returns an error and bubbles up as 0X8009302E.
The error message is misleading. It sounds like OSS ASN can't close the file because it lost track of it. In practice, it's the OS refusing the close because someone else has a lock or the ACL blocks it. Fix the lock and the permissions, and the close succeeds.
Had a client last month whose entire backup job died at 2am every night with 0X8009302E. Turned out their endpoint protection was scanning the OSS trace folder on every file write. Whitelisting C:\ProgramData\OSS\ASN\Trace ended a two-week headache.
Less common variations
Error shows up mid-install
Some OSS ASN versions write a trace during setup. If install fails with this code, the installer's working directory is usually the victim. Run the MSI from a local path (not a network share or OneDrive-synced folder) and temporarily disable real-time AV during install.
Happens only on network drives or redirected folders
If your IT team redirected %ProgramData% or the app's data path to a UNC share, SMB locking semantics will bite you. The fix is to leave OSS ASN's trace path on a local disk. Edit the config (usually ossasn.ini) and pin TracePath=C:\ProgramData\OSS\ASN\Trace. Don't fight SMB.
Errors on Windows Server 2016/2019 with Defender ATP
Defender's Attack Surface Reduction rules occasionally flag trace writes as suspicious. Add an exclusion for the OSS ASN process and the trace folder:
Add-MpPreference -ExclusionPath "C:\ProgramData\OSS\ASN\Trace"
Add-MpPreference -ExclusionProcess "ossasn.exe"
Disk full or read-only volume
Obvious but easy to miss. If the drive hosting the trace folder is out of space or remounted read-only (BitLocker recovery, failed snapshot), the close fails. Check with fsutil volume diskfree C: and confirm the volume isn't in a dirty state.
File locked by your own backup software
VSS-based backups shouldn't lock trace files, but file-level agents will. If this only happens during your backup window, exclude the trace folder from file-level backups. Easy test: change the OSS ASN task to run outside the backup window and see if the error disappears.
Prevention
- Whitelist the trace folder in your AV. This single change kills most recurring 0X8009302E errors I see in the field.
- Set a rotating trace policy. Trace files that grow forever are more likely to be locked by scanners and backup agents. Cap them at 50–100 MB and rotate.
- Run OSS ASN as a dedicated service account with explicit Modify rights on the trace folder. Don't rely on inherited permissions from ProgramData.
- Don't redirect ProgramData to a network share. I've never seen this end well for apps that write high-frequency trace files.
- Keep the install off OneDrive, Dropbox, and similar sync folders. The sync client will hold file handles and you'll be back here next week.
- Monitor disk space on the trace volume. A full disk causes this exact error and looks like a permissions problem if you're not paying attention.
If you've done all of the above and it still fails, run procmon.exe filtered on the OSS ASN process and the trace path. The Result column will show you the exact ACCESS DENIED or SHARING VIOLATION behind the close call. That's the fastest way to find the process still holding the lock.