* Re: mlockall() still causes 100 % oops in 2.0.27 [not found] <ionut@moisil.wal.rhno.columbia.edu> @ 1996-12-03 12:51 ` Zarmfab Software Development 1996-12-03 21:17 ` Thomas Bogendoerfer 0 siblings, 1 reply; 5+ messages in thread From: Zarmfab Software Development @ 1996-12-03 12:51 UTC (permalink / raw) On Dec 1, 6:57pm, Ion Badulescu wrote: > Could you please pipe the oops through ksymoops and post the results here? > It might give somebody a clue about the pointer... maybe it's easier to produce the oops: this is the source, compileable under redhat-4.0. It would be interesting to me if somebody is able to run the program without oopsing, and under which kernel-version. #include <unistd.h> #include <string.h> #include <stdio.h> #include <sys/resource.h> #include <sys/mman.h> #include <asm/unistd.h> #ifdef __alpha #define _syscall1(type,name,type1,arg1) \ type name(type1 arg1) \ { \ return syscall(__NR_##name, arg1); \ } _syscall1(int,mlockall,int,flags); #endif int main(int argc,char *argv[]) { if (mlockall( MCL_CURRENT )) perror("mlockall"); return 0; } -- Martin Cornelius, ZARMFAB software development, University of Bremen phone: 49-421-218-4807 FAX: 49-421-218-3889 email: fabsoft@zarm.uni-bremen.de paper-mail: Hochschulring / Am Fallturm, 28359 BREMEN, Germany -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mlockall() still causes 100 % oops in 2.0.27 1996-12-03 12:51 ` mlockall() still causes 100 % oops in 2.0.27 Zarmfab Software Development @ 1996-12-03 21:17 ` Thomas Bogendoerfer 1996-12-04 7:06 ` Richard Henderson 0 siblings, 1 reply; 5+ messages in thread From: Thomas Bogendoerfer @ 1996-12-03 21:17 UTC (permalink / raw) > maybe it's easier to produce the oops: this is the source, compileable > under redhat-4.0. ok, I run your program with 2.0.26, it generates following oops: Dec 3 21:37:34 alpha kernel: Unable to handle kernel paging request at virtual address 0000015555720000 Dec 3 21:37:34 alpha kernel: test-panic(1166): Oops 0 Dec 3 21:37:34 alpha kernel: pc = [<fffffc000032fc40>] ps = 0000 Dec 3 21:37:34 alpha kernel: rp = [<fffffc0000330050>] sp = fffffc0000b33ea0 Dec 3 21:37:34 alpha kernel: r0=0 r1=1 r2=93 r3=ffffffffffffffd7 Dec 3 21:37:34 alpha kernel: r8=300000000 Dec 3 21:37:34 alpha kernel: r16=fffffc0000dbc628 r17=15555720000 r18=155557720 00 r19=2070 Dec 3 21:37:34 alpha kernel: r20=0 r21=0 r22=8 r23=155556f7f9c Dec 3 21:37:34 alpha kernel: r24=fffffc00003116a8 r25=107 r26=fffffc0000330050 r27=fffffc00003300b0 Dec 3 21:37:34 alpha kernel: r28=1 r29=fffffc0000465c88 r30=fffffc0000b33ea0 Dec 3 21:37:34 alpha kernel: Code: 47ff041f 47ff041f 47ff041f <2c2d0000> 482d 00c1 48271721 48271781 21ad2000 41ae03a1 The faulting code is: 0xfffffc000032fc40 <mlock_fixup..ng+1496>: 2c2d0000 ldq_u t0,0(s4) 0xfffffc000032fc44 <mlock_fixup..ng+1500>: 482d00c1 extbl t0,s4,t0 0xfffffc000032fc48 <mlock_fixup..ng+1504>: 48271721 sll t0,0x38,t0 0xfffffc000032fc4c <mlock_fixup..ng+1508>: 48271781 sra t0,0x38,t0 0xfffffc000032fc50 <mlock_fixup..ng+1512>: 21ad2000 lda s4,8192(s4) 0xfffffc000032fc54 <mlock_fixup..ng+1516>: 41ae03a1 cmpult s4,s5,t0 0xfffffc000032fc58 <mlock_fixup..ng+1520>: f43ffff9 bne t0,0xfffffc000032fc40 <mlock_fixup..ng+1496> 0xfffffc000032fc5c <mlock_fixup..ng+1524>: a75e0000 ldq ra,0(sp) 0xfffffc000032fc60 <mlock_fixup..ng+1528>: a53e0008 ldq s0,8(sp) Which in C looks like (this is in mm/mlock.c line 128): while (start < end) { char c = get_user((char *) start); __asm__ __volatile__("": :"r" (c)); start += PAGE_SIZE; } The memory map of the faulting program looks like: alpha:/proc/340# cat maps 000000011fffe000-0000000120000000 rwxp 0000000000000000 00:00 0 0000000120000000-0000000120002000 r-xp 0000000000000000 08:05 18392 0000000120100000-0000000120102000 rwxp 0000000000000000 08:05 18392 0000015555556000-0000015555570000 r-xp 0000000000000000 08:01 19432 0000015555570000-0000015555572000 r--p 0000000000000000 08:01 15467 000001555566e000-0000015555672000 rwxp 0000000000018000 08:01 19432 0000015555672000-0000015555720000 r-xp 0000000000000000 08:01 19433 0000015555720000-0000015555772000 ---p 00000000000ae000 08:01 19433 0000015555772000-0000015555828000 rwxp 0000000000000000 08:01 19433 0000015555828000-0000015555860000 rwxp 0000000000000000 00:00 0 alpha:/proc/340# ls -i /lib | grep 19433 19433 libc-1.93.so* Hope this helps someone. Thomas. PS: Linking the program with -static, doesn't produce a oops, so it seems related to shared libraries. -- See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too ;-) [Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>] -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mlockall() still causes 100 % oops in 2.0.27 1996-12-03 21:17 ` Thomas Bogendoerfer @ 1996-12-04 7:06 ` Richard Henderson 0 siblings, 0 replies; 5+ messages in thread From: Richard Henderson @ 1996-12-04 7:06 UTC (permalink / raw) > Unable to handle kernel paging request at virtual address 0000015555720000 > [...] > 0000015555720000-0000015555772000 ---p 00000000000ae000 08:01 19433 > [...] > Hope this helps someone. Indeed it does. The appended is not what I would have called the ideal fix, as it doesn't do the right thing for vmas that are, e.g., exec only, but it does keep the kernel from crashing. It would be cleaner imho, though slower, to make a call into some other part of the mm directly that would assert that a given page is present. r~ --- mlock.c.orig Wed Dec 4 00:55:53 1996 +++ mlock.c Wed Dec 4 01:05:37 1996 @@ -124,10 +124,10 @@ static int mlock_fixup(struct vm_area_st pages = -pages; vma->vm_mm->locked_vm += pages; - if (newflags & VM_LOCKED) + if ((newflags & (VM_LOCKED|VM_READ)) == (VM_LOCKED|VM_READ)) while (start < end) { - char c; - get_user(c,(char *) start); + int c; + get_user(c,(int *) start); __asm__ __volatile__("": :"r" (c)); start += PAGE_SIZE; } -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <199612012241.XAA21773@fabsoft2.zarm.uni-bremen.de>]
* Re: mlockall() still causes 100 % oops in 2.0.27 [not found] <199612012241.XAA21773@fabsoft2.zarm.uni-bremen.de> @ 1996-12-01 23:57 ` Ion Badulescu 0 siblings, 0 replies; 5+ messages in thread From: Ion Badulescu @ 1996-12-01 23:57 UTC (permalink / raw) On Sun, 1 Dec 1996, Zarmfab Software Development wrote: > has anybody else noticed that mlockall() causes a 100 % > reproduceable oops at alpha-systems running 2.0.27 ?? > The same happened with 2.0.26, at i386 the call seems > to work. The oops happens in line 129 of mlock.c : > char c=get_user((char *)start); Hmm.. it looks like a bad user-space pointer (and this is 2.0.x, so the smart exceptions handling does not protect us).. How a bad pointer can get there is a totally different question. The only difference between alpha and i386 is the get_user macro, which looks fine to me (unless gcc is doing something really stupid). Could you please pipe the oops through ksymoops and post the results here? It might give somebody a clue about the pointer... > i'd really like to work on a fix, but don't even > understand the __asm__ directive some lines down, sorry. The __asm__ directive immediately after get_user only forces gcc to generate code for get_user (which in turn touches each page between start and end to make sure it's not paged out). If you remove it, gcc will complain about "unused variable `c'" or something like that and will not do anything inside the loop, except for start += PAGE_SIZE. Ionut -- It is better to keep your mouth shut and be thought a fool, than to open it and remove all doubt. -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* mlockall() still causes 100 % oops in 2.0.27 @ 1996-12-01 22:41 Zarmfab Software Development 0 siblings, 0 replies; 5+ messages in thread From: Zarmfab Software Development @ 1996-12-01 22:41 UTC (permalink / raw) has anybody else noticed that mlockall() causes a 100 % reproduceable oops at alpha-systems running 2.0.27 ?? The same happened with 2.0.26, at i386 the call seems to work. The oops happens in line 129 of mlock.c : char c=get_user((char *)start); i'd really like to work on a fix, but don't even understand the __asm__ directive some lines down, sorry. -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1996-12-04 7:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ionut@moisil.wal.rhno.columbia.edu>
1996-12-03 12:51 ` mlockall() still causes 100 % oops in 2.0.27 Zarmfab Software Development
1996-12-03 21:17 ` Thomas Bogendoerfer
1996-12-04 7:06 ` Richard Henderson
[not found] <199612012241.XAA21773@fabsoft2.zarm.uni-bremen.de>
1996-12-01 23:57 ` Ion Badulescu
1996-12-01 22:41 Zarmfab Software Development
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox