[Rd] Pressing either Ctrl-\ of Ctrl-4 core dumps R

William Dunlap wdunlap at tibco.com
Fri Feb 10 19:52:49 CET 2017


Control-backslash is the default way to generate SIGQUIT from the
keyboard on Unix and SIGQUIT, by default, aborts the process and
causes it to produce a core dump.  Do you want R to catch SIGQUIT?

% stty --all
speed 38400 baud; rows 24; columns 64; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D;
eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0
tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase
-tostop -echoprt echoctl echoke
Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Fri, Feb 10, 2017 at 10:40 AM, Henrik Bengtsson
<henrik.bengtsson at gmail.com> wrote:
> When running R from the terminal on Linux (Ubuntu 16.04), it core
> dumps whenever / wherever I press Ctrl-4 or Ctrl-\.  You get thrown
> back to the terminal with "Quit (core dump)" being the only message.
> Grepping the R source code, it doesn't look like that message is
> generated by R itself.  Over on Twitter, it has been confirmed to also
> happen on macOS.
>
> $ R -d valgrind --vanilla --quiet
> ==979== Memcheck, a memory error detector
> ==979== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
> ==979== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
> ==979== Command: /usr/lib/R/bin/exec/R --vanilla --quiet
> ==979==
>> 1+2
> [1] 3
>
> # At next prompt I press Ctrl-\. The same happens also when done in
> the middle of an entry.
>
>> ==979==
> ==979== Process terminating with default action of signal 3 (SIGQUIT)
> ==979==    at 0x576C9C3: __select_nocancel (syscall-template.S:84)
> ==979==    by 0x502EABE: R_SelectEx (in /usr/lib/R/lib/libR.so)
> ==979==    by 0x502EDDF: R_checkActivityEx (in /usr/lib/R/lib/libR.so)
> ==979==    by 0x502F32B: ??? (in /usr/lib/R/lib/libR.so)
> ==979==    by 0x4F6988B: Rf_ReplIteration (in /usr/lib/R/lib/libR.so)
> ==979==    by 0x4F69CF0: ??? (in /usr/lib/R/lib/libR.so)
> ==979==    by 0x4F69DA7: run_Rmainloop (in /usr/lib/R/lib/libR.so)
> ==979==    by 0x4007CA: main (in /usr/lib/R/bin/exec/R)
> ==979==
> ==979== HEAP SUMMARY:
> ==979==     in use at exit: 28,981,596 bytes in 13,313 blocks
> ==979==   total heap usage: 27,002 allocs, 13,689 frees, 49,025,684
> bytes allocated
> ==979==
> ==979== LEAK SUMMARY:
> ==979==    definitely lost: 0 bytes in 0 blocks
> ==979==    indirectly lost: 0 bytes in 0 blocks
> ==979==      possibly lost: 0 bytes in 0 blocks
> ==979==    still reachable: 28,981,596 bytes in 13,313 blocks
> ==979==         suppressed: 0 bytes in 0 blocks
> ==979== Rerun with --leak-check=full to see details of leaked memory
> ==979==
> ==979== For counts of detected and suppressed errors, rerun with: -v
> ==979== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
> Quit (core dumped)
>
> $ R --version
> R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
> Copyright (C) 2016 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> /Henrik
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list