Ticket #9 (assigned task)

Opened 6 years ago

Last modified 6 years ago

Have a full analysis of a rawhide tree on one arch

Reported by: dmalcolm Owned by: dmalcolm
Priority: major Milestone: 0.2 - Polish
Component: rpmgrok Version:
Keywords: Cc:
Blocked By: Blocking:

Description

For initial announcement, the tool will much more sense if it's populated with a full analysis of the "full distro".

One rawhide tree, on one arch, will do for now (avoids complexity of dealing with per-tree/per-arch filters)

Change History

comment:1 Changed 6 years ago by dmalcolm

I queued the i386 repo of rawhide-20080725 on that date c.f.:

for f in /mnt/koji/mash/rawhide-20080725/development/i386/os/Packages/* ; do python rpmgrokclient rpmgrok $f ; done

After optimization (see ticket # ) and some errors the batch finished on 20080801.

The job stats currently show:

  • 10 running jobs (this is where the server was down when the client failed, or the client failed totally without managing to send an error back to the server)
  • 10451 completed jobs
  • 193 aborted jobs
  • 10654 overall

So we're missing 203 out of 10654 built rpms. This is good enough for now for the initial announcement. Should go through the failures and try to reproduce/file tickets etc.

comment:2 Changed 6 years ago by dmalcolm

"ticket #" above should have read "ticket #6"

comment:3 Changed 6 years ago by dmalcolm

  • Milestone Initial announcement deleted

comment:4 Changed 6 years ago by dmalcolm

  • Status changed from new to assigned

Can try to analyse thus:

rpmgrok=# select job_id, 'internal error' as cause from jobs where error_msg like '% <ProtocolError for localhost:8086/jobs/worker/index: 500 Internal error>%' 
union 
select job_id, 'rpm nvr != srpm nvr' as cause from jobs where error_msg like '%No such file or directory:%';

comment:5 Changed 6 years ago by dmalcolm

This accounts for 75 of the 193 errors:

rpmgrok=# select count(*), cause from
(select job_id, 'internal error' as cause from jobs where error_msg like '% <ProtocolError for localhost:8086/jobs/worker/index: 500 Internal error>%' 
union select job_id, 'rpm nvr != srpm nvr' as cause from jobs where error_msg like '%No such file or directory:%') as foo 
group by cause;
 count |        cause        
-------+---------------------
    63 | rpm nvr != srpm nvr
    12 | internal error
(2 rows)

comment:6 Changed 6 years ago by dmalcolm

Finding the remaining errors thus:

rpmgrok=# select job_id, error_msg from jobs where error_msg is not null and job_id not in (select job_id from jobs where error_msg like '% <ProtocolError for localhost:8086/jobs/worker/index: 500 Internal error>%' union select job_id from jobs where error_msg like '%No such file or directory:%');

xdg parsing errors e.g.

    496 | Exception type: xdg.Exceptions.ParsingError
Exception value: ParsingError in file '/tmp/payload/usr/share/services/basket_config_features.desktop', [Desktop Entry]-Header missing
Traceback:
  File "worker.py", line 113, in try_to_work
    result = handler.do_job(**jobAttrDict)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 262, in do_job
    rpmData = self.get_data_from_rpm(rpmPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 286, in get_data_from_rpm
    rpmData = get_rpm_data_from_dir(rpmPath, extractionDir)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 243, in get_rpm_data_from_dir
    rpmData.gather_payload_info(extractionDir)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 236, in gather_payload_info
    self.add_file(fileFullPath, fileLocalPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 191, in add_file
    fileData = FileData.make(fileFullPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 47, in make
    return DesktopData(fullPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 174, in __init__
    self.groups = xdg.DesktopEntry.DesktopEntry(fullPath).content
  File "/usr/lib/python2.4/site-packages/xdg/DesktopEntry.py", line 25, in __init__
    self.parse(filename)
  File "/usr/lib/python2.4/site-packages/xdg/DesktopEntry.py", line 36, in parse
    IniFile.parse(self, file, ["Desktop Entry", "KDE Desktop Entry"])
  File "/usr/lib/python2.4/site-packages/xdg/IniFile.py", line 67, in parse
    raise ParsingError("[%s]-Header missing" % headers[0], filename)

Keyboard interrupt errors:

   3034 | Exception type: exceptions.KeyboardInterrupt
Exception value: 
Traceback:
  File "worker.py", line 113, in try_to_work
    result = handler.do_job(**jobAttrDict)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 262, in do_job
    rpmData = self.get_data_from_rpm(rpmPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 286, in get_data_from_rpm
    rpmData = get_rpm_data_from_dir(rpmPath, extractionDir)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 243, in get_rpm_data_from_dir
    rpmData.gather_payload_info(extractionDir)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 236, in gather_payload_info
    self.add_file(fileFullPath, fileLocalPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 191, in add_file
    fileData = FileData.make(fileFullPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 45, in make
    return ElfData(fullPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 87, in __init__
    self._get_symbol_info()
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 163, in _get_symbol_info
    sym.demangled_name = Popen(['c++filt', sym.name], stdout=PIPE).communicate()[0]
  File "/usr/lib64/python2.4/subprocess.py", line 542, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.4/subprocess.py", line 902, in _execute_child
    self.pid = os.fork()

A bug that I've fixed in how I was parsing rpmlint output:

   4694 | Exception type: rpmgrok.rpmlint.UnhandledLine
Exception value: Unhandled line: "1 packages and 0 specfiles checked; 0 errors, 1 warnings."
Traceback:
  File "worker.py", line 113, in try_to_work
    result = handler.do_job(**jobAttrDict)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 301, in do_job
    rpmData.rpmlintMsgs = Rpmlint(rpmPath).messages
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/rpmlint.py", line 43, in __init__
    self.handle_line(line)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/rpmlint.py", line 59, in handle_line
    raise UnhandledLine(line)

comment:7 Changed 6 years ago by dmalcolm

Trying to locate all the errors:

select count(*), cause from (
  select job_id, 'internal error' as cause from jobs where error_msg like '% <ProtocolError for localhost:8086/jobs/worker/index: 500 Internal error>%'
union
  select job_id, 'rpm nvr != srpm nvr' as cause from jobs where error_msg like '%No such file or directory:%'
union
  select job_id, 'xdg parsing error' as cause from jobs where error_msg like '%xdg.Exceptions.ParsingError%'
union
  select job_id, 'keyboard interrupt' as cause from jobs where error_msg like '%exceptions.KeyboardInterrupt%'
union
  select job_id, 'rpmlint-parsing doh' as cause from jobs where error_msg like '%rpmgrok.rpmlint.UnhandledLine%'
) as foo group by cause order by count(*) desc;

gives:

 count |        cause        
-------+---------------------
    98 | xdg parsing error
    63 | rpm nvr != srpm nvr
    12 | rpmlint-parsing doh
    12 | internal error
     7 | keyboard interrupt
(5 rows)

and trying to see if we caught everything:

select job_id, error_msg from jobs where error_msg is not null and job_id not in (
  select job_id from jobs where error_msg like '% <ProtocolError for localhost:8086/jobs/worker/index: 500 Internal error>%'
union
  select job_id from jobs where error_msg like '%No such file or directory:%'
union
  select job_id from jobs where error_msg like '%xdg.Exceptions.ParsingError%'
union
  select job_id from jobs where error_msg like '%exceptions.KeyboardInterrupt%'
union
  select job_id from jobs where error_msg like '%rpmgrok.rpmlint.UnhandledLine%'
);

finds one other error:

 job_id |               error_msg               
--------+---------------------------------------
   9758 | Exception type: exceptions.IndexError
Exception value: list index out of range
Traceback:
  File "worker.py", line 113, in try_to_work
    result = handler.do_job(**jobAttrDict)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 274, in do_job
    rpmData = self.get_data_from_rpm(rpmPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 315, in get_data_from_rpm
    rpmData = get_rpm_data_from_dir(rpmPath, extractionDir)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 255, in get_rpm_data_from_dir
    rpmData.gather_payload_info(extractionDir)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 248, in gather_payload_info
    self.add_file(fileFullPath, fileLocalPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 203, in add_file
    fileData = FileData.make(fileFullPath)
  File "/home/fedora/dmalcolm/hacking/rpmgrok/worker/rpmgrok/handler.py", line 39, in make
    type = os.popen('file "%s"' % fullPath).readlines()[0]

(1 row)

comment:8 Changed 6 years ago by dmalcolm

To fix this, need to go through the various errors by category, so have broken into individual tickets:

  • xdg parsing error (98 instances): filing as ticket #22
  • rpm nvr != srpm nvr (63 instances): already filed as ticket #3
  • rpmlint-parsing doh (12 instances): already fixed; see https://fedorahosted.org/rpmgrok/ticket/10#comment:2
  • internal error (12 instances): filed at ticket #23
  • keyboard interrupt (7 instances): eventually need to daemonize the worker process
  • index error (1 instance): filed as ticket #24

Just to verify: 98+63+12+12+7+1 = 193, which is as expected

comment:9 Changed 6 years ago by dmalcolm

  • Milestone set to 0.2 - Polish

Should aim to do all of F10 Alpha on one arch for next announcement?

Note: See TracTickets for help on using tickets.