Tar.gz not working (Segmentation fault) on ext4 partition I have a strange problem with tar gz compression.

I used to have SD card mounted as a fat32 partition. However, now I changed it so that external sdcard is being mounted under /data/media/0 and is formatted to ext4 (or f2fs - makes no difference, because this error happens on either).

In the old setup, I could run

tar cvzf


on a folder in this partition without any issue.

However, in this new setup if I run it, I get

tar cvzf
Segmentation fault.


I discovered, that if I remove the z parameter, it proceeds just fine. But he resulting tar file is not gz-compressed and hence unfit to my applications.

I confirmed this behaviour on two different ROMs so far: CarbonRom JB 4.3.1 and CarbonRom KK 4.4.4.

Does anyone have any idea what could be amiss here? Is android unable to tar.gz files on non-fat32 partitions, or is it cause by some other problem?
I still have no idea what is causing the problem, but I did find a solution / workaround, which does the same thing.

Instead of directly calling gzip from tar like so:

tar cvzf


I pipe tar's output to gzip like so:

tar -cv directory/ | gzip &gt; archive.tar.gz


and the segmentation fault is no more.