Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126797 - [RFC] handle common errors
Summary: [RFC] handle common errors
Status: VERIFIED UPSTREAM
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All Other
: High enhancement (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-19 05:58 UTC by molle.bestefich
Modified: 2006-03-22 07:40 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-03-19 05:58:15 UTC
When emerging, emerge can fail with errors like:
====================================================
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}:123456: Warning: end of file not at end of a line; newline inserted
make[2]: *** [blah.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/blah/work/blah'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/blah/work/blah'
make: *** [all] Error 2

!!! ERROR: super-apps/whatever-app failed.
!!! Function super-app_src_compile, Line 123, Exitcode 2
!!! compile problem
!!! If you need support, post the topmost build error, NOT this status message.
====================================================

The reasons for "Internal error: Killed" failures like the above could be various, but in 9/10 cases it's because the user has run out of available memory.  In a few cases there might be a hardware failure at hand (bad RAM or motherboard), and I guess that about sums it up as far as the realistic causes go.

Most people however will not be able to recognize that this:
====================================================
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.
====================================================
Really means this: "cc1plus suddenly died.  You've probably run out of memory."
And so they'll probably give up, I know I did the first 10 times this happened.

Or, if they really need the software they were trying to emerge, they might raise a bug on gentoo-bugs.  Hopefully someone there knows that it's probably a RAM problem and will tell them that.

The error message shown when emerging is slightly incorrect as it is (the program is not being "killed", it has "died unexpectedly").  Other than that, it's actually fairly accurate as far as GCC/MAKE goes - it tells exactly what's happened.

However it's *very* inappropriate for 'emerge', because Portage is meant to be user friendly.  So here's an idea how I think we can make Portage handle common errors like this.

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 look in the last 2kB and see if we find any known error messages.  Match the 2kB buffer against a list of regular expressions, for example "g++: Internal error: Killed (program cc1plus)", which would result in this message to the user:

==================
The program cc1plus died unexpectedly while compiling.
Most likely you're running out of memory, or you may have a hardware problem (try memtest86).
For other possibilities and more information, see <gentoo wiki link>.
If you're unable to solve your problem, see <http://bugs.gentoo.org/>.
==================

instead of:

==================
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.
[ snip make messages ]
!!! ERROR: super-apps/whatever-app failed.
!!! Function super-app_src_compile, Line 123, Exitcode 2
!!! compile problem
==================

The wiki link could even contain the error message as part of the query string, and a script on the server could pick that up and create a list of the most common compile errors that people seek help with.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-03-19 06:50:39 UTC
This has nothing to do with portage.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-03-19 06:51:21 UTC
See Bug 123871 for discussion of this.

*** This bug has been marked as a duplicate of 123871 ***
Comment 3 molle.bestefich 2006-03-19 11:53:32 UTC
Is 'emerge' not part of Portage?

Bug 123871 was a MySQL compile error that was resolved because the culprit was found.  This is a request for comments on a new 'emerge' feature.  How is this a duplicate?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-03-19 12:04:40 UTC
It has already been discussed and explained why your suggestion wrt *gcc* error messages in inappropriate. There are many other reasons why this issue can occur, as explained in Bug 123871, Comment #7 and Bug 123871, Comment #11.

Please, take this to gentoo-dev mailing list or ask upstream to change the messages that gcc produces. Bugzilla is not an appropriate place for such discussions.
Comment 5 molle.bestefich 2006-03-19 12:44:09 UTC
> It has already been discussed and explained
> why your suggestion wrt *gcc* error messages in inappropriate.

Yes.  Specifically, a guy named "Spanky" proposed that it was actually a GCC flaw, a shortlived argument which I clearly won.  You can (re-)read comment #6 in that bug for the last point in this argument.  No need to raise it again if there's nothing new on the horizon..

> There are many other reasons why this issue can occur

That doesn't matter.

Since the new error message would refer users to a wiki, it's a simple matter of adding your particular solution if you find yourself in a situation that isn't mentioned.

> as explained in Bug 123871, Comment #7

Sigh.  Fine, let's comment on these, even though I've made clear several times that they are irrellevant as per the wiki.

The two first possibilities mentioned are the same ones I proposed to start the wiki page with.  The next two are duplicates, but however a real possibility (though unlikely).  So that item ("buggy cc1plus") should be mentioned somewhere, near the end of the wiki page due to the unlikeliness of this happening to a large amount of people.  The next two items that Spanky mentions hardly deserves a comment at all - "maybe the kernel is miscompiled and it randomly kills programs" - yes, and maybe I'm using distcc and a Tomahawk missile hit the machine doing the compiles..  Not.  And the last point (bad hardware) is *again* one that was already mentioned in the original proposal.

> and Bug 123871, Comment #11.

Nothing interesting there.  Just a guy that's annoyed that I hadn't answered to Spanky's wild speculations on universal oddities and that I didn't back the statistics up with hard evidence.

> ask upstream to change the messages that gcc produces.

Since GCC produces a correct error message, I can't see what that should accomplish.

> Bugzilla is not an appropriate place for such
> discussions.
> Please, take this to gentoo-dev mailing list

Why is there a bugzilla component named "abstract ideas" and "feature requests" if not to be used for this?  (Seriously.)
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-03-19 12:55:56 UTC
> Since GCC produces a correct error message, I can't see what that should
> accomplish.

Ah, so if the message is correct, there's nothing to change in portage, since the message is already there. Last time you suggested that the message gcc produces is misleading. 

You've already suggested that gcc should be patched to change the message, now it should be portage that is to provide potentially misleading advice to users, what's gonna be next?

Take this to mailing lists, seriously.
Comment 7 molle.bestefich 2006-03-20 10:18:20 UTC
> > Since GCC produces a correct error message,
> > I can't see what that should accomplish.
>
> Ah, so if the message is correct, there's nothing to change in portage,
> since the message is already there.

The GCC message is technically correct, the way that Portage wraps it (saying that it's an internal error and urging the user to file a bug report) is not.

(Have you even read the proposal?)

> Last time you suggested that the message gcc produces is misleading. 

No.

> You've already suggested that gcc should be patched to change the message,

That's not my suggestion.

> now it should be portage that is to provide potentially misleading advice
> to users, what's gonna be next?

No.
Portage should *STOP* providing misleading advice, start giving out sane advice.

Read the proposal..

> Take this to mailing lists, seriously.

I have no particular objection to that.

I'm just confused; what's the 'idea' / 'enhancement request' components for, if not for ideas like this?  I asked you for an explanation and you didn't provide one; that's why I continued posting here.

I'm reopening this item; not to annoy you (I'm really sorry that I do), but (mainly) because 'UPSTREAM' is an incorrect resolution and (also) because no-one has enligthened me on why this place is not the right place - based on what I currently see, my view is that this is the right place, and you're just upset because you don't like the proposal.

If you can please tell me why this idea does not belong under "ideas" in the Portage bugzilla, please do and apply the correct resolution ("MOVED", right?).  (As an unprivileged bugzilla user, I'm unable to change the resolution on this item in any other way than what pressing 'reopen' does.)
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-03-20 11:48:45 UTC
Take this to mailing lists. 
Comment 9 molle.bestefich 2006-03-22 05:10:34 UTC
Why?
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-03-22 05:12:50 UTC
(In reply to comment #9)
> Why?

Because mailing list are there for discussions, not bugzilla.

Comment 11 molle.bestefich 2006-03-22 05:19:24 UTC
Then what is "Ideas" and "Enhancement Request" components in bugzilla for, if not for discussing ideas and enhancement requests?
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-03-22 05:22:28 UTC
(In reply to comment #11)
> Then what is "Ideas" and "Enhancement Request" components in bugzilla for, if
> not for discussing ideas and enhancement requests?

Take this to portage development mailing list and stop this bugspam. Period.
 

Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-03-22 05:22:52 UTC
CLOSED.
Comment 14 molle.bestefich 2006-03-22 05:42:43 UTC
Honestly Jakub, you're the one who is bugspamming.

You fail to argue for your cause or refer to any documentation, yet you keep closing this issue as if it was not appropriate for the "ideas" component.

And you keep closing the bug with 'upstream', which is obviously not appropriate - could you at least resolve the bug to 'moved' (or with no resolutation at all)?
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-03-22 05:47:02 UTC
(In reply to comment #14)
If you are requesting comments, use mailing lists, that's the place where to get comments. Once you get your comments and the general consent is that this is a good idea, then file a bug and sumbit patches. Bugzilla is NOT a place for requesting comments.

Stop reopening this bug or have you bugzilla account canceled, your choice really. Last time - use portage-devel mailing list for such discussions. 
Comment 16 molle.bestefich 2006-03-22 06:03:09 UTC
> Once you get your comments and the general consent is that
> this is a good idea, then file a bug and sumbit patches [to bugzilla, I presume].

Ok, that's a valid and fair argument.

You should add the above information here:
http://bugs.gentoo.org/describecomponents.cgi?product=Portage%20Development
So that others can see it (instead of having to ask you, Jakub).

> Stop reopening this bug or have you bugzilla account canceled,
> your choice really.

First the spam and now you threaten people.
Not a nice way to treat someone that's just here with a serious proposal.

I'll try and work bugzilla myself and see if I can close this bug with something more sane than 'upstream'.  Unless you can tell me why you think 'upstream' is appropriate?

Btw, UPSTREAM should be documented here, but isn't:
http://bugs.gentoo.org/page.cgi?id=fields.html#resolution
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-03-22 06:42:29 UTC
(In reply to comment #16)

> First the spam and now you threaten people.
> Not a nice way to treat someone that's just here with a serious proposal.

Uhm, it worked, didn't it? :P 

I've repeatedly asked you to take the issue to mailing lists, yet you insisted on reopening the bug over and over again. Should I tell that I'll break all your favorite toys instead? 

> I'll try and work bugzilla myself and see if I can close this bug with
> something more sane than 'upstream'.  Unless you can tell me why you think
> 'upstream' is appropriate?

UPSTREAM is the best we have, and means to take the issue elsewhere. Adding resolutions to bugzilla is a *huge* PITA, you can install bugzilla and try for yourself. Moreover, just not needed for this case. 

> Btw, UPSTREAM should be documented here, but isn't:
> http://bugs.gentoo.org/page.cgi?id=fields.html#resolution

There's separate Bug 94106 about this. 
Comment 18 molle.bestefich 2006-03-22 07:40:26 UTC
> Uhm, it worked, didn't it? :P

Oh yes, everything you've done here has worked great...

> I've repeatedly asked you to take the issue to mailing lists,
> yet you insisted on reopening the bug over and over again.

You've repeatedly ignored the question asking why an "idea" does not belong under "ideas".

You've repeatedly provided absolutely no input that would constitute good reason to move the discussion to the mailing list.

I can't see how you expect anyone to do as you say when all you do is spam the bug with the same illogical crap (excuse me) over and over again.

> Should I tell that I'll break all your favorite toys instead?

I'm not entering into a flamewar with you on a bugzilla.
Say whatever makes your private parts tingle the most, but don't expect any response from me.

> UPSTREAM is the best we have, and means to take the issue elsewhere.
> Adding resolutions to bugzilla is a *huge* PITA, you can install bugzilla
> and try for yourself.

Okie dokie, fair enough.

> Moreover, just not needed for this case.

Not sure what you're trying to say here.