From: Bongani Hlope <bonganilinux@mweb.co.za>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
rudsve@drewag.de, linux-kernel@vger.kernel.org,
torvalds@osdl.org, mingo@elte.hu, Little.Boss@physics.mcgill.ca
Subject: Re: Tracking a bug in x86-64
Date: Wed, 6 Jul 2005 20:20:27 +0200 [thread overview]
Message-ID: <200507062020.27480.bonganilinux@mweb.co.za> (raw)
In-Reply-To: <1120631696.3168.5.camel@laptopd505.fenrus.org>
On Wednesday 06 July 2005 08:34 am, Arjan van de Ven wrote:
> On Tue, 2005-07-05 at 14:12 -0700, Andrew Morton wrote:
> > Bongani Hlope <bonganilinux@mweb.co.za> wrote:
> > >
> > > I haven't tested 2.6.12.2 but the problem was introduced around 2.6.11-mm1 and
> > > found its way to 2.6.12-rcX. First try to run the following command (this works for me)
> > > echo 0 > /proc/sys/kernel/randomize_va_space
> > > I got an email from Juan Gallego (cc'd), he says that command does not work for him though.
> > >
> > > Andrew,
> > > Should I log this on the kernel's bugzilla?
> >
> > Yes please. This is a tough one, and having one place to go to for the
> > info would be useful.
>
> key for this one is to make sure we separate the cases carefully, and
> not end up with one big bucket of "something broke" that has a gazilion
> different and unrelated causes.
> For the cases where a vm layout thing is suspected of causing the
> breakage we also really need a /proc/<pid>/maps *at the time of the
> breakage* realistically for doing any kind of diagnostics.
>
The problem is, it is hard to get the /proc/<pid>/maps file because the crashes are just random.
If I set /proc/sys/kernel/randomize_va_space back to 1, and do a make -j4 on the kernel source.
gcc will start to segfault or cause protection errors. I added a printk in the randomize_stack_top function
just to print the pid and the random_variable (yes it is silly but...), the problem went away.
I tried to capture the /proc/<pid>/maps for the broken apps using the code below (it captures some, but it is brain dead),
but the problem goes away. I'll try to write a bash script that does the same and test.
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cstdio>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char** argv) {
pid_t child;
child = fork();
if(child == 0) {
execvp("/usr/bin/g++", argv);
}
else if (child > 0) {
char* name = new char[256];
sprintf(name,"/proc/%ld/maps", child);
ifstream in(name);
delete[] name;
ofstream out("/home/bongani/log/procs.txt", ofstream::app);
name = new char[4096];
out<<"--------------------------------------------"<<"\n";
out<<"g++("<<child<<")"<<"\n";
while(!in.eof()) {
in.getline(name, 4096);
out<<child<<" "<<name<<"\n";
}
out<<"----------------------------------------------"<<endl;
do {
}
while(child != wait(NULL));
delete[] name;
}
else {
printf("fork failed");
}
return 0;
}
prev parent reply other threads:[~2005-07-06 23:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-13 20:59 Bongani Hlope
2005-06-13 21:23 ` Andi Kleen
2005-06-13 21:39 ` Bongani Hlope
2005-06-13 21:48 ` Andi Kleen
2005-06-14 15:36 ` Linus Torvalds
2005-06-14 20:27 ` Andrew Morton
2005-06-14 21:19 ` Bongani Hlope
2005-06-15 22:20 ` Bongani Hlope
2005-06-15 22:39 ` Linus Torvalds
2005-06-15 23:39 ` Bongani Hlope
2005-06-16 0:46 ` Linus Torvalds
2005-06-16 2:02 ` Andi Kleen
2005-06-16 6:49 ` Bongani Hlope
[not found] ` <xfkll4lfy41.fsf@uxkm53.drewag.de>
2005-07-05 19:52 ` Bongani Hlope
2005-07-05 21:12 ` Andrew Morton
2005-07-06 6:34 ` Arjan van de Ven
2005-07-06 18:20 ` Bongani Hlope [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200507062020.27480.bonganilinux@mweb.co.za \
--to=bonganilinux@mweb.co.za \
--cc=Little.Boss@physics.mcgill.ca \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rudsve@drewag.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®