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

error inside docker container Error in as.vector(x, "character") #43

Closed
dpastoor opened this Issue Sep 15, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@dpastoor

dpastoor commented Sep 15, 2018

> ps::ps()
Error in as.vector(x, "character") : 
  cannot coerce type 'externalptr' to vector of type 'character'

replicated on both R 3.3 and R 3.5 when R was built from source on Ubuntu.

When trying from the rocker/verse docker image it was not reproducible (it worked).

Any ideas what might cause this and how I can work to debug further?

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Sep 15, 2018

Interesting. Which containers are these?

@dpastoor

This comment has been minimized.

dpastoor commented Sep 17, 2018

They are currently private, but mainly because I have some hard coded enterprise keys for rstudio server pro.

I can publish some of the upstream images, eg prior to adding RSP, no problem. Would that be of interest?

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Sep 17, 2018

I can publish some of the upstream images, eg prior to adding RSP, no problem. Would that be of interest?

Assuming they also fail, yes, please.

@dpastoor

This comment has been minimized.

dpastoor commented Sep 17, 2018

published to docker hub at

dpastoor/tidydeps:latest

run in the container

docker run -it dpastoor/tidydeps:latest /bin/bash

R versions available at /opt/R, for example:

  • 3.5.1
  • 3.4.4
  • 3.3.3
  • 3.2.3
/opt/R/3.5.1/bin/R

When launching in:

> install.packages("ps")
Installing package into ‘/usr/local/lib/R/3.5.1/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/ps_1.1.0.tar.gz'
Content type 'application/x-gzip' length 242390 bytes (236 KB)
==================================================
downloaded 236 KB

* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** libs
gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -Wall px.c -o px
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c api-common.c -o api-common.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c common.c -o common.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c extra.c -o extra.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c dummy.c -o dummy.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c posix.c -o posix.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c api-posix.c -o api-posix.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c linux.c -o linux.o
gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c api-linux.c -o api-linux.o
gcc -shared -L/opt/R/3.5.1/lib/R/lib -L/usr/local/lib -o ps.so init.o api-common.o common.o extra.o dummy.o posix.o api-posix.o linux.o api-linux.o -L/opt/R/3.5.1/lib/R/lib -lR
installing via 'install.libs.R' to /usr/local/lib/R/3.5.1/site-library/ps
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (ps)

The downloaded source packages are in
	‘/tmp/RtmpJdhZKs/downloaded_packages’
> ps::ps()
Error in as.vector(x, "character") :
  cannot coerce type 'externalptr' to vector of type 'character'

I will follow up privately on the docker files used to build.

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Sep 17, 2018

YEah, I can reproduce this.

@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Sep 17, 2018

It fails if tibble is not installed. Base R is not great printing list columns. Will fix soon!

@dpastoor

This comment has been minimized.

dpastoor commented Sep 17, 2018

Awesome - confirming on my end as well. Also installed tibble and looked good:

> ps::ps()
# A tibble: 2 x 11
    pid  ppid name  username status  user system    rss   vms
* <int> <int> <chr> <chr>    <chr>  <dbl>  <dbl>  <dbl> <dbl>
1    17     1 R     root     runni…   0.7   0.34 171928 27352
2     1     0 bash  root     sleep…   0     0.02   4976   930
# ... with 2 more variables: created <dttm>, ps_handle <I(list)>
@gaborcsardi

This comment has been minimized.

Member

gaborcsardi commented Sep 17, 2018

Should be fixed in the GH repo, I'll make a release soonish.

gaborcsardi added a commit that referenced this issue Sep 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment