Bug 57639

Summary: man -- /path/to/file segfaults
Product: [Retired] Red Hat Raw Hide Reporter: Bill Crawford <billc>
Component: manAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.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: 2002-03-09 02:00:11 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:
Attachments:
Description Flags
Backtrace showing source location where segfault occurs. none

Description Bill Crawford 2001-12-17 23:37:36 UTC
Description of Problem:
Since the upgrade to man-1.5j, lesspipe.sh fails when trying to view a man
page ...

Version-Release number of selected component (if applicable):
man-1.5j-1

How Reproducible:
less /usr/share/doc/rpm-devel-4.0.4/apidocs/man/man3/queryformat.3.gz 
man -- /tmp/queryformat.3

Basically lesspipe.sh fails to work as expected because man -- /filename
segfaults.  Rebuilding the source package on the current Raw Hide snapshot
failed to make any difference (it did fix netpbm-progs though :o)

It looks like the new option-processing code in 1.5j doesn't like the bare
-- option.  Downgrading the man-1.5i-whatever fixes it for now.

Comment 1 Bernhard Rosenkraenzer 2002-01-17 16:40:46 UTC
I can't reproduce this with man-1.5j-2 and less-358-24, assuming it's fixed.

Comment 2 Bill Crawford 2002-01-18 05:47:49 UTC
[bill@pikachu bill]$ man --
/usr/share/doc/rpm-devel-4.0.4/apidocs/man/man3/queryformat.3.gz 
Segmentation fault
[bill@pikachu bill]$ man --version 
man, version 1.5j

[bill@pikachu bill]$ rpm -q man
man-1.5j-2
[bill@pikachu bill]$ rpm -q less
less-358-24


Comment 3 Bill Crawford 2002-01-18 05:57:23 UTC
Also:

[root@pikachu root]# rpm -V man less
[root@pikachu root]# 

I think the problem relates to option processing, so it could be a glibc issue?

[bill@pikachu bill]$ ldd /usr/bin/man
        libc.so.6 => /lib/i686/libc.so.6 (0x40037000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[bill@pikachu bill]$ rpm -q glibc
glibc-2.2.90-3

But it was segfaulting with glibc 2.2.3, too.

(by the way, "man /path/to/file works fine, it's only with the -- as the only
option that it faults)

I wonder if it's a feature of the i686 glibc on an Athlon?  I'll try this at
work on a PII.


Comment 4 Bill Crawford 2002-03-09 01:34:41 UTC
Created attachment 47981 [details]
Backtrace showing source location where segfault occurs.

Comment 5 Bill Crawford 2002-03-09 02:00:06 UTC
Looks like it may actually be a glibc bug ... _getopt_internal gets called
twice, the second time for some reason with argv = { "dummy", ... } and that
segfaults.


Comment 6 Karsten Hopp 2002-09-03 13:29:48 UTC
fixed in man-1.5j-10