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

As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace (BLOCKED: Rock) #747

Open
1 of 2 tasks
marikaris opened this issue Jun 18, 2024 · 1 comment
Assignees
Labels
bug 🐛 Something isn't working

Comments

@marikaris
Copy link
Collaborator

marikaris commented Jun 18, 2024

Demo:

  • Armadillo doesn't break anymore when loading large resource

Acceptance criteria:

  • Save large workspace
  • Try to reload it to reproduce issue with breaking armadillo
  • Find out why it's breaking (something to do with something not streaming?)
  • Fix it
  • Acceptable to gracefully crash if things get really complicated

todo:

  • reproduced in R
  • reproduced in Opal

Code for comparing Opal and Armadillo (in progress)

library(DSMolgenisArmadillo)
library(DSI)
library(DSOpal)
library(MolgenisAuth)
library(devtools)
# install_github("molgenis/molgenis-r-auth")
library(MolgenisAuth)
library(dsBaseClient)

armadillo_url <- "http://localhost:8080/"
opal_url <- "https://demo-opal.molgenis.net/repo"

token <- armadillo.get_token(armadillo_url)

builder <- newDSLoginBuilder()

builder$append(
  url = armadillo_url,
  server = "armadillo",
  token = token,
  driver = "ArmadilloDriver")

builder$append(
  url = opal_url,
  server = "opal",
  user = "administrator",
  password = [in vault: 'customers/armadillo/demo-opal.molgenis.net/OPAL_ADMINISTRATOR_PASSWORD'],
  driver = "OpalDriver")

logindata <- builder$build()

conns <- datashield.login(logins = logindata, assign = FALSE)

datashield.assign.table(conns["armadillo"], "non_rep", "lifecycle/core/nonrep")
datashield.assign.table(conns["opal"], "non_rep", "test-workspace-save.nonrep")

ds.colnames("non_rep")

ds.glmSLMA(
  formula = "preg_ht ~ 1 + agebirth_p_d + dia_bf + sibling_pos + breastfed_ever + cats_quant_preg", 
  family = "gaussian",
  dataName = "non_rep",
  newobj = "reg_out")

for(i in 1:10000) {
  datashield.assign.expr(conns, paste0("reg_out", i), "reg_out")
}

mem_used_before_save <- ds.memUsed(conns)
datashield.workspace_save(conns, "test_workspace")

conns <- datashield.login(logins = logindata, restore = "test_workspace")
mem_used_after_save <- ds.memUsed(conns)

Remaining to do:

This will work up to the for loop. For the rest to work:

@marikaris marikaris added bug 🐛 Something isn't working triage labels Jun 18, 2024
@marikaris marikaris changed the title Armadillo server crashes when loading workspace As armadillo user I don't want the armadillo server to crash whenever I save a workspace Jun 18, 2024
@marikaris marikaris removed the triage label Jun 18, 2024
@marijevdgeest marijevdgeest changed the title As armadillo user I don't want the armadillo server to crash whenever I save a workspace As armadillo user I don't want the armadillo server to crash whenever I save a workspace (BLOCKED: holiday) Jul 23, 2024
@timcadman timcadman changed the title As armadillo user I don't want the armadillo server to crash whenever I save a workspace (BLOCKED: holiday) As Armadillo developer I want to understand why Armadillo is crashing when I load a large workspace (BLOCKED: holiday) Aug 12, 2024
@timcadman timcadman changed the title As Armadillo developer I want to understand why Armadillo is crashing when I load a large workspace (BLOCKED: holiday) As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace Aug 12, 2024
@marikaris marikaris self-assigned this Aug 16, 2024
@marijevdgeest marijevdgeest changed the title As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace (BLOCKED: Rock) Aug 20, 2024
@marijevdgeest
Copy link
Contributor

Probably an R issue

@timcadman timcadman changed the title As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace (BLOCKED: Rock) As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace Aug 27, 2024
@marijevdgeest marijevdgeest changed the title As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace As Armadillo developer I want to understand why Armadillo crashes when I load a large workspace (BLOCKED: Rock) Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants