Bug 13815 - emacs -nw compilation doesn't show the error message
emacs -nw compilation doesn't show the error message
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Other
All Linux
: P1 blocking
Assigned To: drivers_other
:
Depends on:
Blocks: 13615
  Show dependency treegraph
 
Reported: 2009-07-23 06:22 UTC by Aneesh Kumar K.V
Modified: 2009-08-03 15:21 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.31-rc3
Tree: Mainline
Regression: Yes


Attachments
strace log showing buggy behaviour (33.34 KB, application/octet-stream)
2009-07-23 06:22 UTC, Aneesh Kumar K.V
Details

Description Aneesh Kumar K.V 2009-07-23 06:22:40 UTC
Created attachment 22461 [details]
strace log showing buggy behaviour

To reproduce write a small program something like below

main()
{
        printf("%d\n",i);
}

Now in emacs say ALT-x compile

use cc a.c command to compile. It is supposed to show the error messages in the compile window. With 2.6.30 it works fine. Where as 2.6.31-rc3 it doesn't list me any error. Reverting the patch d945cb9cce20ac7143c2de8d88b187f62db99bdc makes it work. Doing an strace on the failure case shows me that on the parent we don't get woken up in select on /dev/ptmx immediately when the data is avaiable in /dev/pts/3. So the child exit and the select timeout and a read from /dev/ptmx return EIO. Relevant strace log is attached below

-aneesh
Comment 1 Rafael J. Wysocki 2009-07-23 14:07:22 UTC
Caused by:

commit d945cb9cce20ac7143c2de8d88b187f62db99bdc
Author: Alan Cox <alan@linux.intel.com>
Date:   Tue Jul 7 16:39:41 2009 +0100

    pty: Rework the pty layer to use the normal buffering logic

First-Bad-Commit : d945cb9cce20ac7143c2de8d88b187f62db99bdc
Comment 2 Aneesh Kumar K.V 2009-07-23 14:13:14 UTC
Hi All,

I had private mails with Alan before filing this bugzilla report, and Alan
is not able to reproduce the problem. So are other able to reproduce it.
I am right now trying to do a small test case and see if i can get it
reproduced. A small c program that i am doing is getting me the error
contents on ptmx. So emacs is doing something more. So if others are
able to reproduce that will be a positive sign that is is not just
a problem with my setup.

-aneesh
Comment 3 Aneesh Kumar K.V 2009-07-24 08:00:58 UTC
I tried with a fedora 10 install and i can reproduce it there.
steps to reproduce.

ALT-x compile
use cc -g a.c to compile
if you get the error repeat the compile using recompile command to do that
ATL-x recompile
and keep doing that. 1 out of 3 tries result in dropping the error information.

-aneesh
Comment 4 Aneesh Kumar K.V 2009-07-26 17:39:07 UTC
This patch fixes the issue for me

http://article.gmane.org/gmane.linux.kernel/869359
Comment 5 Rafael J. Wysocki 2009-08-03 15:21:08 UTC
Fixed by commit e043e42bdb66885b3ac10d27a01ccb9972e2b0a3 .

Note You need to log in before you can comment on or make changes to this bug.