* problems with shared memory
@ 2002-03-06 0:37 Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Adam Wozniak @ 2002-03-06 0:37 UTC (permalink / raw)
To: linuxppc-embedded
I've got Linux 2.4.16 running on a custom MPC8260 board.
when I do the program below in a tight loop
i.e.
while true
do
./foo 8675 1024
done
Things pop after about 20 iterations. It'll choose a different spot
in the kernel to pop depending on what options I've compiled into the
kernel. I believe I've got some memory corruption going on. When I
poke around with a hardware debugger I see values in kernel structures
which clearly aren't right.
Any known problems with shared memory in the 2.4.16 kernel on the MPC8260?
This should be easy enough for someone to try to reproduce.
=== begin foo.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/shm.h>
int main (int argc, char **argv)
{
int j;
char *q;
int p;
p = shmget(atoi(argv[1]), atoi(argv[2]), IPC_CREAT | 0666);
q = shmat(p, NULL, 0);
printf("at @ %p \n", q);
{
int i;
for (i = 0; i < atoi(argv[2]); i++)
{
q[i]++;
}
}
shmdt(q);
}
=== end foo.c
--
Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* problems with shared memory
2002-03-06 0:37 problems with shared memory Adam Wozniak
@ 2002-03-06 16:53 ` Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
2002-03-07 12:53 ` Wolfgang Grandegger
2 siblings, 0 replies; 8+ messages in thread
From: Adam Wozniak @ 2002-03-06 16:53 UTC (permalink / raw)
To: linuxppc-dev
I've got Linux 2.4.16 running on a custom MPC8260 board.
when I do the program below in a tight loop
i.e.
while true
do
./foo 8675 1024
done
Things pop after about 20 iterations. It'll choose a different spot
in the kernel to pop depending on what options I've compiled into the
kernel. I believe I've got some memory corruption going on. When I
poke around with a hardware debugger I see values in kernel structures
which clearly aren't right.
Any known problems with shared memory in the 2.4.16 kernel on the MPC8260?
This should be easy enough for someone to try to reproduce.
=== begin foo.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/shm.h>
int main (int argc, char **argv)
{
int j;
char *q;
int p;
p = shmget(atoi(argv[1]), atoi(argv[2]), IPC_CREAT | 0666);
q = shmat(p, NULL, 0);
printf("at @ %p \n", q);
{
int i;
for (i = 0; i < atoi(argv[2]); i++)
{
q[i]++;
}
}
shmdt(q);
}
=== end foo.c
--
Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problems with shared memory
2002-03-06 0:37 problems with shared memory Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
@ 2002-03-06 16:53 ` Adam Wozniak
2002-03-07 12:53 ` Wolfgang Grandegger
2 siblings, 0 replies; 8+ messages in thread
From: Adam Wozniak @ 2002-03-06 16:53 UTC (permalink / raw)
To: linuxppc-embedded
I've got Linux 2.4.16 running on a custom MPC8260 board.
when I do the program below in a tight loop
i.e.
while true
do
./foo 8675 1024
done
Things pop after about 20 iterations. It'll choose a different spot
in the kernel to pop depending on what options I've compiled into the
kernel. I believe I've got some memory corruption going on. When I
poke around with a hardware debugger I see values in kernel structures
which clearly aren't right.
Any known problems with shared memory in the 2.4.16 kernel on the MPC8260?
This should be easy enough for someone to try to reproduce.
=== begin foo.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/shm.h>
int main (int argc, char **argv)
{
int j;
char *q;
int p;
p = shmget(atoi(argv[1]), atoi(argv[2]), IPC_CREAT | 0666);
q = shmat(p, NULL, 0);
printf("at @ %p \n", q);
{
int i;
for (i = 0; i < atoi(argv[2]); i++)
{
q[i]++;
}
}
shmdt(q);
}
=== end foo.c
--
Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problems with shared memory
2002-03-06 0:37 problems with shared memory Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
@ 2002-03-07 12:53 ` Wolfgang Grandegger
2002-03-07 14:47 ` somshekar kadam
2002-03-07 16:32 ` Adam Wozniak
2 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Grandegger @ 2002-03-07 12:53 UTC (permalink / raw)
To: Adam Wozniak; +Cc: linuxppc-embedded
Hi Adam,
David Ashley has reported lately a bug in arch/ppc/mm/ppc_mmu.c (see
http://lists.linuxppc.org/linuxppc-embedded/200202/msg00307.html),
which seems to be present in the linuxppc_2_4 tree but not in the
linuxppc_2_4_devel tree.
Hope it helps,
Wolfgang.
Adam Wozniak wrote:
>I've got Linux 2.4.16 running on a custom MPC8260 board.
>
>when I do the program below in a tight loop
>i.e.
>
>while true
>do
>./foo 8675 1024
>done
>
>Things pop after about 20 iterations. It'll choose a different spot
>in the kernel to pop depending on what options I've compiled into the
>kernel. I believe I've got some memory corruption going on. When I
>poke around with a hardware debugger I see values in kernel structures
>which clearly aren't right.
>
>Any known problems with shared memory in the 2.4.16 kernel on the MPC8260?
>
>This should be easy enough for someone to try to reproduce.
>
>=== begin foo.c
>#include <stdio.h>
>#include <sys/types.h>
>#include <sys/shm.h>
>
>int main (int argc, char **argv)
>{
> int j;
> char *q;
> int p;
>
> p = shmget(atoi(argv[1]), atoi(argv[2]), IPC_CREAT | 0666);
>
> q = shmat(p, NULL, 0);
>
> printf("at @ %p \n", q);
>
> {
> int i;
> for (i = 0; i < atoi(argv[2]); i++)
> {
> q[i]++;
> }
> }
>
> shmdt(q);
>}
>=== end foo.c
>
>--
>Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
>awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
> http://www.comdev.cc
> Voice: (805) 544-1089 Fax: (805) 544-2055
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problems with shared memory
2002-03-07 12:53 ` Wolfgang Grandegger
@ 2002-03-07 14:47 ` somshekar kadam
2002-03-07 16:32 ` Adam Wozniak
1 sibling, 0 replies; 8+ messages in thread
From: somshekar kadam @ 2002-03-07 14:47 UTC (permalink / raw)
To: Wolfgang Grandegger, Adam Wozniak; +Cc: linuxppc-embedded
hi,
i am having 8264 ,i wnat to know
to map my pci memory space and io space i will set the
bat registers using setbat function
but how to initialise ptes (page table entry) does
any one haveany idea
or where it is in kernel let me know
i am not clear regarding this
thanks in advance
somshekar
--- Wolfgang Grandegger
<wolfgang.grandegger@bluewin.ch> wrote: >
> Hi Adam,
>
> David Ashley has reported lately a bug in
> arch/ppc/mm/ppc_mmu.c (see
>
http://lists.linuxppc.org/linuxppc-embedded/200202/msg00307.html),
> which seems to be present in the linuxppc_2_4 tree
> but not in the
> linuxppc_2_4_devel tree.
>
> Hope it helps,
>
> Wolfgang.
>
>
> Adam Wozniak wrote:
>
> >I've got Linux 2.4.16 running on a custom MPC8260
> board.
> >
> >when I do the program below in a tight loop
> >i.e.
> >
> >while true
> >do
> >./foo 8675 1024
> >done
> >
> >Things pop after about 20 iterations. It'll choose
> a different spot
> >in the kernel to pop depending on what options I've
> compiled into the
> >kernel. I believe I've got some memory corruption
> going on. When I
> >poke around with a hardware debugger I see values
> in kernel structures
> >which clearly aren't right.
> >
> >Any known problems with shared memory in the 2.4.16
> kernel on the MPC8260?
> >
> >This should be easy enough for someone to try to
> reproduce.
> >
> >=== begin foo.c
> >#include <stdio.h>
> >#include <sys/types.h>
> >#include <sys/shm.h>
> >
> >int main (int argc, char **argv)
> >{
> > int j;
> > char *q;
> > int p;
> >
> > p = shmget(atoi(argv[1]), atoi(argv[2]),
> IPC_CREAT | 0666);
> >
> > q = shmat(p, NULL, 0);
> >
> > printf("at @ %p \n", q);
> >
> > {
> > int i;
> > for (i = 0; i < atoi(argv[2]); i++)
> > {
> > q[i]++;
> > }
> > }
> >
> > shmdt(q);
> >}
> >=== end foo.c
> >
> >--
> >Adam Wozniak (KG6GZR) COM DEV Broadband - Digital
> and Software Systems
> >awozniak@comdev.cc 805 Aerovista Place, San
> Luis Obispo, CA 93401
> > http://www.comdev.cc
> > Voice: (805) 544-1089
> Fax: (805) 544-2055
> >
> >
> >
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problems with shared memory
2002-03-07 12:53 ` Wolfgang Grandegger
2002-03-07 14:47 ` somshekar kadam
@ 2002-03-07 16:32 ` Adam Wozniak
2002-03-08 14:06 ` Wolfgang Grandegger
1 sibling, 1 reply; 8+ messages in thread
From: Adam Wozniak @ 2002-03-07 16:32 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
On Thu, 7 Mar 2002, Wolfgang Grandegger wrote:
> David Ashley has reported lately a bug in arch/ppc/mm/ppc_mmu.c (see
> http://lists.linuxppc.org/linuxppc-embedded/200202/msg00307.html),
> which seems to be present in the linuxppc_2_4 tree but not in the
> linuxppc_2_4_devel tree.
>
> Hope it helps,
Thanks so much. I think that fixed it. 10000+ iterations without problem.
--Adam
--
Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problems with shared memory
2002-03-07 16:32 ` Adam Wozniak
@ 2002-03-08 14:06 ` Wolfgang Grandegger
2002-03-14 14:44 ` Adam Wozniak
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Grandegger @ 2002-03-08 14:06 UTC (permalink / raw)
To: Adam Wozniak; +Cc: linuxppc-embedded
Adam Wozniak wrote:
>On Thu, 7 Mar 2002, Wolfgang Grandegger wrote:
>> David Ashley has reported lately a bug in arch/ppc/mm/ppc_mmu.c (see
>> http://lists.linuxppc.org/linuxppc-embedded/200202/msg00307.html),
>> which seems to be present in the linuxppc_2_4 tree but not in the
>> linuxppc_2_4_devel tree.
>>
>> Hope it helps,
>
>Thanks so much. I think that fixed it. 10000+ iterations without problem.
>
The real thank goes to David who found it.
Well, for me the linuxppc_2_4 tree seems to be less up-to-date. It would
be nice if somebody could give a brief status or even recommandation
on the various trees (linuxppc_2_4, linuxppc_2_4_devel, linuxppc_2_5)
including their future ... or point me to a list where it's already
dicussed.
Thanks,
Wolfgang.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problems with shared memory
2002-03-08 14:06 ` Wolfgang Grandegger
@ 2002-03-14 14:44 ` Adam Wozniak
0 siblings, 0 replies; 8+ messages in thread
From: Adam Wozniak @ 2002-03-14 14:44 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
On Fri, 8 Mar 2002, Wolfgang Grandegger wrote:
> Adam Wozniak wrote:
> >Thanks so much. I think that fixed it. 10000+ iterations without problem.
> The real thank goes to David who found it.
>
> Well, for me the linuxppc_2_4 tree seems to be less up-to-date. It would
> be nice if somebody could give a brief status or even recommandation
> on the various trees (linuxppc_2_4, linuxppc_2_4_devel, linuxppc_2_5)
> including their future ... or point me to a list where it's already
> dicussed.
I may have spoken too soon. That fixed this particular problem, but I've
got engineers in the field who still see the bad behavior, albeit far less
frequently. Are there any other bugfixes for the linuxppc_2_4 kernel mm
out there?
I've tried looking at the linuxppc_2_4_devel tree for changes, but there
seem to be a lot for the mm, and these changes ripple out to other parts
of the code; I can't just grab a file here and there, the changes start
to be too much.
--Adam
--
Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-03-14 14:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-06 0:37 problems with shared memory Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
2002-03-07 12:53 ` Wolfgang Grandegger
2002-03-07 14:47 ` somshekar kadam
2002-03-07 16:32 ` Adam Wozniak
2002-03-08 14:06 ` Wolfgang Grandegger
2002-03-14 14:44 ` Adam Wozniak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).