LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-02-2013, 09:23 AM   #1
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
[BUG] "screen" will not exit unless ^Z


Update: Downgraded NVIDIA driver from 319.60 to 319.49 and the problem disappeared.

Hello,

I am running slackware-current (not slackware64-current, not slackwarearm-current, etc.) mirrored from ftp.slackware.com today.

When I start "screen" in an X terminal emulator, e.g. konsole or xterm, then press ^d or type "exit" to end the screen session, or detach from the session with "^a d", screen prints "[screen is terminating]" but I cannot go back to the shell prompt unless pressing ^Z (^C does not work).

There is no such problem in text tty. Only in X terminal emulators.

A recording is attached
Code:
chmod +x bbsplay.txt
./bbsplay.txt screen.log
Any idea? Thanks!
Attached Files
File Type: txt bbsplay.txt (1.2 KB, 16 views)
File Type: log screen.log (3.9 KB, 11 views)

Last edited by guanx; 10-08-2013 at 06:06 AM.
 
Old 10-02-2013, 09:59 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,553

Rep: Reputation: 424Reputation: 424Reputation: 424Reputation: 424Reputation: 424
i also have a -current machine and it's working fine here
tried ^d and ^a d and both are working
 
Old 10-07-2013, 05:27 AM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
[removed]

Last edited by guanx; 10-07-2013 at 06:33 AM.
 
Old 10-07-2013, 10:27 AM   #4
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
Strace shows that when this problem occurs, screen receives no SIGHUP which it ought to receive. The following patch fixes it but the origin of the bug is unknown to me
Code:
diff -ru screen-4.0.3.orig/screen.c screen-4.0.3/screen.c
--- screen-4.0.3.orig/screen.c  2003-09-08 16:26:41.000000000 +0200
+++ screen-4.0.3/screen.c       2013-10-07 17:15:07.068676486 +0200
@@ -360,14 +360,11 @@
 #if (defined(AUX) || defined(_AUX_SOURCE)) && defined(POSIX)
   setcompat(COMPAT_POSIX|COMPAT_BSDPROT); /* turn on seteuid support */
 #endif
-#if defined(sun) && defined(SVR4)
   {
-    /* Solaris' login blocks SIGHUP! This is _very bad_ */
     sigset_t sset;
     sigemptyset(&sset);
     sigprocmask(SIG_SETMASK, &sset, 0);
   }
-#endif
 
   /*
    *  First, close all unused descriptors
I am terrified by the coding style of screen. I see obvious use-after-free sometimes. The K&R manner gives me an impression that debugging this program is beyond my ability. So ... I don't know how I fixed it, nor will I know in the future.
 
Old 10-07-2013, 10:55 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
"screen" does have somewhat of a reputation for dodgy code. Have you considered using tmux instead?
 
Old 10-07-2013, 11:03 AM   #6
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by GazL View Post
"screen" does have somewhat of a reputation for dodgy code. Have you considered using tmux instead?
Not yet, because screen is more widely installed and I see no strong reason to learn a new thing when the old suffices.
 
Old 10-07-2013, 07:39 PM   #7
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 867

Rep: Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749
This patch doesn't look correct to me, and this part of the code is unchanged in git. Unless the problem with the code (and the fix) can be adequately explained I'm not going to apply this patch.

Besides that, screen is exiting correctly here on my -current machines in all of the terminal emulators that I tested. Not sure what could be different on your machine.
 
1 members found this post helpful.
Old 10-07-2013, 11:49 PM   #8
Thom1b
Member
 
Registered: Mar 2010
Posts: 70

Rep: Reputation: 30
Quote:
Originally Posted by guanx View Post
Not yet, because screen is more widely installed and I see no strong reason to learn a new thing when the old suffices.
A good reason is the old is very buggy and doesn't seem maintain. I switched from screen to tmux (maybe two years ago) because of bugs, and I'm very happy with tmux.
 
1 members found this post helpful.
Old 10-08-2013, 04:20 AM   #9
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by volkerdi View Post
This patch doesn't look correct to me, and this part of the code is unchanged in git. Unless the problem with the code (and the fix) can be adequately explained I'm not going to apply this patch.

Besides that, screen is exiting correctly here on my -current machines in all of the terminal emulators that I tested. Not sure what could be different on your machine.
I find some bug reports which are probably related to this error:
http://lists.kde.org/?l=kde-core-dev...6773523973&w=4
http://lists.opensuse.org/opensuse-b.../msg05412.html
It looks very much like KDE should be fixed also, because sometimes I get SIGINT blocked upon KDE start, instead of SIGHUP. This is fatal because I use SIGINT much more often (Ctrl-C doesn't work). I confirmed by logging on and off to/from KDE in runlevel 4, and running this simple program:
Code:
$ cat siggetmask.c 
#include <signal.h>

int main()
{
    return siggetmask();
}
$ make siggetmask
cc     siggetmask.c   -o siggetmask
siggetmask.c: In function ‘main’:
siggetmask.c:5:5: warning: ‘siggetmask’ is deprecated (declared at /usr/include/signal.h:203) [-Wdeprecated-declarations]
     return siggetmask();
     ^
$ ./siggetmask; echo $?
1 # sometimes it's 2, but in most cases 1
$
Anyway, because screen must use SIGHUP, it is good practice to ensure it unblocked. This patch above doesn't harm. Does it? I'm novice on signals. Please do point out if I'm wrong. Thanks!
 
Old 10-08-2013, 04:29 AM   #10
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by Thom1b View Post
A good reason is the old is very buggy and doesn't seem maintain. I switched from screen to tmux (maybe two years ago) because of bugs, and I'm very happy with tmux.
I'd be very happy to use tmux but most of the computers I use don't have it pre-installed. I can only find screen. And I don't have admin privilege on 1/3 of them. It's overkill to install tmux in my $HOME every time I touch a new computer.

Another reason to stay with screen is that when my colleagues ask me how to do something I can simply sent them the screen command, without asking them to install tmux first. Installing something seems more intrusive than running a well known command.
 
Old 10-08-2013, 04:36 AM   #11
Thom1b
Member
 
Registered: Mar 2010
Posts: 70

Rep: Reputation: 30
Quote:
Originally Posted by guanx View Post
I'd be very happy to use tmux but most of the computers I use don't have it pre-installed. I can only find screen. And I don't have admin privilege on 1/3 of them. It's overkill to install tmux in my $HOME every time I touch a new computer.
You're right, this is a good reason to stay with screen.

Quote:
Originally Posted by guanx View Post
Another reason to stay with screen is that when my colleagues ask me how to do something I can simply sent them the screen command, without asking them to install tmux first. Installing something seems more intrusive than running a well known command.
Now tmux is available in many distribution, maybe it's a good idea to suggest Pat to include tmux in slackware.
 
1 members found this post helpful.
Old 10-08-2013, 06:07 AM   #12
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
Downgraded NVIDIA driver from 319.60 to 319.49 and the problem disappeared. If the error comes again I will update this thread.
 
1 members found this post helpful.
Old 10-08-2013, 11:01 AM   #13
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 291

Rep: Reputation: 166Reputation: 166
Hello,

I looked at this and experienced the same issue on slackware64-current (beta from sept 18) with nvidia 319.60, but only when screen is started from konsole. There's no problem when screen is started from uxterm, xterm, terminal.

Downgrading nvidia to 319.49 solves the problem.

I reinstalled nvidia 319.60, and, started Xfce. I tried screen inside konsole, and there's no issue. I returned to Kde, started screen inside konsole, and I encountered the issue again.

I also tried on slackware 14.0 with nvidia 319.60 and didn't experienced this issue.

--
SeB
 
Old 10-08-2013, 11:53 AM   #14
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Original Poster
Rep: Reputation: 146Reputation: 146
Hi phenixia2003,

Thanks for your very clear description of your test result. I made a mistake in my previous tests by sometimes starting xterm/rxvt from konsole, then they inherited the signal mask of konsole.

My test result with slackware-current + NVIDIA 319.60 / 319.49 is identical to your result with slackware64-current.
 
Old 01-04-2014, 12:23 AM   #15
bosth
Member
 
Registered: Apr 2011
Posts: 225

Rep: Reputation: 68
I ran into this same issue as well. Disabling most Desktop Effects fixed it for me (not sure exactly which one).

slackware64-current, KDE 4.12, NVIDIA 331.20

The issue is back. Switching to tmux.

Last edited by bosth; 01-07-2014 at 10:35 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
teamviewer "show black screen" and "disable remote input" in x11vnc ? alirezaimi Linux - Networking 0 05-08-2013 06:44 PM
How to suppress "press ESC to exit full-screen mode" in Firefox AGer Linux - Software 1 01-19-2010 03:26 PM
Fedora Core 2: Screen Resolution can not change from "800X600" to "1024X 768" suhaimi_sj Fedora - Installation 18 12-17-2009 03:29 AM
How to exit and save (or just to exit) inside a "make config" running command? scrat75 Linux - Kernel 6 09-05-2008 04:02 PM
tar "Error exit delayed from previous errors" using "-C /" ToK Linux - Software 2 03-19-2008 06:49 AM


All times are GMT -5. The time now is 09:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration