paleolimbot opened a new issue, #38084:
URL: https://github.com/apache/arrow/issues/38084

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   
https://github.com/apache/arrow/actions/runs/6433470490/job/17471702316?pr=38078#step:10:23815
   
   ```
   -- Warning ('test-parquet.R:38:3'): simple int column roundtrip 
----------------
   cannot remove file 
'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpuSsLdk/working_dir\RtmpyEFqiU\filed18750c4f20',
 reason 'Permission denied'
   Backtrace:
       x
    1. +-testthat::expect_error(file.remove(pq_tmp_file), NA) at 
test-parquet.R:38:2
    2. | \-testthat:::expect_condition_matching(...)
    3. |   \-testthat:::quasi_capture(...)
    4. |     +-testthat (local) .capture(...)
    5. |     | \-base::withCallingHandlers(...)
    6. |     \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. \-base::file.remove(pq_tmp_file)
   -- Warning ('test-read-record-batch.R:43:3'): RecordBatchFileWriter / 
RecordBatchFileReader roundtrips --
   cannot remove file 
'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpuSsLdk/working_dir\RtmpyEFqiU\filed183b046294',
 reason 'Permission denied'
   Backtrace:
       x
    1. +-testthat::expect_error(file.remove(tf), NA) at 
test-read-record-batch.R:43:2
    2. | \-testthat:::expect_condition_matching(...)
    3. |   \-testthat:::quasi_capture(...)
    4. |     +-testthat (local) .capture(...)
    5. |     | \-base::withCallingHandlers(...)
    6. |     \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. \-base::file.remove(tf)
   
   == Failed tests 
================================================================
   -- Failure ('test-parquet.R:39:3'): simple int column roundtrip 
----------------
   file.exists(pq_tmp_file) is not FALSE
   
   `actual`:   TRUE 
   `expected`: FALSE
   -- Error ('test-parquet.R:294:3'): write_parquet() handles version argument 
----
   <purrr_error_indexed/rlang_error/error/condition>
   Error in `map(.x, .f, ..., .progress = .progress)`: i In index: 2.
   Caused by error:
   ! IOError: Failed to open local file 
'C:/Users/runneradmin/AppData/Local/Temp/RtmpuSsLdk/working_dir/RtmpyEFqiU/filed1850386ae1'.
 Detail: [Windows error 1224] The requested operation cannot be performed on a 
file with a user-mapped section open.
   ```
   
   This seems to be a test specifically for ensuring that the file can be 
cleaned up: 
https://github.com/apache/arrow/blob/main/r/tests/testthat/test-parquet.R#L38C3-L38C45
   
   Here we might have to use a separate tempfile for each loop (or maybe 
explicitly not memory map): 
https://github.com/apache/arrow/blob/main/r/tests/testthat/test-parquet.R#L295
   
   This one might also be a memory mapping issue: 
https://github.com/apache/arrow/blob/main/r/tests/testthat/test-read-record-batch.R#L43
   
   Because we memory map, the file is probably open until the data.frame is 
garbage collected (because we're also using ALTREP to point to a memory-mapped 
section and garbage collection is unpredictable).
   
   Not sure why this popped up just now though!
   
   ### Component(s)
   
   R


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to