Bug 1316098 - cpio crashes with segfault
cpio crashes with segfault
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cpio (Show other bugs)
7.1
Unspecified Linux
unspecified Severity medium
: rc
: ---
Assigned To: Pavel Raiskup
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-09 07:12 EST by Bill Craig
Modified: 2016-03-10 01:21 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-10 01:21:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File list /tmp/cfl2 (4.90 MB, text/plain)
2016-03-09 07:12 EST, Bill Craig
no flags Details

  None (edit)
Description Bill Craig 2016-03-09 07:12:56 EST
Created attachment 1134491 [details]
File list /tmp/cfl2

Description of problem:
Attempts to create cpio archive of Centos 7 server fail when cpio crashes and logs a segfault in /var/log/messages

[root@linux ~]# grep segf /var/log/messages
Mar  8 13:28:51 edplinux kernel: cpio[30891]: segfault at 176b0ca ip 00007f3365f
38e10 sp 00007fff0abc6d78 error 4 in libc-2.17.so[7f3365df9000+1b6000]
Mar  8 18:06:38 edplinux kernel: cpio[31774]: segfault at 203809a ip 00007f1e21b
e1e10 sp 00007fffc873e168 error 4 in libc-2.17.so[7f1e21aa2000+1b6000]
Mar  8 18:25:46 edplinux kernel: cpio[31993]: segfault at 1ed7000 ip 00007f1e7f9
cc977 sp 00007fffcf9efd88 error 4 in libc-2.17.so[7f1e7f88c000+1b6000]
Mar  8 22:05:09 edplinux kernel: cpio[23842]: segfault at 240409a ip 00007fb5a31
d1e10 sp 00007fff7c312318 error 4 in libc-2.17.so[7fb5a3092000+1b6000]

Version-Release number of selected component (if applicable):
[root@linux ~]# uname -a
Linux linux 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x
86_64 x86_64 GNU/Linux

[root@linux /]# rpm -q centos-release
centos-release-7-1.1503.el7.centos.2.8.x86_64

[root@linux ~]# cpio --version
cpio (GNU cpio) 2.11

[root@linux ~]# rpm -q cpio
cpio-2.11-22.el7.x86_64

How reproducible:
Very

Steps to Reproduce:
cd /

find ./ -name proc -prune -o -print | egrep -v '^\./u/backup5|^\./usr/guests/|^\./u/idata*|^\./tmp/' | egrep -v '^\./tmp"|^\./u/u1a|^\./u/u1b|^\./u/u1c|^\./u/u2a|^\./u/u2b|^\./var/spool/uucppublic' > /tmp/cfl2

cat /tmp/cfl2 | cpio -Bocv | gzip -f | dd of=/tmp/cpiobusys.gz

Actual results:
Creates incomplete archive crashing at this point:
./sys/devices/pnp0/00:01/rtc/rtc0/uevent
./sys/devices/pnp0/00:01/rtc/rtc0/wakealarm
./sys/devices/pnp0/00:01/nvram
./sys/devices/pnp0/00:01/power
./sys/devices/pnp0/00:01/power/control
./sys/devices/pnp0/00:01/power/wakeup_abort_count
./sys/devices/pnp0/00:01/power/wakeup_active
./sys/devices/pnp0/00:01/power/wakeup_total_time_ms
./sys/devices/pnp0/00:01/power/wakeup_active_count
./sys/devices/pnp0/00:01/power/runtime_active_time
./sys/devices/pnp0/00:01/power/wakeup_max_time_ms
./sys/devices/pnp0/00:01/power/wakeup_count
./sys/devices/pnp0/00:01/power/wakeup_last_time_ms
./sys/devices/pnp0/00:01/power/wakeup
./sys/devices/pnp0/00:01/power/autosuspend_delay_ms
186731+1 records in
186731+1 records out
95606439 bytes (96 MB) copied, 7.23648 s, 13.2 MB/s


Expected results:


Additional info:
Removed file names from the start of the list and reran.
It went past the previous crash point and failed here:

./sys/devices/pnp0/00:01/uevent
./sys/devices/pnp0/00:01/resources
./sys/devices/pnp0/00:01/options
cpio: ./sys/devices/pnp0/00:01/firmware_node: Warning: Cannot readlink: Invalid argument
./sys/devices/pnp0/00:02
./sys/devices/pnp0/00:02/id
./sys/devices/pnp0/00:02/power
./sys/devices/pnp0/00:02/power/control
./sys/devices/pnp0/00:02/power/runtime_active_time
./sys/devices/pnp0/00:02/power/autosuspend_delay_ms
./sys/devices/pnp0/00:02/power/runtime_status
./sys/devices/pnp0/00:02/power/runtime_suspended_time
cpio: ./sys/devices/pnp0/00:02/driver: Warning: Cannot readlink: Invalid argument
cpio: ./sys/devices/pnp0/00:02/subsystem: Warning: Cannot readlink: Invalid argument
./sys/devices/pnp0/00:02/uevent
3+1 records in
3+1 records out
1639 bytes (1.6 kB) copied, 0.00952303 s, 172 kB/s
[root@linux /]#

Mar  9 11:44:35 edplinux kernel: cpio[25835]: segfault at 1c8c0ca ip 00007feb446
dee10 sp 00007fff2f1debb8 error 4 in libc-2.17.so[7feb4459f000+1b6000]
Comment 2 Pavel Raiskup 2016-03-10 01:21:03 EST
Thanks for the report, but this should have been fixed already.
Have a look at cpio-2.11-24.el7_2.

Note You need to log in before you can comment on or make changes to this bug.