[R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

Ashim Kapoor @@h|mk@poor @end|ng |rom gm@||@com
Wed Apr 7 10:16:46 CEST 2021


On Wed, Apr 7, 2021 at 12:51 PM Martin Maechler
<maechler using stat.math.ethz.ch> wrote:
>
> >>>>> Ashim Kapoor
> >>>>>     on Wed, 7 Apr 2021 10:35:14 +0530 writes:
>
>     > Dear R experts,
>
>     > Here is my problem :
>
>     > R startup FAILS with an error message. The error message
>     > is more meaningful when I do invoke R via sudo OR as
>     > root. I attach the startup messages when I invoke R as :
>
>     > 1. as non root user 2. with sudo 3. as Root user.
>
>     > The error messages ( mentioned in snippets below ) are
>     > more meaningful to me in the above mentioned order.
>
> Thank you, Ashim.
>
> Yes, the messages point to something really bad.
>
> OTOH ("On the other hand"), what we *can* see is that you try to
> start R version 3.6.3.
>

My apologies for not being clear.

I would like to clarify :

1. The error message from the incantation `R` is not very informative.

2. The error message from the incantation `sudo R` says (among other
things which don't seem significant to me):
Error in doWithOneRestart(return(` \\x82\\x0ccPV`), restart) :
  not a proper file name

3. The error message from invoking R as a root user says:

Error: not a proper file name
Fatal error: unable to initialize the JIT

I found this on the internet :
https://stackoverflow.com/questions/19512165/error-in-dowithonerestart

The error messages and the above link point to issues with JAVA, but
it does not say how to fix them.

That is why I thought : there is an .xlsx file which has non english
characters which is messing with
Java.

Query : is there a way to do JAVA garbage collection when R is not starting ?

> While that is not extremely old, it may well be older than
> several other pieces of software (or even hardware) that you are
> running with.
>
> I very very  *strongly* recommend to use an R version 4.0.x ... and why not
> use the latest  4.0.5 ?
>

We upgraded to 4.0.5 but it did not make a difference. We restarted
the computer and that fixed the error.
I think the JAVA garbage collection kicked in when we reset the
computer and that is why it was fixed on rebooting. Not sure though.

> Then, it may also be caused by a mismatch of system libraries
> and your oldish version of R. ... but there I'd strongly
> recommend consulting with other Debian users, notably as there
> is a dedicated  mailing list  R-SIG-Debian --> do subscribe
> there, and ask -- with more details on how you got your R: Is it
> the default R on your Debian, which version of Debian,  etc.
>
> Last but not least, Dirk Eddelbuettel, the maintainer of the
> official R Debian package maintains a nice web page -- part of
> the official CRAN web pages, but unfortunately a bit hidden
> nowadays, (not the least because CRAN still uses frames (würg!!)):
>
>   https://cloud.r-project.org/bin/linux/debian/
>
> A very nice and useful page,  much underrated and underused,
> probably.
>

Thank you for this.

> Best regards,
>
> Martin Maechler
> ETH Zurich  and  R Core Team
>
>
>     > When I google around for the error message, it looks like
>     > there is an .xlsx file which has non english characters
>     > which is messing with Java.
>
>     > I do not know how to fix this. I tried :-
>
>     > R --vanilla
>
>     > so that it would not use any startup scripts but that also
>     > does not work.
>
>     > ----------------- snip
>     > ----------------------------------------------------------------------------------------------------------------------------
>
>     > When I try to start R from the command line :
>
>     > ~$ R
>
>     >  *** caught segfault *** address (nil), cause 'unknown'
>
>     > Traceback: 1: NextMethod(.Generic) 2:
>     > Ops.numeric_version(R_version_built_under, "3.0.0") 3:
>     > testRversion(pkgInfo, package, pkgpath) 4:
>     > library(package, lib.loc = lib.loc, character.only = TRUE,
>     > logical.return = TRUE, warn.conflicts = warn.conflicts,
>     > quietly = quietly, mask.ok = mask.ok, exclude = exclude,
>     > include.only = include.only, attach.required =
>     > attach.required) 5: doTryCatch(return(expr), name,
>     > parentenv, handler) 6: tryCatchOne(expr, names, parentenv,
>     > handlers[[1L]]) 7: tryCatchList(expr, classes, parentenv,
>     > handlers) 8: tryCatch(library(package, lib.loc = lib.loc,
>     > character.only = TRUE, logical.return = TRUE,
>     > warn.conflicts = warn.conflicts, quietly = quietly,
>     > mask.ok = mask.ok, exclude = exclude, include.only =
>     > include.only, attach.required = attach.required), error =
>     > function(e) e) 9: require(pkg, quietly = TRUE,
>     > warn.conflicts = FALSE, character.only = TRUE) 10:
>     > .OptRequireMethods()
>
>     > Possible actions: 1: abort (with core dump, if enabled) 2:
>     > normal R exit 3: exit R without saving workspace 4: exit R
>     > saving workspace Selection: Segmentation fault
>
>     > ----------------- snip
>     > ----------------------------------------------------------------------------------------------------------------------------
>     > When I try to start R with sudo it gives a more clear
>     > message :-
>
>     > ~$ sudo R
>
>     >  *** caught segfault *** address (nil), cause 'unknown'
>
>     > Traceback: 1: NextMethod(.Generic) 2:
>     > Ops.numeric_version(R_version_built_under, "3.0.0") 3:
>     > testRversion(pkgInfo, package, pkgpath) 4:
>     > library(package, lib.loc = lib.loc, character.only = TRUE,
>     > logical.return = TRUE, warn.conflicts = warn.conflicts,
>     > quietly = quietly, mask.ok = mask.ok, exclude = exclude,
>     > include.only = include.only, attach.required =
>     > attach.required) 5: doTryCatch(return(expr), name,
>     > parentenv, handler) 6: tryCatchOne(expr, names, parentenv,
>     > handlers[[1L]]) 7: tryCatchList(expr, classes, parentenv,
>     > handlers) 8: tryCatch(library(package, lib.loc = lib.loc,
>     > character.only = TRUE, logical.return = TRUE,
>     > warn.conflicts = warn.conflicts, quietly = quietly,
>     > mask.ok = mask.ok, exclude = exclude, include.only =
>     > include.only, attach.required = attach.required), error =
>     > function(e) e) 9: require(pkg, quietly = TRUE,
>     > warn.conflicts = FALSE, character.only = TRUE) 10:
>     > .OptRequireMethods()
>
>     > Possible actions: 1: abort (with core dump, if enabled) 2:
>     > normal R exit 3: exit R without saving workspace 4: exit R
>     > saving workspace Selection: Error in
>     > doWithOneRestart(return(` \\x82\\x0ccPV`), restart) : not
>     > a proper file name
>
>     > R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
>     > Copyright (C) 2020 The R Foundation for Statistical
>     > Computing Platform: x86_64-pc-linux-gnu (64-bit)
>
>     > R is free software and comes with ABSOLUTELY NO WARRANTY.
>     > You are welcome to redistribute it under certain
>     > conditions.  Type 'license()' or 'licence()' for
>     > distribution details.
>
>     >   Natural language support but running in an English
>     > locale
>
>     > R is a collaborative project with many contributors.  Type
>     > 'contributors()' for more information and 'citation()' on
>     > how to cite R or R packages in publications.
>
>     > Type 'demo()' for some demos, 'help()' for on-line help,
>     > or 'help.start()' for an HTML browser interface to help.
>     > Type 'q()' to quit R.
>
>     > Error: not a proper file name Error in
>     > doWithOneRestart(return(` \\x82\\x0ccPV`), restart) :
>     > promise already under evaluation: recursive default
>     > argument reference or earlier problems?  Segmentation
>     > fault
>
>     > ----------------- snip
>     > ----------------------------------------------------------------------------------------------------------------------------
>
>     > Invoking R as a root user :-
>
>     > $ sudo -i root using crayshrimp ~ # R
>
>     >  *** caught segfault *** address (nil), cause 'unknown'
>
>     > Traceback: 1: NextMethod(.Generic) 2:
>     > Ops.numeric_version(R_version_built_under, "3.0.0") 3:
>     > testRversion(pkgInfo, package, pkgpath) 4:
>     > library(package, lib.loc = lib.loc, character.only = TRUE,
>     > logical.return = TRUE, warn.conflicts = warn.conflicts,
>     > quietly = quietly, mask.ok = mask.ok, exclude = exclude,
>     > include.only = include.only, attach.required =
>     > attach.required) 5: doTryCatch(return(expr), name,
>     > parentenv, handler) 6: tryCatchOne(expr, names, parentenv,
>     > handlers[[1L]]) 7: tryCatchList(expr, classes, parentenv,
>     > handlers) 8: tryCatch(library(package, lib.loc = lib.loc,
>     > character.only = TRUE, logical.return = TRUE,
>     > warn.conflicts = warn.conflicts, quietly = quietly,
>     > mask.ok = mask.ok, exclude = exclude, include.only =
>     > include.only, attach.required = attach.required), error =
>     > function(e) e) 9: require(pkg, quietly = TRUE,
>     > warn.conflicts = FALSE, character.only = TRUE) 10:
>     > .OptRequireMethods()
>
>     > Possible actions: 1: abort (with core dump, if enabled) 2:
>     > normal R exit 3: exit R without saving workspace 4: exit R
>     > saving workspace Selection: Error in
>     > doWithOneRestart(return(), restart) : not a proper file
>     > name
>
>     > R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
>     > Copyright (C) 2020 The R Foundation for Statistical
>     > Computing Platform: x86_64-pc-linux-gnu (64-bit)
>
>     > R is free software and comes with ABSOLUTELY NO WARRANTY.
>     > You are welcome to redistribute it under certain
>     > conditions.  Type 'license()' or 'licence()' for
>     > distribution details.
>
>     >   Natural language support but running in an English
>     > locale
>
>     > R is a collaborative project with many contributors.  Type
>     > 'contributors()' for more information and 'citation()' on
>     > how to cite R or R packages in publications.
>
>     > Type 'demo()' for some demos, 'help()' for on-line help,
>     > or 'help.start()' for an HTML browser interface to help.
>     > Type 'q()' to quit R.
>
>     > Error: not a proper file name Error in
>     > doWithOneRestart(return(), restart) : promise already
>     > under evaluation: recursive default argument reference or
>     > earlier problems?  Error in tryCatchOne(, names,
>     > parentenv, handlers[[1L]]) : promise already under
>     > evaluation: recursive default argument reference or
>     > earlier problems?  Error: not a proper file name Fatal
>     > error: unable to initialize the JIT
>
>     > ----------------- snip
>     > ----------------------------------------------------------------------------------------------------------------------------
>
>     > Thank you, Ashim
>
>     > ______________________________________________
>     > R-help using r-project.org mailing list -- To UNSUBSCRIBE and
>     > more, see https://stat.ethz.ch/mailman/listinfo/r-help
>     > PLEASE do read the posting guide
>     > http://www.R-project.org/posting-guide.html and provide
>     > commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list