Uploading file to synapse fails due to Cstack uasage hitting the upper limit

Description

Upload to Synapse continuously fails while hitting the Cstack usage limit.

R Traceback

Memory Info

Environment

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel grid stats graphics grDevices utils datasets methods base

other attached packages:
[1] bindrcpp_0.2.2 doParallel_1.0.10 ComplexHeatmap_1.12.0 GA_3.0.2 iterators_1.0.9 foreach_1.4.4
[7] caret_6.0-78 lattice_0.20-35 MatchIt_3.0.1 Boruta_5.2.0 ROCR_1.0-7 gplots_3.0.1
[13] ranger_0.8.0 lubridate_1.7.4 parsedate_1.1.1 githubr_0.2 knitr_1.20 forcats_0.2.0
[19] stringr_1.3.1 dplyr_0.7.5 purrr_0.2.5 readr_1.1.1 tidyr_0.8.1 tibble_1.4.2
[25] ggplot2_2.2.1 tidyverse_1.2.1 plyr_1.8.4 data.table_1.11.4 CovariateAnalysis_0.1.0 synapser_0.2.38
[31] knit2synapse_2.0.1

loaded via a namespace (and not attached):
[1] colorspace_1.2-6 rjson_0.2.15 class_7.3-14 modeltools_0.2-21 rprojroot_1.2 mclust_5.2.2 circlize_0.3.9
[8] GlobalOptions_0.0.10 rstudioapi_0.7 ggpubr_0.1.6 DRR_0.0.3 flexmix_2.3-13 mvtnorm_1.0-5 prodlim_1.6.1
[15] xml2_1.1.1 codetools_0.2-15 splines_3.4.3 mnormt_1.5-5 robustbase_0.92-7 RcppRoll_0.2.2 jsonlite_1.5
[22] broom_0.4.2 ddalpha_1.3.1 cluster_2.0.6 kernlab_0.9-25 sfsmisc_1.1-1 compiler_3.4.3 httr_1.3.1
[29] backports_1.0.5 assertthat_0.2.0 Matrix_1.2-11 lazyeval_0.2.1 cli_1.0.0 htmltools_0.3.5 tools_3.4.3
[36] gtable_0.2.0 glue_1.2.0 reshape2_1.4.3 Rcpp_0.12.16 trimcluster_0.1-2 cellranger_1.1.0 gdata_2.17.0
[43] nlme_3.1-131 pack_0.1-1 fpc_2.1-10 psych_1.7.3.21 timeDate_3042.101 gower_0.1.2 testthat_1.0.2
[50] rvest_0.3.2 PythonEmbedInR_0.2.24 gtools_3.5.0 dendextend_1.4.0 DEoptimR_1.0-8 MASS_7.3-47 scales_0.4.1
[57] ipred_0.9-6 hms_0.3 RColorBrewer_1.1-2 yaml_2.1.18 gridExtra_2.2.1 rpart_4.1-11 stringi_1.2.3
[64] highr_0.6 caTools_1.17.1 lava_1.5.1 shape_1.4.2 rlang_0.2.1 pkgconfig_2.0.1 prabclus_2.2-6
[71] bitops_1.0-6 evaluate_0.10.1 bindr_0.1.1 labeling_0.3 recipes_0.1.1 cowplot_0.8.0 CVST_0.2-1
[78] tidyselect_0.2.4 magrittr_1.5 R6_2.2.2 dimRed_0.1.0 pillar_1.2.1 haven_1.1.1 whisker_0.3-2
[85] foreign_0.8-69 withr_2.1.1 survival_2.40-1 RCurl_1.95-4.10 nnet_7.3-12 modelr_0.1.2 crayon_1.3.4
[92] KernSmooth_2.23-15 rmarkdown_1.6 viridis_0.3.4 GetoptLong_0.1.5 readxl_1.1.0 ModelMetrics_1.1.0 digest_0.6.12
[99] diptest_0.75-7 stats4_3.4.3 munsell_0.4.3

Activity

Show:
Thanneer Perumal
July 26, 2018, 11:13 PM

and Big thank you

Kimyen Truong
July 27, 2018, 9:00 PM
Thanneer Perumal
August 23, 2018, 11:09 PM

Tested using C4.large EC2 instance (same as above, when failed). And it works

library(synapser)

TERMS OF USE NOTICE:
When using Synapse, remember that the terms and conditions of use require that you:
1) Attribute data contributors when discussing these data or results from these data.
2) Not discriminate, identify, or recontact individuals or groups represented by the data.
3) Use and contribute only data de-identified to HIPAA standards.
4) Redistribute data only under these same terms of use.

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] synapser_0.3.39

loaded via a namespace (and not attached):
[1] compiler_3.5.1 R6_2.2.2 tools_3.5.1 yaml_2.1.19 codetools_0.2-15 pack_0.1-1
[7] PythonEmbedInR_0.2.24
> library(synapser)
> synLogin()
Welcome, Thanneer Malai Perumal!NULL
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 698482 37.4 1244571 66.5 1244571 66.5
Vcells 1324306 10.2 8388608 64.0 5237282 40.0
> ftrs = list();for(i in 1:100)
+ {ftrs[[i]] = matrix(runif(1e6),1e3,1e3)}
> save(list = 'ftrs', file = 'temp.RData')
> obj = File('temp.RData', parentId = 'syn3278636')
> obj = synStore(obj)
Uploading [####################]100.00% 762.9MB/762.9MB (2.9MB/s) temp.RData Done... > ###########################################
> ftrs = list();for(i in 1:100)
+ {ftrs[[i]] = matrix(runif(1e6),1e3,1e3)}
> ftrs = list();for(i in 1:200)
+ {ftrs[[i]] = matrix(runif(1e6),1e3,1e3)}
> save(list = 'ftrs', file = 'temp.RData')
> obj = File('temp.RData', parentId = 'syn3278636')
> obj = synStore(obj)
Uploading [####################]100.00% 1.5GB/1.5GB (6.9MB/s) temp.RData Done... #################################################

Thanneer Perumal
August 23, 2018, 11:11 PM

Tested and it works. Thank you for getting down to figure out the root cause of this issue.

Bruce Hoff
August 23, 2018, 11:20 PM

Great job, : This was a deep issue to sleuth and the change fixes a problem that many other users might have encountered.

Assignee

Kimyen Truong

Reporter

Thanneer Perumal

Labels

None

Validator

Thanneer Perumal

Development Area

None

Release Version History

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure