Manuel.A.Morales@williams.edu
2005-Apr-26 16:47 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
I tried to submit this in R, but not sure if it worked. When running R as sudo, using ctrl-c dumps me to the command line. Hitting exit to exit the terminal window results in R taking 100% of resources. I am using R-2.1.0 on Fedora Core 3. Thanks. Manuel
MSchwartz@MedAnalytics.com
2005-Apr-26 17:34 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 2005-04-26 at 16:47 +0200, Manuel.A.Morales@williams.edu wrote:> I tried to submit this in R, but not sure if it worked. > > When running R as sudo, using ctrl-c dumps me to the command line. > Hitting exit to exit the terminal window results in R taking 100% of > resources. > > I am using R-2.1.0 on Fedora Core 3. > > Thanks. > > ManuelI suspect that we are going to need more information. Running on a fully updated FC3 box using Xfce's Terminal, gnome-terminal and kconsole, I cannot duplicate this issue either as a user or as root using sudo. Attach the output of:> R.versionWas there a program running in R at the time, or were you at the R prompt when you hit ctrl-c? Which desktop environment and terminal emulator are you using? Have you perhaps re-mapped ctrl-c using modified keybindings? Marc
MSchwartz@MedAnalytics.com
2005-Apr-26 18:30 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 2005-04-26 at 11:41 -0400, Manuel Morales wrote:> On Tue, 2005-04-26 at 10:34 -0500, Marc Schwartz wrote: > > On Tue, 2005-04-26 at 16:47 +0200, Manuel.A.Morales@williams.edu wrote: > > > I tried to submit this in R, but not sure if it worked. > > > > > > When running R as sudo, using ctrl-c dumps me to the command line. > > > Hitting exit to exit the terminal window results in R taking 100% of > > > resources. > > > > > > I am using R-2.1.0 on Fedora Core 3. > > > > > > Thanks. > > > > > > Manuel > > > > I suspect that we are going to need more information. > > > > Running on a fully updated FC3 box using Xfce's Terminal, gnome-terminal > > and kconsole, I cannot duplicate this issue either as a user or as root > > using sudo. > > > Note that this doesn't happen if I run R as a normal user or as root. > I.e., > > R > <ctrl-c> > or > > su > R > <ctrl-c> > works fine. > > sudo R > <ctrl-c> > does not. > > > Attach the output of: > > > > > R.version > > > > > R.version > _ > platform i686-pc-linux-gnu > arch i686 > os linux-gnu > system i686, linux-gnu > status > major 2 > minor 1.0 > year 2005 > month 04 > day 18 > language R > > > > Was there a program running in R at the time, or were you at the R > > prompt when you hit ctrl-c? > > > > R prompt > > > Which desktop environment and terminal emulator are you using? > > > > Gnome and gnome-terminal, although the problem also happens when using > xterm. > > > Have you perhaps re-mapped ctrl-c using modified keybindings? > > No. And ctrl-c works fine as a normal user or as root.Manuel, Please be sure to copy R-bugs@biostat.ku.dk when you reply so that the thread is properly archived in the bug tracking system. I tried this under GNOME using gnome-terminal and the unpatched version of R 2.1.0 and still could not duplicate the problem. Can you post back with the contents of /etc/sudoers? The other possibility would be to run: sudo R -d gdb in gnome-terminal. When you get to the (gdb) prompt, type 'r' (without the quotes) for run, which will start up R. If you can replicate the problem under gdb and R exits after a ctrl-c, you should be left at a (gdb) prompt. If that occurs, type 'bt' (without the quotes), which will display a backtrace. If that all works, post the output of gdb from the crtl-c through and including the backtrace here. Marc
MSchwartz@MedAnalytics.com
2005-Apr-26 18:30 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 2005-04-26 at 11:41 -0400, Manuel Morales wrote:> On Tue, 2005-04-26 at 10:34 -0500, Marc Schwartz wrote: > > On Tue, 2005-04-26 at 16:47 +0200, Manuel.A.Morales@williams.edu wrote: > > > I tried to submit this in R, but not sure if it worked. > > > > > > When running R as sudo, using ctrl-c dumps me to the command line. > > > Hitting exit to exit the terminal window results in R taking 100% of > > > resources. > > > > > > I am using R-2.1.0 on Fedora Core 3. > > > > > > Thanks. > > > > > > Manuel > > > > I suspect that we are going to need more information. > > > > Running on a fully updated FC3 box using Xfce's Terminal, gnome-terminal > > and kconsole, I cannot duplicate this issue either as a user or as root > > using sudo. > > > Note that this doesn't happen if I run R as a normal user or as root. > I.e., > > R > <ctrl-c> > or > > su > R > <ctrl-c> > works fine. > > sudo R > <ctrl-c> > does not. > > > Attach the output of: > > > > > R.version > > > > > R.version > _ > platform i686-pc-linux-gnu > arch i686 > os linux-gnu > system i686, linux-gnu > status > major 2 > minor 1.0 > year 2005 > month 04 > day 18 > language R > > > > Was there a program running in R at the time, or were you at the R > > prompt when you hit ctrl-c? > > > > R prompt > > > Which desktop environment and terminal emulator are you using? > > > > Gnome and gnome-terminal, although the problem also happens when using > xterm. > > > Have you perhaps re-mapped ctrl-c using modified keybindings? > > No. And ctrl-c works fine as a normal user or as root.Manuel, Please be sure to copy R-bugs@biostat.ku.dk when you reply so that the thread is properly archived in the bug tracking system. I tried this under GNOME using gnome-terminal and the unpatched version of R 2.1.0 and still could not duplicate the problem. Can you post back with the contents of /etc/sudoers? The other possibility would be to run: sudo R -d gdb in gnome-terminal. When you get to the (gdb) prompt, type 'r' (without the quotes) for run, which will start up R. If you can replicate the problem under gdb and R exits after a ctrl-c, you should be left at a (gdb) prompt. If that occurs, type 'bt' (without the quotes), which will display a backtrace. If that all works, post the output of gdb from the crtl-c through and including the backtrace here. Marc
Manuel.A.Morales@williams.edu
2005-Apr-26 18:53 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 2005-04-26 at 11:30 -0500, Marc Schwartz wrote:> On Tue, 2005-04-26 at 11:41 -0400, Manuel Morales wrote: > > On Tue, 2005-04-26 at 10:34 -0500, Marc Schwartz wrote: > > > On Tue, 2005-04-26 at 16:47 +0200, Manuel.A.Morales@williams.edu wrote: > > > > I tried to submit this in R, but not sure if it worked. > > > > > > > > When running R as sudo, using ctrl-c dumps me to the command line. > > > > Hitting exit to exit the terminal window results in R taking 100% of > > > > resources. > > > > > > > > I am using R-2.1.0 on Fedora Core 3. > > > > > > > > Thanks. > > > > > > > > Manuel > > > > > > I suspect that we are going to need more information. > > > > > > Running on a fully updated FC3 box using Xfce's Terminal, gnome-terminal > > > and kconsole, I cannot duplicate this issue either as a user or as root > > > using sudo. > > > > > Note that this doesn't happen if I run R as a normal user or as root. > > I.e., > > > > R > > <ctrl-c> > > or > > > > su > > R > > <ctrl-c> > > works fine. > > > > sudo R > > <ctrl-c> > > does not. > > > > > Attach the output of: > > > > > > > R.version > > > > > > > > R.version > > _ > > platform i686-pc-linux-gnu > > arch i686 > > os linux-gnu > > system i686, linux-gnu > > status > > major 2 > > minor 1.0 > > year 2005 > > month 04 > > day 18 > > language R > > > > > > > Was there a program running in R at the time, or were you at the R > > > prompt when you hit ctrl-c? > > > > > > > R prompt > > > > > Which desktop environment and terminal emulator are you using? > > > > > > > Gnome and gnome-terminal, although the problem also happens when using > > xterm. > > > > > Have you perhaps re-mapped ctrl-c using modified keybindings? > > > > No. And ctrl-c works fine as a normal user or as root. > > Manuel, > > Please be sure to copy R-bugs@biostat.ku.dk when you reply so that the > thread is properly archived in the bug tracking system. > > I tried this under GNOME using gnome-terminal and the unpatched version > of R 2.1.0 and still could not duplicate the problem. > > Can you post back with the contents of /etc/sudoers? > > The other possibility would be to run: > > sudo R -d gdb > > in gnome-terminal. When you get to the (gdb) prompt, type 'r' (without > the quotes) for run, which will start up R. > > If you can replicate the problem under gdb and R exits after a ctrl-c, > you should be left at a (gdb) prompt. If that occurs, type 'bt' (without > the quotes), which will display a backtrace. If that all works, post the > output of gdb from the crtl-c through and including the backtrace here. > > Marc > >Program received signal SIGINT, Interrupt. 0x006547a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) bt #0 0x006547a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x0072da1d in ___newselect_nocancel () from /lib/tls/libc.so.6 #2 0x0813e060 in R_SelectEx (n=1, readfds=0x825dde0, writefds=0x0, exceptfds=0x0, timeout=0x0, intr=0x813e5a8 <handleInterrupt>) at sys-std.c:138 #3 0x0813e281 in R_checkActivityEx (usec=-1, ignore_stdin=0, intr=0x813e5a8 <handleInterrupt>) at sys-std.c:302 #4 0x0813e6f0 in Rstd_ReadConsole (prompt=0x0, buf=0xbfffb33c "", len=1024, addtohistory=-514) at sys-std.c:642 #5 0x080cac4a in Rf_ReplIteration (rho=0x9522cb8, savestack=-514, browselevel=0, state=0xbfffb330) at main.c:208 #6 0x080cadef in R_ReplConsole (rho=0x9522cb8, savestack=0, browselevel=0) at main.c:306 #7 0x080cb03d in run_Rmainloop () at main.c:685 #8 0x0805d948 in main (ac=1, av=0xbfffb844) at Rmain.c:31 The relevant line in my /etc/sudoers: mmorales ALL=(ALL) ALL
On 26.04.2005, at 12:52, Manuel.A.Morales@williams.edu wrote:> Program received signal SIGINT, Interrupt. > 0x006547a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2Thanks you, however Marc omitted to mention that you need to type signal SIGINT before running the backtrace (bt), because gdb will catch the INT signal thus not leading to the desired crash and the backtrace just shows when you hit Ctrl-C, not what happens after. Only after the signal SIGINT you should get the crash (if at all). Cheers, Simon
MSchwartz@MedAnalytics.com
2005-Apr-26 19:25 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 2005-04-26 at 13:14 -0400, Simon Urbanek wrote:> On 26.04.2005, at 12:52, Manuel.A.Morales@williams.edu wrote: > > > Program received signal SIGINT, Interrupt. > > 0x006547a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 > > Thanks you, however Marc omitted to mention that you need to type > signal SIGINT > before running the backtrace (bt), because gdb will catch the INT > signal thus not leading to the desired crash and the backtrace just > shows when you hit Ctrl-C, not what happens after. Only after the > signal SIGINT you should get the crash (if at all). > > Cheers, > SimonThanks Simon for picking that up. My error. Also, apologies for the double post, not sure how that happened. Manuel, I should have asked earlier, but I presume that you installed from source as I don't see RPMs for 2.1.0 yet? Marc
ripley@stats.ox.ac.uk
2005-Apr-26 20:09 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 26 Apr 2005, Peter Dalgaard wrote:> MSchwartz@medanalytics.com writes: > >>> Thanks you, however Marc omitted to mention that you need to type >>> signal SIGINT >>> before running the backtrace (bt), because gdb will catch the INT >>> signal thus not leading to the desired crash and the backtrace just >>> shows when you hit Ctrl-C, not what happens after. Only after the >>> signal SIGINT you should get the crash (if at all). > ... >> Manuel, I should have asked earlier, but I presume that you installed >> from source as I don't see RPMs for 2.1.0 yet? >> >> Marc > > The effect seem to have been neatly backported to 2.0.1 though... > > Gdb doesn't seem to help. If you run a ps while "sudo R" is running, > you'll see something like this: > > root 30416 0.0 0.1 2356 252 pts/5 S+ 19:48 0:00 sesh /usr/bin/R > root 30417 10.0 7.2 18016 13860 pts/5 S+ 19:48 0:01 /usr/lib/R/bin/exec/R > > What I suspect is happening is that the ^C kills the sesh process, but > that in turn does not manage to kill R.Should it? R traps that signal. I'll now make the comment I thought when I first saw this: Why is this a bug report against R not sudo? -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
MSchwartz@MedAnalytics.com
2005-Apr-26 20:18 UTC
[Rd] Ctrl-c crashes R when run as sudo (PR#7819)
On Tue, 2005-04-26 at 19:59 +0200, Peter Dalgaard wrote:> MSchwartz@medanalytics.com writes: > > > > Thanks you, however Marc omitted to mention that you need to type > > > signal SIGINT > > > before running the backtrace (bt), because gdb will catch the INT > > > signal thus not leading to the desired crash and the backtrace just > > > shows when you hit Ctrl-C, not what happens after. Only after the > > > signal SIGINT you should get the crash (if at all). > ... > > Manuel, I should have asked earlier, but I presume that you installed > > from source as I don't see RPMs for 2.1.0 yet? > > > > Marc > > The effect seem to have been neatly backported to 2.0.1 though... > > Gdb doesn't seem to help. If you run a ps while "sudo R" is running, > you'll see something like this: > > root 30416 0.0 0.1 2356 252 pts/5 S+ 19:48 0:00 sesh /usr/bin/R > root 30417 10.0 7.2 18016 13860 pts/5 S+ 19:48 0:01 /usr/lib/R/bin/exec/R > > What I suspect is happening is that the ^C kills the sesh process, but > that in turn does not manage to kill R.So is this perhaps an SELinux issue? I don't get sesh running when I use sudo R. That would perhaps explain why I am not seeing it. Given the almost daily changes in SELinux policies, I have foregone using it for the time being. I was having all kinds of 'avc' related errors, so I gave up until things stabilize more. Marc
I get no crash after typing signal SIGINT - it just returns me to the R prompt. On Tue, 2005-04-26 at 13:14 -0400, Simon Urbanek wrote:> On 26.04.2005, at 12:52, Manuel.A.Morales@williams.edu wrote: > > > Program received signal SIGINT, Interrupt. > > 0x006547a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 > > Thanks you, however Marc omitted to mention that you need to type > signal SIGINT > before running the backtrace (bt), because gdb will catch the INT > signal thus not leading to the desired crash and the backtrace just > shows when you hit Ctrl-C, not what happens after. Only after the > signal SIGINT you should get the crash (if at all). > > Cheers, > Simon
MSchwartz@MedAnalytics.com
2005-Apr-27 15:34 UTC
[Rd] Re: Ctrl-c crashes R when run as sudo (PR#7819)
> On Tue, 2005-04-26 at 19:59 +0200, Peter Dalgaard wrote: > > MSchwartz at medanalytics.com writes: > > The effect seem to have been neatly backported to 2.0.1 though... > > > > Gdb doesn't seem to help. If you run a ps while "sudo R" is running, > > you'll see something like this: > > > > root 30416 0.0 0.1 2356 252 pts/5 S+ 19:48 0:00 sesh /usr/bin/R > > root 30417 10.0 7.2 18016 13860 pts/5 S+ 19:48 0:01 /usr/lib/R/bin/exec/R > > > > What I suspect is happening is that the ^C kills the sesh process, but > > that in turn does not manage to kill R. > > So is this perhaps an SELinux issue? I don't get sesh running when I use > sudo R. > > That would perhaps explain why I am not seeing it. Given the almost > daily changes in SELinux policies, I have foregone using it for the time > being. I was having all kinds of 'avc' related errors, so I gave up > until things stabilize more.Hi all, Just a quick note that I seem to have confirmed this as a SELinux/sudo interaction issue. I re-booted my system this morning, with SELinux enabled using the targeted policy, which is the default for FC3. I was then able to confirm the behavior that Manuel initially reported here. As a result, I have filed a bug report with Fedora's Bugzilla against sudo: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156086 and we'll let the FC folks take it from there. Needless to say, I am now back with SELinux disabled... Presumably we can now close out the R bug report. HTH, Marc Schwartz