Fix busted sage -valgrind

130 views
Skip to first unread message

mabshoff

unread,
Feb 6, 2013, 4:13:07 PM2/6/13
to sage-...@googlegroups.com
Hello folks,

it has been a while, i.e.summer 2009 or so, and I no longer have my trac account password nor do I recall the email address I used. Anyway, attached is a patch that fixes sage -valgrind. Did not see any ticket on track, but I noticed that at least the valgrind 3.8.1 spkg is coming since the current release in the optional repo is borked with glibc 2.15 or newer, so not that useful on current distros.

Cheers,

Michael
sage-5.6-fix_sage-valgrind_vs_ipython_issue.patch

Jean-Pierre Flori

unread,
Feb 6, 2013, 4:41:25 PM2/6/13
to sage-...@googlegroups.com
There's a ticket for valgrind upgrade to 3.8.1...
I guess it did not get merged because no one cares except a Mac user but there is some trouble on Apple^TM because it is coded so that only Apple copimler can build it on such computers and not the FSF GCC Sage ships.

Anyway, I just installed it succesfully this afternoon but did not actually tried it, so you mean "sage -valgrind" does not work anymore?

Minh Nguyen

unread,
Feb 6, 2013, 5:02:14 PM2/6/13
to sage-...@googlegroups.com, Michael Abshoff
Hi Michael,

On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com> wrote:
> it has been a while, i.e.summer 2009 or so, and I no longer have my trac
> account password nor do I recall the email address I used.

Great to hear from you again! I've reconfigured your trac account.
I'll contact you offlist about this.

--
Regards,
Minh Van Nguyen
http://bit.ly/mvngu

John Cremona

unread,
Feb 6, 2013, 5:46:24 PM2/6/13
to SAGE devel
On 6 February 2013 22:02, Minh Nguyen <mvngu...@gmail.com> wrote:
> Hi Michael,
>
> On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com> wrote:
>> it has been a while, i.e.summer 2009 or so, and I no longer have my trac
>> account password nor do I recall the email address I used.
>
> Great to hear from you again!

Seconded!

John

> I've reconfigured your trac account.
> I'll contact you offlist about this.
>
> --
> Regards,
> Minh Van Nguyen
> http://bit.ly/mvngu
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

kcrisman

unread,
Feb 6, 2013, 8:26:00 PM2/6/13
to sage-...@googlegroups.com

> On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com> wrote:
>> it has been a while, i.e.summer 2009 or so, and I no longer have my trac
>> account password nor do I recall the email address I used.
>
> Great to hear from you again!

Seconded!


+1 

kcrisman

unread,
Feb 6, 2013, 8:27:27 PM2/6/13
to sage-...@googlegroups.com


On Wednesday, February 6, 2013 4:41:25 PM UTC-5, Jean-Pierre Flori wrote:
There's a ticket for valgrind upgrade to 3.8.1...

Nicolas M. Thiery

unread,
Feb 6, 2013, 8:59:21 PM2/6/13
to sage-...@googlegroups.com
On Wed, Feb 06, 2013 at 10:46:24PM +0000, John Cremona wrote:
> On 6 February 2013 22:02, Minh Nguyen <mvngu...@gmail.com> wrote:
> > Hi Michael,
> >
> > On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com> wrote:
> >> it has been a while, i.e.summer 2009 or so, and I no longer have my trac
> >> account password nor do I recall the email address I used.
> >
> > Great to hear from you again!
>
> Seconded!

Definitely!

Nicolas
--
Nicolas M. Thi�ry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

Jason Grout

unread,
Feb 6, 2013, 9:48:01 PM2/6/13
to sage-...@googlegroups.com
Let me add my voice: +1!



mabshoff

unread,
Feb 7, 2013, 11:19:40 AM2/7/13
to sage-...@googlegroups.com


On Wednesday, February 6, 2013 10:41:25 PM UTC+1, Jean-Pierre Flori wrote:
There's a ticket for valgrind upgrade to 3.8.1...
I guess it did not get merged because no one cares except a Mac user but there is some trouble on Apple^TM because it is coded so that only Apple copimler can build it on such computers and not the FSF GCC Sage ships.


Ok, I did not test it on OSX, I just dumped the 3.8.1 release into the spkg. Since that one segfaults on a few doctests I meant to dump the current svn trunk in there to see if it makes a difference.
 
Anyway, I just installed it succesfully this afternoon but did not actually tried it, so you mean "sage -valgrind" does not work anymore?


Yep, it broke the same was as 'sage -gdb'

Cheers,

Michael
 

mabshoff

unread,
Feb 7, 2013, 11:22:24 AM2/7/13
to sage-...@googlegroups.com
Hehe, I will ping some people off list since I got several emails from various Sage developers and I do not feel like writing various similar emails. And sage-devel is not the place to discuss it anyway. Today is shot, so it should be tomorrow, i.e. Friday.

Cheers,

Michael

Alexander Dreyer

unread,
Feb 8, 2013, 3:16:18 AM2/8/13
to sage-...@googlegroups.com
Hello Michael!

it has been a while, i.e.summer 2009 or so, and I no longer have my trac account password nor do I recall the email address I used. Anyway, attached is a patch that fixes sage -valgrind. Did not see any ticket on track, but I noticed that at least the valgrind 3.8.1 spkg is coming since the current release in the optional repo is borked with glibc 2.15 or newer, so not that useful on current distros.

Nice to see you back in the community!

My best,
  Alexander

Florent Hivert

unread,
Feb 8, 2013, 3:32:57 AM2/8/13
to sage-...@googlegroups.com
On Wed, Feb 06, 2013 at 08:59:21PM -0500, Nicolas M. Thiery wrote:
> On Wed, Feb 06, 2013 at 10:46:24PM +0000, John Cremona wrote:
> > On 6 February 2013 22:02, Minh Nguyen <mvngu...@gmail.com> wrote:
> > > Hi Michael,
> > >
> > > On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com> wrote:
> > >> it has been a while, i.e.summer 2009 or so, and I no longer have my trac
> > >> account password nor do I recall the email address I used.
> > >
> > > Great to hear from you again!
> >
> > Seconded!

+3.1415926535897932384626433...

Florent

David Joyner

unread,
Feb 8, 2013, 4:29:16 AM2/8/13
to sage-...@googlegroups.com
Welcome back Michael!
Hope all is well.
- David J

>
> Florent

mabshoff

unread,
Feb 11, 2013, 3:22:00 PM2/11/13
to sage-...@googlegroups.com


On Friday, February 8, 2013 10:29:16 AM UTC+1, David Joyner wrote:
On Fri, Feb 8, 2013 at 3:32 AM, Florent Hivert <Florent...@lri.fr> wrote:
> On Wed, Feb 06, 2013 at 08:59:21PM -0500, Nicolas M. Thiery wrote:
>> On Wed, Feb 06, 2013 at 10:46:24PM +0000, John Cremona wrote:
>> > On 6 February 2013 22:02, Minh Nguyen <mvngu...@gmail.com> wrote:
>> > > Hi Michael,
>> > >
>> > > On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com> wrote:
>> > >> it has been a while, i.e.summer 2009 or so, and I no longer have my trac
>> > >> account password nor do I recall the email address I used.
>> > >
>> > > Great to hear from you again!
>> >
>> > Seconded!
>
> +3.1415926535897932384626433...

Welcome back Michael!
Hope all is well.
- David J

>
> Florent
>
> --

Hello folks,

I made this #14097 and threw the patch up there.

The weekend I also ran all doctests through the ringer on an x86-64 Linux box and found quite a few problems, not surprising since I had a look at the liberal suppression file before I ran the tests. Unfortunately I doubt I will have any time to spare to fix those problems, but I might get to some of the more obvious and low hanging fruit. If anyone cares I can list some of the more serious problems, but anyway with access to the Sage build farm can get those reports with less than 80 hours of CPU time anyway. My shiny new eight core build box did it in less than eight hours wall time.

If I were to do any work on Sage I would pick up where I left since in 2009 I actually did a port of Sage 4.0 to a mixed MSVC/MingW environment to the point where I could import libSingular and do GB computations. I was a 3.5 months never ending session of banging my head against my desk, but in the end I ended up with somewhere aroud 500 to 600 patches to many of the Sage components as well as the Sage library. pexpect was a special pain in the ass, but that was to be expected. Unfortunately the disk image I used no longer exists due to a hardware failure of the backup medium - guess who now uses additional online backups for the important stuff :(. The failure does not matter too much since most of those patches had to be cleaned up anyway and if you have to do the port the second time you just have to remember how you fixed the problem the first time ;).

These days unfortunately there are components like libgap which make a port significantly more work and due to the way memory is managed in GAP, at least back in 2009, the only realistic option on Windows would be the 64 bit port. But since Pari assumes sizeof(void) == long and Windows 64 bit is a LLP platform you are out of luck there. The Pari maintainers rejected a patch to fix this violation of the *C Standard* in 2009, so unless they changed their minds you are simply up shit creek without a paddle. Just the general move from LP to LLP would be enough of a pain in the ass to cause significant problems anyway. And I might be a sucker for mission impossible, but I rather not enter that abyss again voluntarily.

Anyway, see you around at some point. It has been fun to revisit the old code base I spend so much of 2008/2009 on.

Cheers,

Michael

Volker Braun

unread,
Feb 11, 2013, 5:52:19 PM2/11/13
to sage-...@googlegroups.com
On Monday, February 11, 2013 8:22:00 PM UTC, mabshoff wrote:
These days unfortunately there are components like libgap which make a port significantly more work and due to the way memory is managed in GAP, at least back in 2009, the only realistic option on Windows would be the 64 bit port.

GAP no longer uses sbrk, horray ;-) Now its an anonymous mmap...
 

kcrisman

unread,
Feb 11, 2013, 8:38:26 PM2/11/13
to sage-...@googlegroups.com
If I were to do any work on Sage I would pick up where I left since in 2009 I actually did a port of Sage 4.0 to a mixed MSVC/MingW environment to the point where I could import libSingular and do GB computations. I was a 3.5 months never ending session of banging my head against my desk, but in the end I ended up with somewhere aroud 500 to 600 patches to many of the Sage components as well as the Sage library. pexpect was a special pain in the ass, but that was to be expected. Unfortunately the disk image I used no longer exists due to a hardware failure of the backup medium - guess who now uses additional online backups for the important stuff :(. The failure does not matter too much since most of those patches had to be cleaned up anyway and if you have to do the port the second time you just have to remember how you fixed the problem the first time ;).


Thanks to JP Flori and a number of other people on finding better flags etc. for Cygwin, you might be surprised about some of the spkgs now on Windows, they might not need as much work as before..  can't speak for Pari and/or libGAP, though!

Dima Pasechnik

unread,
Feb 11, 2013, 11:28:54 PM2/11/13
to sage-...@googlegroups.com, sage-w...@googlegroups.com
On 2013-02-11, mabshoff <mabs...@gmail.com> wrote:
> ------=_Part_654_28116328.1360614120849
> Content-Type: text/plain; charset=ISO-8859-1
>
>
>
> On Friday, February 8, 2013 10:29:16 AM UTC+1, David Joyner wrote:
>>
>> On Fri, Feb 8, 2013 at 3:32 AM, Florent Hivert <Florent...@lri.fr<javascript:>>
>> wrote:
>> > On Wed, Feb 06, 2013 at 08:59:21PM -0500, Nicolas M. Thiery wrote:
>> >> On Wed, Feb 06, 2013 at 10:46:24PM +0000, John Cremona wrote:
>> >> > On 6 February 2013 22:02, Minh Nguyen <mvngu...@gmail.com<javascript:>>
>> wrote:
>> >> > > Hi Michael,
>> >> > >
>> >> > > On Thu, Feb 7, 2013 at 8:13 AM, mabshoff <mabs...@googlemail.com<javascript:>>
>> wrote:
>> >> > >> it has been a while, i.e.summer 2009 or so, and I no longer have
>> my trac
>> >> > >> account password nor do I recall the email address I used.
>> >> > >
>> >> > > Great to hear from you again!
>> >> >
>> >> > Seconded!
>> >
>> > +3.1415926535897932384626433...
>>
>> Welcome back Michael!
>> Hope all is well.
>> - David J
>>
>> >
>> > Florent
>> >
>> > --
>>
>
> Hello folks,
>
> I made this #14097 and threw the patch up there.
>
> The weekend I also ran all doctests through the ringer on an x86-64 Linux
> box and found quite a few problems, not surprising since I had a look at
> the liberal suppression file before I ran the tests. Unfortunately I doubt
> I will have any time to spare to fix those problems, but I might get to
> some of the more obvious and low hanging fruit. If anyone cares I can list
> some of the more serious problems, but anyway with access to the Sage build
> farm can get those reports with less than 80 hours of CPU time anyway. My
> shiny new eight core build box did it in less than eight hours wall time.
>
> If I were to do any work on Sage I would pick up where I left since in 2009
> I actually did a port of Sage 4.0 to a mixed MSVC/MingW environment to the

Please note that Cygwin did not stand still since 2009. Its notoriously
flaky fork() is working quite well now, and the Cygwin port of Sage is
pretty much complete. Sage 5.7.beta* needs only a couple of patches to
get it built, and pass a vast majority of doctest, and there seem to be
no big issues with ironing out the rest of the platform-specific bugs.

(see the bottom of http://trac.sagemath.org/sage_trac/wiki/CygwinPort)

Not sure how well sagenb works, though...

This pretty much covers the 32-bit Windows systems, as well as Wow64
subsystem, available on most (all?) 64-bit Windows systems. Perhaps the
"right thing" is to join an effort of making a 64-bit Cygwin...

On the other hand, GAP, Singular, and Co. would certainly appreciare MinGW ports.

mabshoff

unread,
Feb 13, 2013, 1:39:26 PM2/13/13
to sage-...@googlegroups.com

Good, it would have been the obvious thing to do anyway.

Cheers,

Michael

mabshoff

unread,
Feb 13, 2013, 1:46:44 PM2/13/13
to sage-...@googlegroups.com


On Tuesday, February 12, 2013 2:38:26 AM UTC+1, kcrisman wrote:

Thanks to JP Flori and a number of other people on finding better flags etc. for Cygwin, you might be surprised about some of the spkgs now on Windows, they might not need as much work as before..  can't speak for Pari and/or libGAP, though!

Sage always build on Cygwin with patches, indeed my first contribution way back in the day in 2007 or so was a build fix for Sage on Cygwin.

The problem from my point of view is:

 (a) limit address space, i.e. about 1.5 GB max last time I checked
 (b) absolutely horrible build time since fork() performance on Windows utterly sucks, i.e. run a configure script on a Cygwin host and you want to kill yourself. I build Sage 4.0 on Cygwin in 2009 and it took me 36 hours from start to a sage prompt and the problem was not fixing the few build issues, but waiting for the damn thing to compile.

If you want to see a fast compiler, especially C++, check out MSVC. It does not have the best reputation, but compiling template heavy code for example with it is an absolute pleasure compared to g++ from a time as well as a memory consumption point of view. It surely has its own issues (C99 support, parsing very long lines, linking with LTO consumes plenty of resources, etc), but overall it is a pretty decent compiler.

The move Cygwin -> MinGW/MSVC is all about moving away from POSIX-y interfaces. And convincing upstream to integrate those changes can be tricky. And that is a fight I do not want to fight :p.

Cheers,

Michael

mabshoff

unread,
Feb 13, 2013, 1:55:50 PM2/13/13
to sage-...@googlegroups.com, sage-w...@googlegroups.com


On Tuesday, February 12, 2013 5:28:54 AM UTC+1, Dima Pasechnik wrote:

<SNIP>

 
> If I were to do any work on Sage I would pick up where I left since in 2009
> I actually did a port of Sage 4.0 to a mixed MSVC/MingW environment to the

Please note that Cygwin did not stand still since 2009. Its notoriously
flaky fork() is working quite well now, and the Cygwin port of Sage is
pretty much complete.  Sage 5.7.beta* needs only a couple of patches to
get it built, and pass a vast majority of doctest, and there seem to be
no big issues with ironing out the rest of the platform-specific bugs.

Yes, I saw that and you certainly seem to do a good job.
 

I can certainly understand the amount of work it takes to keep a Sage port even on live support. The problem for Cygwin is plain and simply build time and the fact that unless you catch up and integrate all the fixes you have and get your platform autotested it will always get broken again. And the vast majority of Sage developers will not care.
 
Not sure how well sagenb works, though...

This pretty much covers the 32-bit Windows systems, as well as Wow64
subsystem, available on most (all?) 64-bit Windows systems.

Sure, but given the ubiquity of virtualization solutions running Sage in a VM is just simpler.
 
 Perhaps the
"right thing" is to join an effort of making a 64-bit Cygwin...


Eh, I doubt that will happen anytime soon. MinGW 64 took forever to happen, but who knows, maybe it will just pop up one day.
 
On the other hand, GAP, Singular, and Co. would certainly appreciare MinGW ports.


Yeah, I would think so, too. I have not been to a mathematical conference in about three years, but my guess would be that OSX has become even more prominent amongst researchers and Windows in general is becoming less and less relevant in that space. On top of that you take the 'cloud' and smart phones combined with the Sage Notebook and the people who really have to have that native Windows port of Sage does drop down even further. Assuming current projections hold 2014 will be the year where the install basis of Andriod devices will exceed the install basis of Windows PCs (as well as Windows phones :P), so the problem of Sage on Windows might just take care of itself in the next couple years anyway.

Cheers,

Michael
 

Jean-Pierre Flori

unread,
Feb 14, 2013, 3:14:36 AM2/14/13
to sage-...@googlegroups.com, sage-w...@googlegroups.com

On Wednesday, February 13, 2013 7:55:50 PM UTC+1, mabshoff wrote:
Yeah, I would think so, too. I have not been to a mathematical conference in about three years, but my guess would be that OSX has become even more prominent amongst researchers and Windows in general is becoming less and less relevant in that space. On top of that you take the 'cloud' and smart phones combined with the Sage Notebook and the people who really have to have that native Windows port of Sage does drop down even further. Assuming current projections hold 2014 will be the year where the install basis of Andriod devices will exceed the install basis of Windows PCs (as well as Windows phones :P), so the problem of Sage on Windows might just take care of itself in the next couple years anyway.

Cannot OS X run a VM?

Michael Abshoff

unread,
Feb 14, 2013, 3:25:39 AM2/14/13
to sage-...@googlegroups.com
On Thu, Feb 14, 2013 at 9:14 AM, Jean-Pierre Flori <jpf...@gmail.com> wrote:
>

<SNIP>

> Cannot OS X run a VM?

Sure, but Sage does have a native 32 bit as well as 64 bit OSX port,
so aside from the lag of supporting a new OSX major release there
never is the need for one. Or did I just not get your point?

Cheers,

Michael

Jean-Pierre Flori

unread,
Feb 14, 2013, 4:38:31 AM2/14/13
to sage-...@googlegroups.com


On Thursday, February 14, 2013 9:25:39 AM UTC+1, mabshoff wrote:
On Thu, Feb 14, 2013 at 9:14 AM, Jean-Pierre Flori <jpf...@gmail.com> wrote:
>

<SNIP>

> Cannot OS X run a VM?

Sure, but Sage does have a native 32 bit as well as 64 bit OSX port,
so aside from the lag of supporting a new OSX major release there
never is the need for one. Or did I just not get your point?

No I was just joking :)
(And I'm not a big fan of Apple stuff)

kcrisman

unread,
Feb 14, 2013, 8:46:37 AM2/14/13
to sage-...@googlegroups.com


On Thursday, February 14, 2013 4:38:31 AM UTC-5, Jean-Pierre Flori wrote:


On Thursday, February 14, 2013 9:25:39 AM UTC+1, mabshoff wrote:
On Thu, Feb 14, 2013 at 9:14 AM, Jean-Pierre Flori <jpf...@gmail.com> wrote:
>

<SNIP>

> Cannot OS X run a VM?

Sure, but Sage does have a native 32 bit as well as 64 bit OSX port,
so aside from the lag of supporting a new OSX major release there
never is the need for one. Or did I just not get your point?

No I was just joking :)
(And I'm not a big fan of Apple stuff)

However, I wonder if Sage would have gotten as much traction if OS X didn't have nearly the same POSIX stuff as the various Linuces around.  Whether you like Apple or not, there are a LOT of Apple users in the mathematics world - not necessarily because of the POSIX, though perhaps it helps.
Reply all
Reply to author
Forward
0 new messages