Find command giving bad status error

In a fastload teradata utility I am trying to delete the files which are older than 30days using the find and rm command as following.

find . -name 'xxx_*' -mtime +30 -exec rm -f {} \;

I expect it to delete all the files older than 30 days but sometimes it gives an error :

find: bad status-- .\xxx.txt

and the fastload job fails

find is a command where there may be differences in implementation depending on OS...
What OS and version are you using?
I would suggest you run your command line again and replace the remove by long listing and see if it does the same...

The "find" utility notifies that the file found by name "xxx.txt" and transferred to be deleted by the "rm" utility was finished failed.
To understand what is happening, do it directly.

rm xxx.txt

and

ls -l xxx.txt
lsattr xxx.txt

I think so

All /usr/bin/find versions should work, even with strange file names.
I guess you have run a wrong "find".
Check with

which find
type find

Run it with pathname

/usr/bin/find ...