Bug 498102

Summary: Crashing due to selinux=disabled
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: patchAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 11CC: bojan, plroskin, twaugh, udovdh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 2.5.4-39.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-22 21:47:27 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
patch for patch-selinux.patch
none
core.bz2 for patch-2.5.4-38.fc11.x86_64 none

Description Jan Kratochvil 2009-04-28 20:55:51 UTC
Created attachment 341650 [details]
patch for patch-selinux.patch

Description of problem:
After an upgrade to F11-rawhide `patch' started to segfault almost each time.

Version-Release number of selected component (if applicable):
patch-2.5.4-38.fc11.x86_64

How reproducible:
Like 50% of runs, it was 100% reproducible for some specific files.

Steps to Reproduce:
1. patch -p0 </tmp/patchfile # at a right place

Actual results:
patching file gdb/macrocmd.c
Segmentation fault

Expected results:
patching file gdb/macrocmd.c
patching file gdb/doc/gdb.texinfo
Hunk #1 succeeded at 8382 (offset 41 lines).
patching file gdb/testsuite/gdb.base/macscp.exp
... and no that message above :-)

Additional info:
Core was generated by `patch -p0'.
Program terminated with signal 11, Segmentation fault.
#0  strcmp () at ../sysdeps/x86_64/strcmp.S:29
29      L(oop): movb    (%rdi), %al
(gdb) bt
#0  strcmp () at ../sysdeps/x86_64/strcmp.S:29
#1  0x0000000000408233 in main (argc=7, argv=<value optimized out>) at patch.c:420
Current language:  auto; currently asm
(gdb) up
#1  0x0000000000408233 in main (argc=7, argv=<value optimized out>) at patch.c:420
420                               if (strcmp(outcontext, incontext) && 
Current language:  auto; currently c
(gdb) l
415                         pfatal ("Can't set permissions on file %s",
416                                 quotearg (outname));
417                       if (! inerrno && incontext) {
418                               security_context_t outcontext;
419                               getfilecon (outname, &outcontext);
420                               if (strcmp(outcontext, incontext) && 
421                                   setfilecon (outname, incontext) != 0) {
422                                       if (errno != ENOTSUP && errno != EPERM)
423                                               pfatal ("Can't set security context on file %s",
424                                                       quotearg (outname));
(gdb) p outcontext
$1 = (security_context_t) 0x0
(gdb) p incontext
$2 = (security_context_t) 0x69f7a0 "system_u:object_r:file_t:s0"
(gdb) q

Comment 1 Jan Kratochvil 2009-04-28 20:57:02 UTC
Created attachment 341651 [details]
core.bz2 for patch-2.5.4-38.fc11.x86_64

Comment 2 Tim Waugh 2009-04-29 16:45:53 UTC
Thanks for the patch!

Comment 3 Bug Zapper 2009-06-09 14:43:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Tim Waugh 2009-06-10 09:12:16 UTC
*** Bug 498861 has been marked as a duplicate of this bug. ***

Comment 5 Tim Waugh 2009-06-10 09:12:26 UTC
*** Bug 504924 has been marked as a duplicate of this bug. ***

Comment 6 Bojan Smojver 2009-06-10 23:50:09 UTC
Just another backtrace, in case it's relevant:

Starting program: /usr/bin/patch -p0 < ../../patches/apu-dso-init-atomic.patch
patching file dbd/apr_dbd.c
patching file misc/apu_dso.c
patching file dbm/apr_dbm.c

Program received signal SIGSEGV, Segmentation fault.
strcmp () at ../sysdeps/i386/i686/strcmp.S:39
39	../sysdeps/i386/i686/strcmp.S: No such file or directory.
	in ../sysdeps/i386/i686/strcmp.S
(gdb) bt
#0  strcmp () at ../sysdeps/i386/i686/strcmp.S:39
#1  0x080501ce in main (argc=2, argv=0xbffff4c4) at patch.c:420

Comment 7 Fedora Update System 2009-06-24 10:00:31 UTC
patch-2.5.4-39.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/patch-2.5.4-39.fc11

Comment 8 Fedora Update System 2009-06-27 02:39:21 UTC
patch-2.5.4-39.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update patch'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6949

Comment 10 Andreas Schwab 2009-07-03 13:49:54 UTC
*** Bug 509552 has been marked as a duplicate of this bug. ***

Comment 11 Tim Waugh 2009-07-20 10:16:55 UTC
This would only need one positive report on the update page from a logged-in user before being pushed to stable.  Does anyone care enough about it to do that?

Comment 12 Pavel Roskin 2009-07-20 15:15:14 UTC
If you mean bodhi, I've just done it.

Comment 13 Fedora Update System 2009-07-22 21:47:22 UTC
patch-2.5.4-39.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.