Errors in an old, massive patch for Skew Polynomials in Sage

228 views
Skip to first unread message

Arpit Merchant

unread,
Jun 19, 2016, 12:47:27 PM6/19/16
to sage-devel
Hello,

About four years ago, Xavier Caruso wrote a patch for Skew Polynomials in Sage. I am trying to get it (Ticket #13215) merged and I've run into a lot of errors because the internal infrastructure in Sage has changed a lot since then. I've managed to fix some of the errors, but I have no idea on how to proceed with some. I'm attaching a file that has the traceback for these. Any explanation, advice on how to fix these would be very helpful.

Thank you very much in advance.

Sincerely,
Arpit Merchant.
failed_doctests.txt

Vincent Delecroix

unread,
Jun 19, 2016, 12:53:44 PM6/19/16
to sage-...@googlegroups.com
Without looking carefully, the error

AttributeError: 'CenterSkewPolynomialRing_with_category' object
has no attribute 'element_class'

is due to some bad initialization. There should be an attribute
"Element" defined on the parent before calling the "Parent" constructor.
In other words, you should follow the following pattern

class MyElement(Element):
...

class MyParent(Parent):
Element = MyElement

def __init__(self, ...):
...
Parent.__init__(self, ...)

Tell me if it helps. Otherwise I might look more carefully.

Vincent

On 19/06/16 18:47, Arpit Merchant wrote:
> Hello,
>
> About four years ago, Xavier Caruso wrote a patch for Skew Polynomials in
> Sage. I am trying to get it (Ticket #13215
> <http://trac.sagemath.org/ticket/13215>) merged and I've run into a lot of

Arpit Merchant

unread,
Jun 19, 2016, 2:29:22 PM6/19/16
to sage-devel
Hello,


      AttributeError: 'CenterSkewPolynomialRing_with_category' object
has no attribute 'element_class'

is due to some bad initialization. There should be an attribute
"Element" defined on the parent before calling the "Parent" constructor.
In other words, you should follow the following pattern

class MyElement(Element):
     ...

class MyParent(Parent):
      Element = MyElement

      def __init__(self, ...):
           ...
           Parent.__init__(self, ...)

I'm not sure I understand what you mean. Could you please elaborate a little?

 -Arpit.

Vincent Delecroix

unread,
Jun 19, 2016, 2:38:39 PM6/19/16
to sage-...@googlegroups.com


On 19/06/16 20:29, Arpit Merchant wrote:
> Hello,
>
> AttributeError: 'CenterSkewPolynomialRing_with_category' object
>> has no attribute 'element_class'
>>
>> is due to some bad initialization. There should be an attribute
>> "Element" defined on the parent before calling the "Parent"
>> constructor. In other words, you should follow the following
>> pattern
>>

1 class MyElement(Element):
2 ...
3
4 class MyParent(Parent):
5 Element = MyElement
6
7 def __init__(self, ...):
8 ...
9 Parent.__init__(self, ...)

> I'm not sure I understand what you mean. Could you please elaborate
> a little?

The attribute `element_class` of parents is created during the parent
constructor, i.e. the __init__. It creates with dynamical inheritance a
new class "element_class" which will inherits new methods depending of
the category of your parent.

In order to work, there should be an attribute "Element" available (line
5 in the above snippet). Your
class `CenterSkewPolynomialRing` is a parent that modelizes a set. It
either inherits from Parent, or Ring or something similar. And the
objects that belong to it should inherit from Element or RingElement or
something similar.

Is it better?
Vincent

Arpit Merchant

unread,
Jun 19, 2016, 3:08:36 PM6/19/16
to sage-...@googlegroups.com

1 class MyElement(Element):
2       ...
3
4 class MyParent(Parent):
5        Element = MyElement
6
7        def __init__(self, ...):
8             ...
9             Parent.__init__(self, ...)

I'm not sure I understand what you mean. Could you please elaborate
a little?

The attribute `element_class` of parents is created during the parent
constructor, i.e. the __init__. It creates with dynamical inheritance a
new class "element_class" which will inherits new methods depending of
the category of your parent.

In order to work, there should be an attribute "Element" available (line 5 in the above snippet). Your
class `CenterSkewPolynomialRing` is a parent that modelizes a set. It either inherits from Parent, or Ring or something similar. And the objects that belong to it should inherit from Element or RingElement or something similar.


Just to restate, MyParent here is CenterSkewPolynomialRing which inherits from class PolynomialRing_general which inherits from sage.algebras.algebra.Algebra. Indeed, the constructor of CenterSkewPolynomialRing takes `element_class` as input (which by default, is None).

What does MyElement represent in your example? What is its connection to MyParent?
And since Element is itself a class, won't writing Element = MyElement give a syntax error?

-Arpit.





 

Vincent Delecroix

unread,
Jun 19, 2016, 3:15:44 PM6/19/16
to sage-...@googlegroups.com
You might want to read

http://doc.sagemath.org/html/en/thematic_tutorials/coercion_and_categories.html#coercion-and-categories

I answer to your specific questions below.
What are you doing with this element_class from the input? The only
reasonable thing would be

def __init__(self, element_class, ...):
self.Element = element_class
Algebra.__init__(self, ...)

But the name "element_class" is confusing because of the
category/parent/element logic that takes the attribute Element to build
a new attribute named element_class.

> What does MyElement represent in your example? What is its connection to
> MyParent?

In the context of PolynomialRing (as a parent) it would be Polynomial.

> And since Element is itself a class, won't writing Element = MyElement give
> a syntax error?

No. These belong to very different things. There is the Element class
and here you are creating an attribute of a class named Element.

Vincent

Arpit Merchant

unread,
Jun 19, 2016, 3:33:35 PM6/19/16
to sage-...@googlegroups.com
Hello,

Yay, that worked!!! I needed to create and appropriately assign the attribute Element to this class.
Thank you! :)

I'm attaching the updated error file now.

Arpit.




Vincent

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/swN1Djn66KE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

failed_doctests.txt

Simon King

unread,
Jun 20, 2016, 4:36:51 AM6/20/16
to sage-...@googlegroups.com
Hi Arpit,

On 2016-06-19, Arpit Merchant <arp...@gmail.com> wrote:
> What does MyElement represent in your example? What is its connection to
> MyParent?
> And since Element is itself a class, won't writing Element = MyElement give
> a syntax error?

I think that's all answered in the thematic tutorial "How to implement new
algebraic structure in Sage", see
http://doc.sagemath.org/html/en/thematic_tutorials/coercion_and_categories.html#coercion-and-categories

Best regards,
Simon

Arpit Merchant

unread,
Jun 21, 2016, 11:03:19 AM6/21/16
to sage-devel
Hello,

One other set of errors I'm facing is, I think already reported in Ticket #19553 which is an open ticket. Any suggestions on how to resolve this?

Thanks.

-Arpit.

Arpit Merchant

unread,
Jun 30, 2016, 2:11:36 AM6/30/16
to sage-devel
Hello,

My GSoC project is to implement Gabidulin codes which require the Skew Polynomial ticket #13215. While, a lot of the errors have been eliminated, we are stuck with a couple of nasty ones that are hampering the progress on the project. I'm attaching a file that has the tracebacks for them. Can someone please explain what is going wrong and help arrive at a way to resolve these?

Thanks in advance.

Sincerely,
Arpit.

failed_doctests.txt

Dima Pasechnik

unread,
Jun 30, 2016, 5:17:55 AM6/30/16
to sage-devel
it's quite not clear from your post how to reproduce this. The log mentions some git branch; where is this branch?
It might also be easier to parse if you take the failing doctest out and produce few lines of Sage code that
need to get the error interactively, at Sage prompt (on the git branch in question)

Arpit Merchant

unread,
Jul 1, 2016, 4:39:59 AM7/1/16
to sage-devel
Hello,

Here is the latest branch and the last commit was by David Lucas.
https://git.sagemath.org/sage.git/diff?id=32feb35840fab0ebd5a8957aed78d4c05d7e751c

The errors (there's numerous instances of each of these errors occurring. Please find below one of each type):
(1)
sage: R.<t> = QQ[]
sage: sigma = R.hom([t+1])
sage: S.<x> = R['x', sigma]
sage: S.twist_map(-1)

Got - TypeError: bad operand type for unary ~: 'sage.rings.morphism.RingHomomorphism_im_gens'
Expected - NotImplementedError

(2)
sage: k.<t> = GF(5^3)
sage: Frob = k.Frobenius_endomorphism()
sage: S.<x> = k.['x', Frob]
sage: a = x^3 + (t^2 + 1)*x^2 + (2*t + 3)*x + t^2 + t + 2

Got - Exception raised:
... (traceback)
 TypeError: Cannot convert int to sage.structure.element.Element

Travis Scrimshaw

unread,
Jul 1, 2016, 12:23:02 PM7/1/16
to sage-devel
Hey Aprit,


The errors (there's numerous instances of each of these errors occurring. Please find below one of each type):
(1)
sage: R.<t> = QQ[]
sage: sigma = R.hom([t+1])
sage: S.<x> = R['x', sigma]
sage: S.twist_map(-1)

Got - TypeError: bad operand type for unary ~: 'sage.rings.morphism.RingHomomorphism_im_gens'
Expected - NotImplementedError

This looks like you are trying to invert a morphism which does not have a defined __invert__ method. If you are expecting it to, then you likely are creating objects (morphisms) different than what you are expecting.
 
(2)
sage: k.<t> = GF(5^3)
sage: Frob = k.Frobenius_endomorphism()
sage: S.<x> = k.['x', Frob]
sage: a = x^3 + (t^2 + 1)*x^2 + (2*t + 3)*x + t^2 + t + 2

Got - Exception raised:
... (traceback)
 TypeError: Cannot convert int to sage.structure.element.Element


Somewhere in the computation, you are creating/returning a python int, which is getting passed/returned by a _cmp_, _call_, etc, instead.

Also, as a more generic comment from browsing through the code, I don't really like having objects for Right and Left, and in particular, I strongly think they should not be included in the global namespace.

Best,
Travis

 

Arpit Merchant

unread,
Jul 7, 2016, 4:39:30 AM7/7/16
to sage-devel
Hello,

My apologies for not being able to get back sooner. I was working on a separate ticket this week. And there were some compile errors after Sage upgraded to 7.3beta6. I've fixed those and pushed the changes. Sage now builds and running Sage allows access to the functionalities in the original patch that were already working/fixed. However, before I can move on to fixing the pending ones from last week, I am suddenly getting weird segfault errors while running doctests. i.e. when I do ``./sage -t src/sage/rings/polynomial/skew_polynomial_element.pyx``, I get the following output. What changed in the latest update that has caused this and how can I fix it?

too few successful tests, not using stored timings
Running doctests with ID 2016-07-07-14-07-44-39349bdf.
Git branch: fix_skew_polynomials_patch
Using --optional=mpir,python2,sage
Doctesting 1 file.
sage -t src/sage/rings/polynomial/skew_polynomial_element.pyx
**********************************************************************
File "src/sage/rings/polynomial/skew_polynomial_element.pyx", line 100, in sage.rings.polynomial.skew_polynomial_element
Failed example:
    q,r = c.quo_rem(b,side=Left)
Expected:
    Traceback (most recent call last):
    ...
    NotImplementedError
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.rings.polynomial.skew_polynomial_element[19]>", line 1, in <module>
        q,r = c.quo_rem(b,side=Left)
      File "sage/rings/polynomial/skew_polynomial_element.pyx", line 1232, in sage.rings.polynomial.skew_polynomial_element.SkewPolynomial.quo_rem (/home/arpit/Documents/GSOC_16/sage/src/build/cythonized/sage/rings/polynomial/skew_polynomial_element.c:11397)
        return self.lquo_rem(other)
      File "sage/rings/polynomial/skew_polynomial_element.pyx", line 1092, in sage.rings.polynomial.skew_polynomial_element.SkewPolynomial.lquo_rem (/home/arpit/Documents/GSOC_16/sage/src/build/cythonized/sage/rings/polynomial/skew_polynomial_element.c:10375)
        c = parent.twist_map(-db)(inv*a[i+db])
      File "/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/skew_polynomial_ring.py", line 607, in twist_map
        map = self._map**n
      File "sage/categories/map.pyx", line 1264, in sage.categories.map.Map.__pow__ (/home/arpit/Documents/GSOC_16/sage/src/build/cythonized/sage/categories/map.c:9103)
        return generic_power(self, n)
      File "sage/structure/element.pyx", line 3496, in sage.structure.element.generic_power (/home/arpit/Documents/GSOC_16/sage/src/build/cythonized/sage/structure/element.c:27116)
        return generic_power_c(a,n,one)
      File "sage/structure/element.pyx", line 3529, in sage.structure.element.generic_power_c (/home/arpit/Documents/GSOC_16/sage/src/build/cythonized/sage/structure/element.c:27789)
        a = ~a

    TypeError: bad operand type for unary ~: 'sage.rings.morphism.RingHomomorphism_im_gens'
    Killed due to segmentation fault
**********************************************************************
Tests run before process (pid=13179) failed:
sage: R.<t> = ZZ[] ## line 19 ##
sage: sigma = R.hom([t+1]) ## line 20 ##
sage: S.<x> = R['x',sigma]; S ## line 21 ##
Skew Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
sage: a = t + x + 1; a ## line 26 ##
x + t + 1
sage: b = S([t^2,t+1,1]); b ## line 28 ##
x^2 + (t + 1)*x + t^2
sage: c = S.random_element(degree=3,monic=True); c ## line 30 ##
x^3 + (-95*t^2 + t + 2)*x^2 + (-t^2 + t)*x + 2*t - 8
sage: a + b ## line 35 ##
x^2 + (t + 2)*x + t^2 + t + 1
sage: a - b ## line 37 ##
-x^2 - t*x - t^2 + t + 1
sage: a * b ## line 40 ##
x^3 + (2*t + 3)*x^2 + (2*t^2 + 4*t + 2)*x + t^3 + t^2
sage: b * a ## line 42 ##
x^3 + (2*t + 4)*x^2 + (2*t^2 + 3*t + 2)*x + t^3 + t^2
sage: a * b == b * a ## line 44 ##
False
sage: b^2 ## line 47 ##
x^4 + (2*t + 4)*x^3 + (3*t^2 + 7*t + 6)*x^2 + (2*t^3 + 4*t^2 + 3*t + 1)*x + t^4
sage: b^2 == b*b ## line 49 ##
True
sage: q,r = c.quo_rem(b)   # default side is right ## line 80 ##
sage: q ## line 81 ##
x - 95*t^2
sage: r ## line 83 ##
(95*t^3 + 93*t^2 - t - 1)*x + 95*t^4 + 2*t - 8
sage: c == q*b + r ## line 85 ##
True
sage: q == c // b ## line 91 ##
True
sage: r == c % b ## line 93 ##
True
sage: q,r = c.quo_rem(b,side=Left) ## line 100 ##
sage: k.<t> = GF(5^3) ## line 107 ##
sage: Frob = k.frobenius_endomorphism() ## line 108 ##
sage: S.<x> = k['x',Frob] ## line 109 ##
sage: a = x^4 + (4*t + 1)*x^3 + (t^2 + 3*t + 3)*x^2 + (3*t^2 + 2*t + 2)*x + 3*t^2 + 3*t + 1 ## line 110 ##
------------------------------------------------------------------------
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/cysignals/signals.so(+0x4525)[0x7f64f35b6525]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/cysignals/signals.so(+0x4575)[0x7f64f35b6575]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/cysignals/signals.so(+0x72a7)[0x7f64f35b92a7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f64f8402330]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/skew_polynomial_element.so(+0x3370b)[0x7f648591470b]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/element.so(+0x30fa0)[0x7f64ed67afa0]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/skew_polynomial_element.so(+0x9d8c)[0x7f64858ead8c]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_RichCompare+0x129)[0x7f64f86b0269]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/rings/morphism.so(+0x260c3)[0x7f649a9c00c3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0xbcb2f)[0x7f64f86ccb2f]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x3b2e)[0x7f64f871724e]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x8449c)[0x7f64f869449c]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x615dd)[0x7f64f86715dd]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0xbdd75)[0x7f64f86cdd75]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/rings/morphism.so(+0x6f21)[0x7f649a9a0f21]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/rings/morphism.so(+0x2206d)[0x7f649a9bc06d]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/categories/map.so(+0x9241)[0x7f64ed40c241]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/categories/map.so(+0x1521f)[0x7f64ed41821f]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/categories/map.so(+0xff85)[0x7f64ed412f85]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/categories/map.so(+0x1332b)[0x7f64ed41632b]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyNumber_Multiply+0xbb)[0x7f64f866050b]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2965)[0x7f64f8716085]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x8449c)[0x7f64f869449c]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent_old.so(+0xb105)[0x7f64ef281105]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0x31c5a)[0x7f64ef035c5a]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0x3531e)[0x7f64ef03931e]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0x46dff)[0x7f64ef04adff]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0x4762e)[0x7f64ef04b62e]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6494)[0x7f64f8719bb4]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x8449c)[0x7f64f869449c]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/coerce_actions.so(+0x5741)[0x7f64ec6e4741]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/coerce_actions.so(+0x18586)[0x7f64ec6f7586]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0xbcb2f)[0x7f64f86ccb2f]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/coerce_actions.so(+0x165a6)[0x7f64ec6f55a6]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0xacd1)[0x7f64ef00ecd1]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0x2b9b2)[0x7f64ef02f9b2]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/parent.so(+0x3eb29)[0x7f64ef042b29]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/coerce.so(+0x2c420)[0x7f64ec938420]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/coerce.so(+0xf4d2)[0x7f64ec91b4d2]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/coerce.so(+0x30f3f)[0x7f64ec93cf3f]
/home/arpit/Documents/GSOC_16/sage/local/lib/python2.7/site-packages/sage/structure/element.so(+0xf4ad)[0x7f64ed6594ad]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyNumber_Multiply+0xbb)[0x7f64f866050b]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2965)[0x7f64f8716085]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7f64f871a689]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x58de)[0x7f64f8718ffe]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x8449c)[0x7f64f869449c]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x615dd)[0x7f64f86715dd]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0xbdd75)[0x7f64f86cdd75]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x3b2e)[0x7f64f871724e]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5a59)[0x7f64f8719179]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x8449c)[0x7f64f869449c]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0x615dd)[0x7f64f86715dd]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0xbdf8d)[0x7f64f86cdf8d]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(+0xbcb2f)[0x7f64f86ccb2f]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f64f8662bc3]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x3b2e)[0x7f64f871724e]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5a59)[0x7f64f8719179]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5936)[0x7f64f8719056]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x830)[0x7f64f871a560]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7f64f871a689]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0x8a)[0x7f64f873e45a]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xd7)[0x7f64f873f9e7]
/home/arpit/Documents/GSOC_16/sage/local/lib/libpython2.7.so.1.0(Py_Main+0xc25)[0x7f64f8755bd5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f64f7941f45]
python[0x40072e]
------------------------------------------------------------------------
Attaching gdb to process id 13179.

Saved trace to /home/arpit/.sage/crash_logs/crash_VcXzuj.log
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

**********************************************************************
----------------------------------------------------------------------
sage -t src/sage/rings/polynomial/skew_polynomial_element.pyx  # Killed due to segmentation fault
----------------------------------------------------------------------
Total time for all tests: 0.4 seconds
    cpu time: 0.0 seconds
    cumulative wall time: 0.0 seconds

Johan S. H. Rosenkilde

unread,
Jul 7, 2016, 8:18:02 AM7/7/16
to sage-...@googlegroups.com
Hi Arpit,

Did you try doctesting other parts of Sage to see whether your
segfaults are related to the ticket or not? It could be related to your
system setup.

If this is not the case, you should, as Travis asked you on an earlier
question, try to find a minimal example which causes the bug from the
Sage shell.

The the signalling behaviour of Cython code changed quite a lot during
the last few years, with ao. cysignals becoming a stand-alone package.
Perhaps the skew polynomial ticket doesn't use sig_on and sig_off
correctly.

Best,
Johan
--
Reply all
Reply to author
Forward
0 new messages