Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeBinaryFile*Atomic fails on PRoot environments running on AArch64 (ARM64) #107

Open
francesquini opened this issue Dec 28, 2022 · 0 comments

Comments

@francesquini
Copy link

System: Ubuntu 22.04, on a PRoot environment on AAch64.
Unliftio v. 0.2.23.0

When I do:

module Main (main) where

import UnliftIO.IO.File
import Data.ByteString

main :: IO ()
main = do
  writeBinaryFile "writeBinaryFile.txt" bs
  writeBinaryFileAtomic "writeBinaryFileAtomic.txt" bs
  writeBinaryFileDurable "writeBinaryFileDurable.txt" bs
  writeBinaryFileDurableAtomic "writeBinaryFileDurableAtomic.txt" bs
  where
    bs = pack [65 .. 75]

I get 4 files, however, the ones using the atomic variant are empty:

emilio@localhost:~/testrio$ ls -l
total 1312
-rwxr-xr-x. 1 emilio emilio 1334440 Dec 28 15:18 testrio-exe
-rw-rw-r--. 1 emilio emilio      11 Dec 28 15:20 writeBinaryFile.txt
-rw-rw-rw-. 1 emilio emilio       0 Dec 28 15:20 writeBinaryFileAtomic.txt
-rw-rw-r--. 1 emilio emilio      11 Dec 28 15:20 writeBinaryFileDurable.txt
-rw-rw-rw-. 1 emilio emilio       0 Dec 28 15:20 writeBinaryFileDurableAtomic.txt

The same problem does not happen (i.e. it works as expected) when running the code on a regular virtualized environment on the same OS and hw architecture.

Any hints as to what might be happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant