FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 09-07-2011, 08:01 AM
Jim Meyering
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

I was getting ready to release coreutils-8.13, after two pre-release snapshots,

http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1554
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1631

when I went to make sure its tests all pass also on rawhide.
I test that regularly, and they've all been passing (of course), so I
didn't expect any surprises. I certainly didn't expect 7 failures,
and never something as basic as this:

$ touch a
$ env -i /usr/bin/install a b
zsh: segmentation fault env -i /usr/bin/install a b
[Exit 139 (SEGV)]

[the "env -i " prefix is just to ensure that none of my MALLOC_DEBUG_
or MALLOC_PERTURB_ settings (or any other envvar) is causing trouble. ]

gdb shows that it's officially a NULL-deref, but says there's a
"Corrupted DWARF expression", probably discovered in read_sleb128:

$ env -i gdb -q --args /usr/bin/install a b
Reading symbols from /usr/bin/install...Reading symbols from /usr/lib/debug/usr/bin/install.debug...done.
done.
(gdb) r
Starting program: /usr/bin/install a b
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
) at /usr/include/bits/string2.h:1179
1179 while (*__s == __sep)
(gdb) p __s
$1 = 0x0
(gdb) bt
#0 __strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
) at /usr/include/bits/string2.h:1179
#1 init (rec=0x626930, opts=0x7ffff7fe2718, n=<optimized out>)
at label_file.c:440
#2 0x00007ffff7bc4b3d in selabel_open (backend=0, opts=0x7ffff7fe2718,
nopts=5) at label.c:165
#3 0x00007ffff7bc3e16 in matchpathcon_init_prefix_internal (path=0x0,
subset=0x0) at matchpathcon.c:321
#4 0x00007ffff7bc40a9 in matchpathcon (path=0x7fffffffefbf "b", mode=33261,
con=0x7fffffffeb98) at matchpathcon.c:406
#5 0x000000000040452f in setdefaultfilecon (file=0x7fffffffefbf "b")
at install.c:345
#6 change_attributes (name=0x7fffffffefbf "b") at install.c:471
#7 install_file_in_file (from=<optimized out>, to=0x7fffffffefbf "b",
x=<optimized out>) at install.c:672
#8 0x0000000000403cd6 in main (argc=<optimized out>, argv=<optimized out>)
at install.c:978
(gdb)

So install is just the messenger, since it's calling libselinux's
matchpathcon function, in which all of this is happening.
Given the dwarf corruption, libselinux may be a messenger, too,
but for now, I've just put all this in a BZ:

http://bugzilla.redhat.com/736259

This seems so fundamental that I have to wonder if it's
something specific to my own set-up...
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-07-2011, 11:44 AM
Jim Meyering
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

Jim Meyering wrote:
...
> $ touch a && $ env -i /usr/bin/install a b
> zsh: segmentation fault env -i /usr/bin/install a b
> [Exit 139 (SEGV)]

Rich Jones found that updating to libselinux-2.1.5-2.fc17.x86_64
made it so he too sees the above failure.

> http://bugzilla.redhat.com/736259

For any of you who are already affected, you may be wondering how
automated tools will install fixed versions without a working "install"
program. At least I was.

There may well be a simpler solution, like using a small install-simulating
script, but I'm inclined to use the "real" install program, with a
minimal adjustment:
===============================================

Build the latest coreutils from source, but with a small twist
to disable the offending matchpathcon calls:

Get the sources, from a link here:

http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1631

e.g.,

wget http://people.redhat.com/meyering/cu/coreutils-ss.tar.xz
wget http://people.redhat.com/meyering/cu/coreutils-ss.tar.xz.sig

Verify the signature before unpacking:

gpg --verify coreutils-ss.tar.xz.sig

Unpack (as non-root, of course):

tar xf coreutils-ss.tar.xz && cd coreutils-8.12*

Configure and build with one added definition.
This overrides the "ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1"
setting in src/Makefile.am:

./configure && make ginstall_CPPFLAGS=

Verify that the just-built install binary works:
(or also run "make check" for the whole test suite)

touch a; src/ginstall a b

Install it, replacing your temporarily-broken one:

sudo src/ginstall src/ginstall /usr/bin/install
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-07-2011, 11:54 AM
"Richard W.M. Jones"
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

On Wed, Sep 07, 2011 at 01:44:36PM +0200, Jim Meyering wrote:
> Jim Meyering wrote:
> ...
> > $ touch a && $ env -i /usr/bin/install a b
> > zsh: segmentation fault env -i /usr/bin/install a b
> > [Exit 139 (SEGV)]
>
> Rich Jones found that updating to libselinux-2.1.5-2.fc17.x86_64
> made it so he too sees the above failure.

[...]

Instead of this workaround, can we ask rel-eng to untag the
broken libselinux update?

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-07-2011, 01:02 PM
Jim Meyering
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

Richard W.M. Jones wrote:
> On Wed, Sep 07, 2011 at 01:44:36PM +0200, Jim Meyering wrote:
>> Jim Meyering wrote:
>> ...
>> > $ touch a && $ env -i /usr/bin/install a b
>> > zsh: segmentation fault env -i /usr/bin/install a b
>> > [Exit 139 (SEGV)]
>>
>> Rich Jones found that updating to libselinux-2.1.5-2.fc17.x86_64
>> made it so he too sees the above failure.
>
> [...]
>
> Instead of this workaround, can we ask rel-eng to untag the
> broken libselinux update?

Good idea.
Done: https://fedorahosted.org/rel-eng/ticket/4914
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-07-2011, 01:15 PM
Tom London
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

On Wed, Sep 7, 2011 at 6:02 AM, Jim Meyering <jim@meyering.net> wrote:
> Richard W.M. Jones wrote:
>> On Wed, Sep 07, 2011 at 01:44:36PM +0200, Jim Meyering wrote:
>>> Jim Meyering wrote:
>>> ...
>>> > * * $ touch a && $ env -i /usr/bin/install a b
>>> > * * zsh: segmentation fault *env -i /usr/bin/install a b
>>> > * * [Exit 139 (SEGV)]
>>>
>>> Rich Jones found that updating to libselinux-2.1.5-2.fc17.x86_64
>>> made it so he too sees the above failure.
>>
>> [...]
>>
>> Instead of this workaround, can we ask rel-eng to untag the
>> broken libselinux update?
>
> Good idea.
> Done: https://fedorahosted.org/rel-eng/ticket/4914

Koji has libselinux-2.1.5-3.fc17.x86_64. Its changelog says:

* Tue Sep 06 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.5-3 - Fix
handling of subset labeling that is causing segfault in restorecon

After downloading/installing: "Works for me".

tom
--
Tom London
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-07-2011, 01:37 PM
Daniel J Walsh
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/07/2011 04:01 AM, Jim Meyering wrote:
> I was getting ready to release coreutils-8.13, after two
> pre-release snapshots,
>
> http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1554
> http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1631
>
> when I went to make sure its tests all pass also on rawhide. I test
> that regularly, and they've all been passing (of course), so I
> didn't expect any surprises. I certainly didn't expect 7
> failures, and never something as basic as this:
>
> $ touch a $ env -i /usr/bin/install a b zsh: segmentation fault
> env -i /usr/bin/install a b [Exit 139 (SEGV)]
>
> [the "env -i " prefix is just to ensure that none of my
> MALLOC_DEBUG_ or MALLOC_PERTURB_ settings (or any other envvar) is
> causing trouble. ]
>
> gdb shows that it's officially a NULL-deref, but says there's a
> "Corrupted DWARF expression", probably discovered in read_sleb128:
>
> $ env -i gdb -q --args /usr/bin/install a b Reading symbols from
> /usr/bin/install...Reading symbols from
> /usr/lib/debug/usr/bin/install.debug...done. done. (gdb) r Starting
> program: /usr/bin/install a b [Thread debugging using libthread_db
> enabled] Using host libthread_db library
> "/lib64/libthread_db.so.1".
>
> Program received signal SIGSEGV, Segmentation fault. __strtok_r_1c
> (__nextp=read_sleb128: Corrupted DWARF expression. ) at
> /usr/include/bits/string2.h:1179 1179 while (*__s == __sep)
> (gdb) p __s $1 = 0x0 (gdb) bt #0 __strtok_r_1c
> (__nextp=read_sleb128: Corrupted DWARF expression. ) at
> /usr/include/bits/string2.h:1179 #1 init (rec=0x626930,
> opts=0x7ffff7fe2718, n=<optimized out>) at label_file.c:440 #2
> 0x00007ffff7bc4b3d in selabel_open (backend=0,
> opts=0x7ffff7fe2718, nopts=5) at label.c:165 #3 0x00007ffff7bc3e16
> in matchpathcon_init_prefix_internal (path=0x0, subset=0x0) at
> matchpathcon.c:321 #4 0x00007ffff7bc40a9 in matchpathcon
> (path=0x7fffffffefbf "b", mode=33261, con=0x7fffffffeb98) at
> matchpathcon.c:406 #5 0x000000000040452f in setdefaultfilecon
> (file=0x7fffffffefbf "b") at install.c:345 #6 change_attributes
> (name=0x7fffffffefbf "b") at install.c:471 #7 install_file_in_file
> (from=<optimized out>, to=0x7fffffffefbf "b", x=<optimized out>) at
> install.c:672 #8 0x0000000000403cd6 in main (argc=<optimized out>,
> argv=<optimized out>) at install.c:978 (gdb)
>
> So install is just the messenger, since it's calling libselinux's
> matchpathcon function, in which all of this is happening. Given the
> dwarf corruption, libselinux may be a messenger, too, but for now,
> I've just put all this in a BZ:
>
> http://bugzilla.redhat.com/736259
>
> This seems so fundamental that I have to wonder if it's something
> specific to my own set-up...

Grab libselinux-2.1.5-3.fc17 out of koji, should fix the problem.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5nc6IACgkQrlYvE4MpobNDmACeIXdcOS371t lTRGH/hjojGIHA
SSMAnR8xu2PTr5zgGgzHZX9JkuxKMvOZ
=DFrb
-----END PGP SIGNATURE-----
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-07-2011, 02:33 PM
Jim Meyering
 
Default FYI, rawhide makes /usr/bin/install (matchpathcon) segfault

Daniel J Walsh wrote:
...
> Grab libselinux-2.1.5-3.fc17 out of koji, should fix the problem.

Thanks. That solved it for me.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 12:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org