Bug 23995

Summary: loadkeys fails for gr.kmap.gz
Product: [Retired] Red Hat Linux Reporter: Sarantis Paskalis <paskalis>
Component: console-toolsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-05 09:22:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sarantis Paskalis 2001-01-14 17:04:14 UTC
loadkeys fails with the error message:

$ loadkeys /usr/lib/kbd/keymaps/i386/qwerty/gr.kmap.gz
Loading /usr/lib/kbd/keymaps/i386/qwerty/gr.kmap.gz
findfile(): timeout waiting for undead child(ren) ?

Note that it doesn't happen with the unzipped gr.kmap or with the other
zipped kmaps.  For example 

$ loadkeys /usr/lib/kbd/keymaps/i386/qwerty/gr-pc.kmap.gz
Loading /usr/lib/kbd/keymaps/i386/qwerty/gr-pc.kmap.gz

succeeds as well as

$ loadkeys /tmp/gr.kmap
Loading /tmp/gr.kmap

Comment 1 Bernhard Rosenkraenzer 2001-01-17 14:42:23 UTC
strace indicates that gunzip can't uncompress the file because of a broken pipe,
looking into this

Comment 2 Bernhard Rosenkraenzer 2001-01-17 14:56:19 UTC
This is definitely odd... Can't be a gzip problem (gunzip uncompresses the file
properly, and the problem still happens when the file is bzip2ed instead), and
the file isn't handled differently from any other keymaps.


Comment 3 Sarantis Paskalis 2001-01-17 15:10:45 UTC
When debugging with strace -f, it seems to reap all of its children.

I don't really know how strace interacts with the actual executable, but it
(strace) seems to insert the necessary delays for the executable (loadkeys) to
catch the undead children.

Comment 4 Bernhard Rosenkraenzer 2001-01-17 15:37:23 UTC
This has nothing to do with delays - adding tons of sleep()s doesn't fix the
problem.
It's something even weirder.
If you get rid of the exit conditions, you can strace the pid of the hanging
gzip process, and it hangs while writing the decompressed data to fd 1.
ATM I'm suspecting this happens when the feeder dies before the decompressor is
finished.


Comment 5 Sarantis Paskalis 2001-03-05 09:22:43 UTC
Can the gr.kmap keymap be shipped unzipped with the next stable version?  It
seems that the unzipped version of the file is ok with loadkeys.  The gzipped
one is unusable and leads to manual gunzip after frustration.

I know that the correct fix is to fix the package, but since you are on a
deadline to ship a new version and the maintainer of console-tools seems
inactive, could at least this bandaid be applied?

Comment 6 Bernhard Rosenkraenzer 2001-03-12 11:26:36 UTC
Done in -34