search for: gctortur

Displaying 20 results from an estimated 103 matches for "gctortur".

Did you mean: gctorture
2011 Oct 15
2
gctorture() and gzfile() doesn't get along.
Found the simpliest way of seeing I bug I encountered doing "R CMD check --use-gct": Just launch R (with --vanilla), and do this: > ?gctorture # this work > gctorture() > ?gctorture Error in gzfile(file, "rb") : can only weakly reference/finalize reference objects # this does not It seems that when gctorture() is on gzfile() doesn't work.
2020 Oct 29
2
Something is wrong with the unserialize function
Hi all, I am not able to export an ALTREP object when `gctorture` is on in the worker. The package simplemmap can be used to reproduce the problem. See the example below ``` ## Create a temporary file filePath <- tempfile() con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) library(parallel) cl <- makeClust...
2004 Apr 26
1
Segfault: .Call and classes with logical slots
Hi, the following example aiming at a class containing a logical slot segfaults under R-1.9.0 when `gctorture(on = TRUE)' is used: Code code (dummy.c): #include <Rdefines.h> SEXP foo() { SEXP ans; PROTECT(ans = NEW_OBJECT(MAKE_CLASS("test"))); SET_SLOT(ans, install("lgl"), allocVector(LGLSXP, 1)); LOGICAL(GET_SLOT(ans, install("lgl")))[0] = TRUE...
2009 Jul 16
1
Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)
On 15/07/2009 8:08 PM, Herv? Pag?s wrote: > Hi, > > > x <- c(a=10, b=20) > > length(x) <- 1 > > x > a > 10 > > But with gctorture turned on, I get: > > > gctorture(TRUE) > > x <- c(a=10, b=20) > > length(x) <- 1 > > x > a > "a" <---- ??? > > > x <- c(a=10, b=20) > > length(x) <- 3 > > *** caught segfault *** >...
2001 May 28
1
memory bug in is.na[n]() (PR#952)
...is.na() and is.nan() {which makes much sense since the C code of the two is very similar!}; only one is shown below. Martin ------- start of forwarded message ------- From: Martin Maechler <maechler@stat.math.ethz.ch> To: R-core@stat.math.ethz.ch Subject: another is.nan BUG found by gctorture-testing demo(is.things) Date: Thu, 12 Apr 2001 14:51:06 +0200 demo() being part of strict tests (since this morning), reveals another bug in is.nan() in both branches, but already in 1.2.2 (ie. certainly not caused by Peter's recent fix) : gctorture(FALSE) # default is.nan(NULL) #-> l...
2020 Oct 29
2
[External] Something is wrong with the unserialize function
...ry-mapped file object filePath <- "x.dat" con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) x <- mmap(filePath, "double") saveRDS(x, file = "x.Rds") ## in a separate R process: gctorture() readRDS("x.Rds") Looks like a missing PROTECT somewhere. Best, luke On Thu, 29 Oct 2020, Jiefei Wang wrote: > Hi all, > > I am not able to export an ALTREP object when `gctorture` is on in the > worker. The package simplemmap can be...
2008 Jan 22
3
gctorture and proc.time (PR#10600)
In R version 2.6.1 (2007-11-26) and R version 2.6.1 Patched (2008-01-19 r44061) on openSUSE 10.2 (X86-64) > gctorture() > proc.time() Error: protect(): protection stack overflow The problem with this is that then R CMD check --use-gct foo ALWAYS FAILS with > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n") Error in proc.time() - get("p...
2020 Oct 29
0
[External] Something is wrong with the unserialize function
...ex: ## create and serialize a memmory-mapped file object filePath <- "x.dat" con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) x <- mmap(filePath, "double") saveRDS(x, file = "x.Rds") ## in a separate R process: gctorture() readRDS("x.Rds") Looks like a missing PROTECT somewhere. Best, luke On Thu, 29 Oct 2020, Jiefei Wang wrote: > Hi all, > > I am not able to export an ALTREP object when `gctorture` is on in the > worker. The package simplemmap can be used to reproduce the problem. See &...
2002 Apr 29
1
Garbage collection: RW1041
...Reached total allocation of 256Mb: see help(memory.size) > gc() used (Mb) gc trigger (Mb) Ncells 217515 5.9 787219 21.1 Vcells 63724 0.5 23990430 183.1 > Have increased memory size to 768Mb, but it just takes a few more iterations to fail. Got excited after reading the gctorture() documentation, so inserted a few lines gctorture(on = TRUE) allocate some memory gctorture(on = FALSE) hoping to trigger a GC but with varied success - the Vcell usage drops but only slightly, so we seem to trigger a partial GC. Usually fails on the next call to "doit"....
2023 Apr 29
1
Forcing a PROTECT Bug to Occur
...ct anything. I was hoping it would either segfault from trying to access deallocated memory, or maybe print out nonsense results because the unprotected memory got overwritten, but I can't make either happen. Here's my current code (all in R, using the inline package for simplicity): > gctorture(TRUE) > z = inline::cfunction(body=" SEXP vec_1 = Rf_ScalarInteger(99); SEXP vec_2 = Rf_allocVector(VECSXP, 10); SET_VECTOR_ELT(vec_2, 1, vec_1); Rf_PrintValue(vec_2); ") My thinking was that, with torture mode enabled, the allocation of vec_2 should ensure that vec_1...
2020 Oct 29
0
[External] Something is wrong with the unserialize function
..."x.dat" > con <- file(filePath, "wrb") > writeBin(rep(0.0,10),con) > close(con) > > library(simplemmap) > x <- mmap(filePath, "double") > saveRDS(x, file = "x.Rds") > > ## in a separate R process: > gctorture() > readRDS("x.Rds") > > Looks like a missing PROTECT somewhere. > > Best, > > luke > > On Thu, 29 Oct 2020, Jiefei Wang wrote: > > > Hi all, > > > > I am not able to export an ALTREP object when `gctorture` is on in...
2023 Apr 30
0
Forcing a PROTECT Bug to Occur
...z = inline::cfunction(body=" > ? ? SEXP vec_1 = Rf_allocVector(INTSXP, 100); > ? ? SEXP vec_2 = Rf_allocVector(VECSXP, 3); > ? ? SET_VECTOR_ELT(vec_2, 1, vec_1); > ") > > z() > NULL > Warning message: > In z() : your C program does not return anything! > > gctorture(TRUE) > > z() > > ?*** caught segfault *** > address 0x55a68ce57f90, cause 'memory not mapped' > > Traceback: > ?1: doWithOneRestart(return(expr), restart) > ?2: withOneRestart(expr, restarts[[1L]]) > ?3: withRestarts({ ?.Internal(.signalCondition(simpleWarnin...
2011 Jan 11
1
as.environment.list provides inconsistent results under torture
Hello, Using R-devel (rev 53950), I get inconsistent results with as.environment( VECSXP ) when gctorture is on. Consider: a <- list( aa = rnorm, bb = runif ) gctorture(TRUE) as.environment( a ) The last line sometimes produces the correct environment, but sometimes I get errors. Here are the three situations: # good > as.environment( a ) <environment: 0x100b1c978> # not good >...
2009 Jul 15
1
Protection stack overflow
Hi, > gctorture(TRUE) > setGeneric("foo", function(x, y) standardGeneric("foo")) [1] "foo" > setMethod("foo", c("ANY", "ANY"), + function(x, y) cat("calling foo,ANY,ANY method\n") + ) Error: protect(): protection stack...
2013 Aug 28
1
Memory allocation in read.table
...respectively. Lines 221 and 222 are more of a mystery: class(data) <- "data.frame" attr(data, "row.names") <- row.names Why do those lines need any allocations? I thought class<- and attr<- were primitives, and hence would modify in place. Re-running with gctorture(TRUE) yields roughly similar numbers, although there is no memory release because gc is called earlier, and the assignment of allocations to line is probably more accurate given that gctorture runs the code about 20x slower: file line alloc release 25 read-table.r 221 0.387299 0.0...
2001 Feb 20
2
segfault
I've managed to trap the following segfault with xxgdb and gctorture() set. The segfault seems to move around if gctorture() is not set, but has now occurred twice in the same spot with it set. xxgdb gives the message Program received signal SIGSEGV, Segmentation fault. 0x71244 in RunGenCollect (size_needed=2) at memory.c:1027 and the source listing points to FO...
2001 May 28
0
bugs in deriv(*, *, function.arg = ) (PR#953)
...#39;ve been looking a bit at the C code and I can't understand why giving the function.arg as a function doesn't work anymore. (it just returns the 'empty' function.arg). Interestingly, it *did* work when I ran things under gdb .. ? .. ? The result is the same under gctorture(), however, that does reveal a bug (missing PROTECT() ?), clearly even under 1.2.2 : > gctorture() > deriv(expression(sin(x + y^2)), c("x", "y"),c("x", "y")) [[1]] . { .expr2 <- x + y^2 .expr4 <- cos(.expr2) ....
2009 Dec 10
1
Antwort: Re: Crash with Unicode and sub (PR#14114)
...code also causes R to come to a stop using SUSE + WINE. Is it possible to run that lot on top of valgrind? Of course, it will probably take all day ... If not, I have a clue which might help. The problem seems to lie in the "sub" routine. In the original report I used -- cut here -- gctorture() u <- intToUtf8(c(rep(1e3,1e2),32,c(rep(1e3,1e2)))) v <- rep(u,1e2) v <- sub(" ","",v) v %in% "" -- cut here -- I've tried reducing this a bit more. Replacing intToUtf8 with a direct assignment writing out the string with Unicode escapes seems to make...
2009 Dec 07
3
Crash with Unicode and sub (PR#14114)
Full_Name: George Russell Version: 2.10.0 OS: Windows XP Version 2002 SP 2 Submission from: (NULL) (217.111.3.131) The following typed into R --vanilla induces a crash: -- cut here -- gctorture() u <- intToUtf8(c(rep(1e3,1e2),32,c(rep(1e3,1e2)))) v <- rep(u,1e2) v <- sub(" ","",v) v %in% "" -- cut here -- sessionInfo() says: -- cut here -- R version 2.10.0 (2009-10-26) i386-pc-mingw32 locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_...
2007 Aug 23
1
.Call and to reclaim the memory by allocVector
...he crossproduct of a and b, which returns a vector of size length(a)*length(b). The C code is at the end of this message with the modification commented. The R code is here ---------------------------- dyn.load("crossprod2.so") cp <- function(a, b) .Call("crossprod2", a, b) gctorture() a<-1:10000 b<-1:1000 gc() #i c<-cp(a,b) rm(c) gc() #ii -------------- When I run the above code in a fresh start R (version 2.5.0) the gc() inforamation is below. I report the last column ("max used (Mb)" ) here, which agrees the linux command "ps aux". Apparently...