yesterday
I am performing encryption over 40M records using serverless compute. The code is working fine on 50 records but failing on 40M while displaying and selecting as well but sometimes it is working and showing results.
Error:
Job aborted due to stage failure: com.databricks.sql.io.FileReadException: Error while reading file s3://mercury-dev-data-forge-bucket/__unitystorage/catalogs/770bafe/tables/e514sadasdsadsaf/part-00013-cf2821e8-a549-4f08-adhgdf-b0a540.c000.zstd.parquet.
Sometimes I am able to run it without any errors, and other times I get this error. Why is that?
7 hours ago
Hi @rs5 ,
Could you provide full stack trace of the exception?
6 hours ago - last edited 6 hours ago
On S3, one possibility is that some of the data files are missing, which can happen for various reasons.
As a first step, could you check whether the file mentioned in the error actually exists in S3?
s3://mercury-dev-data-forge-bucket/__unitystorage/catalogs/770bafe/tables/e514sadasdsadsaf/part-00013-cf2821e8-a549-4f08-adhgdf-b0a540.c000.zstd.parquet
If the file exists, another test I would recommend is running the same query on a dedicated cluster instead of serverless.
Please let us know the results. These steps should help us narrow down the root cause.
4 hours ago
I have checked the files are available on s3 and same issue on another cluster. Also checked the permissions which are fine.
4 hours ago - last edited 3 hours ago
Thanks, have you tried using a dedicated cluster or another serverless?
Also, it could be that the files have been archived and while visible to you not visible from Databricks.
You can try running these on the exact file from the error, ideally with the same IAM role your Unity Catalog storage credential uses?
aws s3api head-object --bucket mercury-dev-data-forge-bucket --key <path-to-failing-part-file>
aws s3 cp s3://mercury-dev-data-forge-bucket/<path-to-failing-part-file> /tmp/test.parquet
Please share:
1. The head-object output, in particular StorageClass, ArchiveStatus (if present) and SSEKMSKeyId.
2. Whether aws s3 cp succeeds, or the exact error it returns.
3. The full stack trace, especially the innermost Caused by with the S3 error code (AccessDenied / ExpiredToken / InvalidObjectState / KMS).
4. Whether the failing file is always the same one, or a different file each time.
4 hours ago
I had something similar on serverless, turned out not to be a "real" permissions problem on the whole table, just some files.
the 50 record test probably reads 1-2 files, 40M reads all of them, so you only hit the bad one on the big run. thats why it looks random. couple things id check:
easiest way to know for sure is CloudTrail, filter on that object key and the time of the error, it tells you exactly who got denied and why