[MacPorts] #20286: BUG: python26 bus error

MacPorts noreply at macports.org
Fri Aug 21 05:27:03 PDT 2009


#20286: BUG: python26 bus error
---------------------------------+------------------------------------------
 Reporter:  jabronson@…          |       Owner:  blb@…           
     Type:  defect               |      Status:  new             
 Priority:  Normal               |   Milestone:                  
Component:  ports                |     Version:  1.7.1           
 Keywords:                       |        Port:  python26        
---------------------------------+------------------------------------------

Comment(by santagada@…):

 PyEval_EvalFrameEx is a frame and there is *only* 736 of those in the
 backtrace (recursionlimit is 1k) so it is not that I think.

 I tried to get a python level trace of what was going on, by in the case
 of trac to edit wsgy.py to insert a trace function (so each thread would
 have its own trace) and the results are that the failure is in the file
 mimetypes.py in the function guess_type.

 I think this is a race condition because if I print too much on my traces
 the problem vanishes, the same thing is I turn off threads in trac
 standalone.py.

 Here is the code for the trace:

 --- wsgi.py     2009-08-21 09:25:38.000000000 -0300
 +++ wsgi.py     2009-08-21 09:25:14.000000000 -0300
 @@ -178,7 +178,12 @@
          return environ

      def handle_one_request(self):
 +        def trac_func(frame, type, blabla):
 +            if type=='call':
 +                print frame.f_code.co_filename[-20:],
 frame.f_code.co_name
          environ = self.setup_environ()
 +        if '.' in self.path:
 +            import sys; sys.settrace(trac_func)
          if environ:
              gateway = self.server.gateway(self, environ)
              gateway.run(self.server.application)

-- 
Ticket URL: <http://trac.macports.org/ticket/20286#comment:8>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list