Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123871 - emerge mysql: misleading error message when out of memory
Summary: emerge mysql: misleading error message when out of memory
Status: RESOLVED DUPLICATE of bug 20600
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Lowest trivial (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 16:30 UTC by molle.bestefich
Modified: 2006-03-19 06:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description molle.bestefich 2006-02-23 16:30:56 UTC
I get the following error when trying to emerge mysql:
====================================================
x86_64-pc-linux-gnu-g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}:116584: Warning: end of file not at end of a line; newline inserted
make[4]: *** [sql_yacc.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/var/tmp/portage/mysql-5.0.18-r30/work/mysql/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/mysql-5.0.18-r30/work/mysql/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/mysql-5.0.18-r30/work/mysql/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/mysql-5.0.18-r30/work/mysql'
make: *** [all] Error 2

!!! ERROR: dev-db/mysql-5.0.18-r30 failed.
!!! Function mysql_src_compile, Line 378, Exitcode 2
!!! compile problem
!!! If you need support, post the topmost build error, NOT this status message.
====================================================

What should I do about this?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-02-23 16:52:02 UTC
Most likely out of memory/disk space, bad RAM or other hardware problem.

*** This bug has been marked as a duplicate of 20600 ***
Comment 2 molle.bestefich 2006-02-23 17:38:23 UTC
"out of memory" was it.
Thanks!

This is then a feature request, not a bug (although the current error message could be thought of as "buggy"):

Any chance that the error message could be changed from:
==================
Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
==================

To something like:
==================
Internal error: Killed (program blah)
Most likely you're running out of memory or have bad RAM.
See <wiki link> for more information.
==================

?

Changing the error message to something slightly more helpful would allow dumb people like me to use Portage without pestering bright people like you all the time..
Comment 3 SpanKY gentoo-dev 2006-02-23 18:19:56 UTC
there are a ton more things that could be and i doubt upstream would be willing to change the message, sorry :/
Comment 4 molle.bestefich 2006-02-23 18:28:15 UTC
Ok, sorry for being persistent and reopening, but can we give it just a little more thought?

Here's an idea; how about we tee the output of the build process into a FIFO buffer of some sort; and when the build process dies, we can grep the last 2kB for the problematic error message.

If it occurs, we can add something like this in red / yellow types:

 * Seems compilation failed because a program was killed.
   Normally this occurs because you've run out of RAM.
   See the wiki at <...> for more {suggestions,information}.
Comment 5 SpanKY gentoo-dev 2006-02-23 18:37:45 UTC
this isnt really for us to do, this is something for the gcc peeps to update, and i'm pretty sure they wouldnt go for this
Comment 6 molle.bestefich 2006-02-23 18:48:28 UTC
Ok, so the facts in a pragmatic dimension is:

1.) We seem to all know that the GCC peeps is not magically going to make things the way we need them.  Absolutely no hope.

2.) There's an easy way to fix this on our side.


And the technical facts are:

A.) Technically, looking at things from the GCC side of the fence, the error message *is* correct.

B.) Looking at it from a Portage user's POV, the error message is horribly incorrect, because Portage is meant to be user friendly.

==

From A) and B) we can derive that the right place to fix this *is* really Portage.

(From 1) and 2) we can derive that in the real world, the only place this is ever plausible to fix *is* in Portage.)

So let's get on with the thinking instead of just throwing our hands in the air and giving up?

By the way, is there a mailing list for this kind of discussions?
Battling two people over a 'WONTFIX/REOPENED' flag seems moot..
Comment 7 SpanKY gentoo-dev 2006-02-23 18:58:48 UTC
> 2.) There's an easy way to fix this on our side.

i dont think so

> B.) Looking at it from a Portage user's POV, the error message is horribly
> incorrect, because Portage is meant to be user friendly.

there is no real way to know why the program was killed

maybe you were out of free ram
maybe you were out of disk space
maybe the binary is miscompiled and randomly crashes
maybe there is an error in the program and it keeps crashing
maybe a kernel bug felt that the program was doing something wrong and killed it
maybe the kernel is miscompiled and it randomly kills programs
maybe a hardware error prompted the kernel to kill it

listing all the random possibilities doesnt gain anything

> By the way, is there a mailing list for this kind of discussions?
> Battling two people over a 'WONTFIX/REOPENED' flag seems moot..

gentoo-dev mailing list
Comment 8 molle.bestefich 2006-02-23 19:09:30 UTC
>> 2.) There's an easy way to fix this on our side.
> i dont think so

Hmm, what was wrong with my proposal?

> there is no real way to know why the program was killed
> [snip options]

True, but 95/100 you're low on RAM, 5/100 some hardware is defect which can be checked with memtest86.

> listing all the random possibilities doesnt gain anything

Sure it does, it improves user friendliness by ALOT !!

Especially if you tell:
 * What's the most likely thing (what to check first)
 * How to proceed (increase RAM, run memtest86)

> gentoo-dev mailing list

Super, thanks a lot!
I'll take it there (you agree that's the proper place right?)

I won't mind if you deassign toolchain and reassign to ?? portage or whatever, or set to CANTFIX for toolchain :)
(I don't think this has much to do with GCC/LD/etc specifically.)
Comment 9 Mark Loeser (RETIRED) gentoo-dev 2006-02-23 21:47:54 UTC
Not a bug.  I also don't see how it helps to give a list of possible problems, all of which are just as plausible as the next.  It is going to be just as confusing, just in a whole new way.
Comment 10 molle.bestefich 2006-02-23 21:51:10 UTC
> Not a bug.

Yeah, in the exact same way it isn't a bug in pre-2000 versions of Windows that you had to restart when you changed the IP address.

> I also don't see how it helps to give a list of possible problems,
> all of which are just as plausible as the next.

95% probability: too little free RAM
5% probability: bad RAM or other hardware (run memtest)
0.00000001% probability: the rest.

None of them are "just as plausible as the next".

> It is going to be just as confusing, just in a whole new way.

Nah...
Comment 11 Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-24 00:00:16 UTC
(In reply to comment #10)
> 95% probability: too little free RAM
> 5% probability: bad RAM or other hardware (run memtest)
> 0.00000001% probability: the rest.

Please don't keep stating these invented statistics.  It's simply just not true to say that "killed => out of memory".  Look at the list of possibilities that SpanKY gave you in comment #7.

Having said that, if mysql is unusually demanding w.r.t memory/disk usage, perhaps it could make use of the check-reqs.eclass.  Re-opening to reassign.
Comment 12 Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-24 00:05:48 UTC
mysql people - if mysql demands significant resources to build (>256M RAM, >1GB temporary disk space), can you consider using check-req.eclass?

If not, mark as dup of bug #20600.

P.S. and can you fix your metadata.xml to indicate mysql-bugs@g.o as maintainer since the herd doesn't have an alias on bugzilla?
Comment 13 molle.bestefich 2006-02-24 00:20:58 UTC
> Please don't keep stating these invented statistics.

Why not?
Can you honestly say that you don't believe those "statistics" are true?

And besides, all that those "statistics" would be used to (if my proposal was implemented) would be to order the various solutions on the wiki.  You would be free to add all that weird crap that never happens that you keep talking about :-).
Comment 14 Francesco R. (RETIRED) gentoo-dev 2006-03-18 03:59:09 UTC
(In reply to comment #12)
> mysql people - if mysql demands significant resources to build (>256M RAM, >1GB
> temporary disk space), can you consider using check-req.eclass?
> 
> If not, mark as dup of bug #20600.

indeed

> 
> P.S. and can you fix your metadata.xml to indicate mysql-bugs@g.o as maintainer
> since the herd doesn't have an alias on bugzilla?
> 

Done, sorry for the delay

*** This bug has been marked as a duplicate of 20600 ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-03-19 06:51:21 UTC
*** Bug 126797 has been marked as a duplicate of this bug. ***