Skip to content

too-large rpm hangs when processed #52

@trel

Description

@trel

I have been working through automating our build process, and our existing development package is the only one that does not succeed when processed by prm. Investigating further, and generating test rpms to exclude something specific to our package, I have found where some size threshold is being surpassed.

I am using EPM to generate RPM files.

Works Hangs
EPM's test.list filesize 4,742,089 4,744,637
RPM's test.spec filesize 5,130,897 5,133,653
RPM filesize 13,062,868 13,070,664

beginning and end of test.list

%product EPM testing
%copyright BSD
%vendor Testing <testing@example.org>
%license foo
%readme foo
%description Example description
%version 1
%format all

d 755 root root /usr/lib/epmtesting -
f 644 root root /usr/lib/epmtesting/foo1 foo
f 644 root root /usr/lib/epmtesting/foo2 foo
f 644 root root /usr/lib/epmtesting/foo3 foo
...
f 644 root root /usr/lib/epmtesting/foo96998 foo
f 644 root root /usr/lib/epmtesting/foo96999 foo
f 644 root root /usr/lib/epmtesting/foo97000 foo

instrumented prm and arr-pm output for hanging case

Built Yum repository for centos6
x86_64
1 write begin 16384
  write complete
  read begin
  reading...
  ---- SKIPPING
  read complete
2 write begin 16384
  write complete
  read begin
  reading...
  ---- SKIPPING
  read complete
3 write begin 16384
  write complete
  read begin
  reading...
  ---- SKIPPING
  read complete
4 write begin 16384
  write complete
  read begin
  reading...
  ---- SKIPPING
  read complete
5 write begin 9412

htop output for hanging case

11902 trel        20   0 1304M 1203M  3732 S  0.0  0.5  0:00.00 │  │  │  │  │     ├─ /usr/bin/ruby1.9.1 /usr/local/bin/prm -t rpm -p pool -r centos6 -a x86_64
11901 trel        20   0  4440   640   540 S  0.0  0.0  0:00.02 │  │  │  │  │     └─ sh -c xz -d | cpio -it --quiet
11904 trel        20   0  7304   624   524 S  0.0  0.0  0:00.00 │  │  │  │  │        ├─ cpio -it --quiet
11903 trel        20   0 12012  1084   752 S  0.0  0.0  0:00.00 │  │  │  │  │        └─ xz -d

strace output for hanging case

$ sudo strace -s 300 -p 11904
Process 11904 attached
write(1, "sr/lib/epmtesting/foo70470\n./usr/lib/epmtesting/foo70471\n./usr/lib/epmtesting/foo70472\n./usr/lib/epmtesting/foo70473\n./usr/lib/epmtesting/foo70474\n./usr/lib/epmtesting/foo70475\n./usr/lib/epmtesting/foo70476\n./usr/lib/epmtesting/foo70477\n./usr/lib/epmtesting/foo70478\n./usr/lib/epmtesting/foo70479\n./u"..., 4096

prm hangs here:
https://github.com/dnbert/prm/blob/master/lib/prm/rpm.rb#L242

The strace write() call is from the ruby-arr-pm library here:
https://github.com/jordansissel/ruby-arr-pm/blob/master/lib/arr-pm/file.rb#L210

It feels like a logic error once the filelist gets too long - but I've hit the edge of what I can diagnose by inspection. And of course, if this is a bug in arr-pm proper, apologies here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions