I'm using bleeding-edge R-devel, so maybe my build is weird. Can anyone else reproduce this? View() seems to crash on just about anything. View(1:3) *** stack smashing detected ***: terminated Aborted (core dumped) If I debug(View) I get to the last line of code with nothing obviously looking pathological: Browse[1]> debug: invisible(.External2(C_dataviewer, x, title)) Browse[1]> x $x [1] "1" "2" "3" Browse[1]> title [1] "Data: 1:3" Browse[1]> *** stack smashing detected ***: terminated Aborted (core dumped) ===R Under development (unstable) (2024-04-24 r86483) Platform: x86_64-pc-linux-gnu Running under: Pop!_OS 22.04 LTS Matrix products: default BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=en_CA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C time zone: America/Toronto tzcode source: system (glibc) attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.5.0
On Wed, 24 Apr 2024 19:35:42 -0400 Ben Bolker <bbolker at gmail.com> wrote:> I'm using bleeding-edge R-devel, so maybe my build is weird. Can > anyone else reproduce this? > > View() seems to crash on just about anything.Not for me, sorry. If you have a sufficiently new processor, you can use `rr` [*] to capture the crash, set a breakpoint in in_R_X11_dataviewer and rewind, then set a watchpoint on the stack canary and run the program forward again: https://www.redhat.com/en/blog/debugging-stack-protector-failures If you can't locate the canary, try setting watchpoints on large local variables. Without `rr`, the procedure is probably the same, but without rewinding: set a breakpoint in in_R_X11_dataviewer, set some watchpoints, see if they fire when they shouldn't, start from scratch if you get past the watchpoints and the process crashes. I think that that either an object file didn't get rebuilt when it should have, or a shared library used by something downstream from View() got an ABI-breaking update. If this still reproduces with a clean rebuild of R, it's definitely worth investigating further, perhaps using AddressSanitizer. Valgrind may be lacking the information about the stack canary and thus failing to distinguish between overwriting the canary and normal access to a stack variable via a pointer. -- Best regards, Ivan [*] https://rr-project.org/ Edit distance of one from the domain name of the R project! Use rr replay -g $EVENT_NUMBER to debug past the initial execve() from the shell wrapper: https://github.com/rr-debugger/rr/wiki/FAQ
iuke-tier@ey m@iii@g oii uiow@@edu
2024-Apr-25 12:07 UTC
[Rd] [External] View() segfaulting ...
I saw it also on some of my Ubuntu builds, but the issue went away after a make clean/make, so maybe give that a try. Best, luke On Wed, 24 Apr 2024, Ben Bolker wrote:> I'm using bleeding-edge R-devel, so maybe my build is weird. Can anyone > else reproduce this? > > View() seems to crash on just about anything. > > View(1:3) > *** stack smashing detected ***: terminated > Aborted (core dumped) > > If I debug(View) I get to the last line of code with nothing obviously > looking pathological: > > Browse[1]> > debug: invisible(.External2(C_dataviewer, x, title)) > Browse[1]> x > $x > [1] "1" "2" "3" > > Browse[1]> title > [1] "Data: 1:3" > Browse[1]> > *** stack smashing detected ***: terminated > Aborted (core dumped) > > > > ===> R Under development (unstable) (2024-04-24 r86483) > Platform: x86_64-pc-linux-gnu > Running under: Pop!_OS 22.04 LTS > > Matrix products: default > BLAS/LAPACK: > /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK > version 3.10.0 > > locale: > [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 > [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 > [7] LC_PAPER=en_CA.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C > > time zone: America/Toronto > tzcode source: system (glibc) > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > loaded via a namespace (and not attached): > [1] compiler_4.5.0 > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke-tierney at uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu/