Bug 922252 - [Beaker][RHEL4] beah reports Encoutnered problem while running task: TypeError: exceptions must be classes, instances, or strings (deprecated), not type
Summary: [Beaker][RHEL4] beah reports Encoutnered problem while running task: TypeErro...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Beaker
Classification: Retired
Component: beah
Version: 0.11
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact:
URL:
Whiteboard:
Depends On: 986153
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-15 20:53 UTC by PaulB
Modified: 2018-02-06 00:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 986153 (view as bug list)
Environment:
Last Closed: 2014-07-14 01:34:38 UTC
Embargoed:


Attachments (Terms of Use)
beah.log (5.52 KB, message/news)
2013-07-18 12:56 UTC, PaulB
no flags Details
beah_beaker_backend.log (14.04 KB, message/news)
2013-07-18 12:56 UTC, PaulB
no flags Details
beah_forwarder_backend.log (2.15 KB, message/news)
2013-07-18 12:57 UTC, PaulB
no flags Details
mnt_testarea_beah_ (1.35 KB, text/plain)
2013-07-18 12:58 UTC, PaulB
no flags Details

Comment 1 PaulB 2013-03-15 20:58:16 UTC
All,
 Notably - the hosts are s390/s390x.

best,
-pbunyan

Comment 3 Dan Callaghan 2013-05-01 00:57:45 UTC
Looking on the console log, it seems this is yet another case of the following exception:

2013-04-26 11:40:44,925 backend: ERROR Encoutnered problem while running task '12172480'.
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/beah/backends/beakerlc.py", line 510, in simple_recipe
    result = task.getResult()
  File "/usr/lib64/python2.3/site-packages/twisted/internet/defer.py", line 584, in getResult
    self.result.raiseException()
  File "/usr/lib64/python2.3/site-packages/twisted/python/failure.py", line 326, in raiseException
    raise self.type, self.value, self.tb
TypeError: exceptions must be classes, instances, or strings (deprecated), not type

which we have seen occasionally before. It happens because something is raising an exception inherited from object, which doesn't work in Python < 2.5. So there would have been a *real* error, but the details are lost now.

I've audited the beah source for exceptions inheriting from object, and I can't find any. It could be originating in Twisted.

I also checked the server logs to see if I could find a corresponding error that might have caused the exception on the harness side, but I couldn't find anything there either.

Right now I don't have any other ideas. I am going to try cloning your job, Paul, and assuming I can reproduce the beah crash then there might be some clues in the local beah logs.

Comment 4 Dan Callaghan 2013-05-01 04:57:03 UTC
(In reply to comment #3)
> Right now I don't have any other ideas. I am going to try cloning your job,
> Paul, and assuming I can reproduce the beah crash then there might be some
> clues in the local beah logs.

I cloned job 409857 three times and they all ran successfully without hitting this error. So I think it must be very intermittent, or else there is some other key to reproducing it which I am missing.

Paul, the next time you see this problem could you please grab the beah logs /var/log/beah* and output /mnt/testarea/beah* for me to have a look at?

Comment 8 PaulB 2013-07-18 12:56:14 UTC
Created attachment 775302 [details]
beah.log

Comment 9 PaulB 2013-07-18 12:56:53 UTC
Created attachment 775303 [details]
beah_beaker_backend.log

Comment 10 PaulB 2013-07-18 12:57:19 UTC
Created attachment 775304 [details]
beah_forwarder_backend.log

Comment 11 PaulB 2013-07-18 12:58:07 UTC
Created attachment 775305 [details]
mnt_testarea_beah_

Comment 12 Dan Callaghan 2013-07-19 00:36:00 UTC
Thanks for grabbing these logs, Paul. I was hoping something in there might shed more light but unfortunately not.

I have checked the server logs at the time of the failure, the call which the harness attempted never reached the server. I've requested a copy of the LC logs for the same time period to check there too, but I suspect this was actually a network connectivity problem. It's being misreported as TypeError on RHEL4 (probably RHEL3 as well) due to the different versions of Python and Twisted.

I will do some more digging to see if I can any network-related exceptions in the Python 2.3 standard library which could cause this TypeError when raised by Twisted.

Comment 13 Dan Callaghan 2013-07-19 03:27:19 UTC
Realistically the best way to fix the exception reporting is probably just to build Python 2.6 for RHEL4 and start running beah in that instead (like we do for RHEL3 already).

Comment 15 Nick Coghlan 2013-07-19 05:44:53 UTC
I've split out bug 986153 to track migrating to running beah in a separately installed Python 2.6 runtime for both RHEL 4 and 5 (as we already do for RHEL 3).

It's not an especially elegant solution, but on the upside it does raise the possibility of upgrading to a more recent version of Twisted as well, which could improve beah's IPv6 story.

Comment 19 Dan Callaghan 2014-07-14 01:34:38 UTC
The issue with

TypeError: exceptions must be classes, instances, or strings (deprecated), not type

is fixed in beah 0.7.5 with this commit:

https://git.beaker-project.org/cgit/beah/commit/?id=0304055c9a76a360b6e911ca76200e0fde8c75e9

However that was just masking the real exception, which in this case was probably also the same issue as bug 908354, namely that beah tasks would get into an inconsistent state depending on the order that processes are killed during reboot. That is also fixed in beah 0.7.6.


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