I cannot publically share the actual app which is quite large but I was able to create a simple reproducer which should be even better... :-)
When the file is on unionfs this basically hangs during the ftruncate call and dmesg reports the error. The process becomes pretty unkillable.
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h>
#define FNAME "/tmp/myfile"
main() { int f,s; f=open(FNAME,O_RDWR|O_CREAT|O_EXCL,0600); fprintf(stderr,"open f=%d\n",f); s=unlink(FNAME); fprintf(stderr,"unlink status=%d\n",s); s=write(f,"hi",3); fprintf(stderr,"write status=%d\n",s); s=ftruncate(f,0); fprintf(stderr,"truncate status=%d\n",s); }
I cannot publically share the actual app which is quite large but I was able to create a simple reproducer which should be even better... :-)
When the file is on unionfs this basically hangs during the ftruncate call and dmesg reports the error. The process becomes pretty unkillable.
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#define FNAME "/tmp/myfile"
main() { FNAME,O_ RDWR|O_ CREAT|O_ EXCL,0600) ; stderr, "open f=%d\n",f); stderr, "unlink status=%d\n",s); f,"hi", 3); stderr, "write status=%d\n",s); stderr, "truncate status=%d\n",s);
int f,s;
f=open(
fprintf(
s=unlink(FNAME);
fprintf(
s=write(
fprintf(
s=ftruncate(f,0);
fprintf(
}