CatBoost R Windows 11 GPU training invoked via RScript.exe exits with Windows error 0xc0000409.
- Dominant language
- C++
- Stars
- 9.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
To reproduce on a Windows 11 workstation with
1. GPU
2. R installed
3. a c:/temp subdirectory that R can write to
4. Rscript.exe on the system PATH
follow these steps:
1. Clear the Windows Application event log in Event Viewer.
2. Save the minimal R script below to a file, say foo.r.
3. Open a terminal (command prompt) window.
4. Change directories to the directory containing foo.r.
5. Enter the command 'RScript.exe foo.r'.
6. When execution complete, click 'Refresh' in Event Viewer.
You'll see an Error in the Application event log with the Exception code Exception code: 0xc0000409.
# start minimal script
library(catboost)
library(future)
pool <- catboost.load_pool(
data = matrix(runif(1000), ncol = 10),
label = sample(0:1, 100, TRUE)
)
params <- list(
task_type = "GPU",
devices = "0",
thread_count = 2,
gpu_ram_part = 0.5,
random_seed = 42,
iterations = 1e2,
train_dir = "c:/temp/"
)
m <- catboost.train(pool, NULL, params)
# end minimal script
Windows, R, and CatBoost version details:
> winver
Microsoft Windows
Version 24H2 (OS Build 26100.6584)
> R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 5.1
year 2025
month 06
day 13
svn rev 88306
language R
version.string R version 4.5.1 (2025-06-13 ucrt)
nickname Great Square Root
> packageVersion("catboost")
[1] ‘1.2.8’
While the above test script ran, I repeatedly clicked the Refresh button in Event Viewer. The error only appeared when the script finished executing. I also created a dump file and analyzed it with Windmp. The analysis indicated that CatBoost (perhaps a CatBoost finalizer?) tried to perform an invalid operation on memory on the stack.
This error only occurs when training on GPUs from RScript.exe. I could not reproduce the error from within RStudio, nor training on CPU (either from RStudio or RScript.exe).
Contributor guide
Research direction
Start by running the minimal R script through RScript.exe on Windows with GPU training, then compare it with RStudio and CPU runs. Review the Windows Application event log and the dump analyzed with Windmp, focusing on the catboost.load_pool and catboost.train path. Done means GPU training completes without error 0xc0000409.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, r
- Domain
- machine-learning, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100