num_pars_unconstrained SEGV
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
Sometimes I get a crash like this,
*** caught segfault ***
address 0x7f84b02f27c8, cause 'memory not mapped'
Traceback:
1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: 0x562b43783430>, dll = list(name = "Rcpp", path = "/opt/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/libs/Rcpp.so", dynamicLookup = TRUE, handle = <pointer: 0x562b4488ea40>, info = <pointer: 0x562b4226dd60>), numParameters = -1L), <pointer: 0x562b4d307df0>, <pointer: 0x562b48d644a0>, .pointer)
2: object@.MISC$stan_fit_instance$num_pars_unconstrained()
3: .local(object, ...)
4: get_num_upars(object)
5: get_num_upars(object)
6: throw_sampler_warnings(nfits)
7: .local(object, ...)
8: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file, verbose = verbose, algorithm = match.arg(algorithm), control = control, check_unknown_args = FALSE, cores = cores, open_progress = open_progress, include = include, ...)
9: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file, verbose = verbose, algorithm = match.arg(algorithm), control = control, check_unknown_args = FALSE, cores = cores, open_progress = open_progress, include = include, ...)
10: stan(file = "unidim-adaptScale.stan", chains = numChains, cores = numChains, iter = curIter, control = list(max_treedepth = 15), data = list(NCMP = N, NPA = length(palist), pa1 = match(df$pa1, palist), pa2 = match(df$pa2, palist), diff = df$pick, varCorrection = trial[tx, "varCorrection"]), open_progress = FALSE)
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault (core dumped)
Description:
It doesn't happen all the time.
Reproducible Steps:
Try running the following for half an hour,
sim2.R.txt
lib.R.txt
unidim-adaptScale.stan.txt
Obviously rename to remove the .txt suffix.
RStan Version: 2.18.2
R Version: R version 3.5.1 (2018-07-02)
Operating System: Ubuntu Cosmic w/ Linux 4.18.0-17-generic
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running sim2.R with lib.R and unidim-adaptScale.stan after removing the .txt suffixes, using the reported RStan and R versions. Inspect the num_pars_unconstrained() entry in the stack trace while reproducing the intermittent SEGV. Done means identifying and fixing the crash and confirming the reproducer no longer aborts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100