Hi! Since a couple of weeks, I am chasing Heisenbugs related with my weak cache patches (see #715, #11521, #12313, #11521, #12215).
In the case of #715+#11521, one test fails like this: sage -t "devel/sage/sage/misc/cachefunc.pyx" The doctested process was killed by signal 11 But it appears to be only on bsd.math, and only with sage-5.4.beta0 (not sage-5.3.rc1). Moreover, running verbose tests, the error vanishes. Running the test under gdb makes one test fail "properly", namely: Failed example: oddprime_factors.precompute(range(Integer(1),Integer(100)), Integer(4))###line 704:_sage_ >>> oddprime_factors.precompute(range(1,100), 4) Expected nothing Got: [Errno 4] Interrupted system call Killing any remaining workers... Interestingly, all problems vanish if the range in the example above is of length at most 98, but the error occurs if the range is of length at least 99. On other tickets depending on #715+#11521 (such as #13370 or #12876), similar problems seem to appear as well, but in different files: Only on some machines, with the message The doctested process was killed by signal 11 Volker commented on #715: This sounds more like a bug in the doctest framework. I imagine the worker process segfaults, and the doctesting process is in a blocking system call when the SIGCHLD arrives. The doctesting framework should check the EINTR result and retry but doesn't. This in turn sounds to me like a known problem in Python: http://bugs.python.org/issue12268 The question I'd like to ask: How shall we proceed? Try to backport a solution of the Python issue (hence, patch the Python spkg)? Try to fix the doctest framework (as suggested by Volker)? I'd also appreciate tipps regarding debugging techniques: * I tried to analyse the problem above with verbose tests (result: Error disappears). * I modified the tests so that some information is dumped into a file (result: Error disappears). * With gdb, one at least gets an error, but it doesn't mention signal 11 and doesn't give a backtrace. * Valgrind didn't work for me on bsd.math (How to get it running?). * Since the patches are about weak references, I tried inserting print statements into weakref.KeyedRef.__init__ and was running the failing example in an interactive session. However, no KeyedRef was created during the example. What else? Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsubscribe from this group, send email to sage-devel+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en.