Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 442070

Summary: app-misc/screen segfaults when starting a new session
Product: Gentoo Linux Reporter: Elis Axelsson <elis.axelsson>
Component: Current packagesAssignee: Sven Wegener <swegener>
Status: RESOLVED FIXED    
Severity: normal CC: code, dnk, doug, kbonner, kfm, shell-tools
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 424557    
Attachments: strace of screen
emerge --info
/proc/cpuinfo
make.conf
script of manual screen build from source
emerge --info
make.conf
Update of the patch that breaks my build

Description Elis Axelsson 2012-11-06 17:26:19 UTC
Created attachment 328558 [details]
strace of screen

Installed a fresh system on a new box yesterday, but can't get screen to work due to segfaults.

1. emerge screen
2. screen

The console where I started screen just hangs and I get this in dmesg:
[ 8279.638648] screen[28901]: segfault at 25bc ip 000000000042c696 sp 00007fff6e8ef7a0 error 4 in screen[400000+54000]
Comment 1 Elis Axelsson 2012-11-06 17:26:54 UTC
Created attachment 328560 [details]
emerge --info
Comment 2 Elis Axelsson 2012-11-06 17:27:14 UTC
Created attachment 328562 [details]
/proc/cpuinfo
Comment 3 Elis Axelsson 2012-11-06 17:27:27 UTC
Created attachment 328564 [details]
make.conf
Comment 4 Elis Axelsson 2012-11-06 17:28:45 UTC
Created attachment 328566 [details]
script of manual screen build from source

I tried to build a screen by hand from source with the tarball from gnu. And that one works as expected. Attached script of buildprocess.
Comment 5 Elis Axelsson 2012-11-06 18:03:22 UTC
Commenting line #93 in the ebuild for screen makes it work, in other words, not applying the patchfile: "${FILESDIR}"/${P}-cppflags.patch
Comment 6 Elis Axelsson 2012-11-06 18:10:27 UTC
Created attachment 328570 [details]
emerge --info
Comment 7 Elis Axelsson 2012-11-06 18:10:52 UTC
Created attachment 328572 [details]
make.conf
Comment 8 Elis Axelsson 2012-11-06 19:09:48 UTC
Created attachment 328578 [details, diff]
Update of the patch that breaks my build

This is an update for the patch that breaks my build, and it seems to fix the problem. And still work on other systems that didn't have the problem to begin with.
Comment 9 Godfath3r 2012-11-06 19:12:38 UTC
Same here problem here... 

This proposed patch https://424557.bugs.gentoo.org/attachment.cgi?id=328514 (same as Elis gave) works for me too.
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2012-11-06 19:15:10 UTC
I reverted last commit. So it should be fine for now.
Comment 11 dnk 2012-11-07 02:44:38 UTC
I had the same problem. Fixed it by compiling with the nethack USE-flag.

The problem is the -DNONETHACK compile flag. comm.h is "automagically" generated from comm.c, and everything expects all RC_* #defines to match exactly the the offsets in the comms[]-array (comm.c).

The -DNONETHACK flag causes config.h to #define NETHACK (but comm.h is not regenerated), which messes up the offsets.
Comment 12 Justin Lecher (RETIRED) gentoo-dev 2012-11-07 16:02:36 UTC
*** Bug 442182 has been marked as a duplicate of this bug. ***
Comment 13 Justin Lecher (RETIRED) gentoo-dev 2012-11-07 16:05:19 UTC
I did a revbump to force rebuild.

+*screen-4.0.3-r6 (07 Nov 2012)
+
+  07 Nov 2012; Justin Lecher <jlec@gentoo.org> -screen-4.0.3-r5.ebuild,
+  +screen-4.0.3-r6.ebuild:
+  Revbump to force everyone to rebuild. This should save those who emerged the
+  broken ebuild #442070
+