Messages in this thread | | | Date | Fri, 25 Jun 2004 22:47:02 +0200 | Subject | Re: 2.6.7-mm2, mmaps rework, buggy apps, setarch | From | Norbert Preining <> |
| |
Hi Arjan!
On Fre, 25 Jun 2004, Arjan van de Ven wrote: > > open("/media4/scan/cam-2002.03/001-100/raw/scan0100.tif", O_RDONLY) = 6 > > lseek(6, 0, SEEK_END) = 43426634 > > lseek(6, 0, SEEK_CUR) = 43426634 > > lseek(6, 0, SEEK_SET) = 0 > > mmap2(NULL, 43426634, PROT_READ|PROT_WRITE, MAP_PRIVATE, 6, 0) = -1 ENOMEM (Cann > > ot allocate memory) > > interesting. > > Could you start the binary in gdb, and then when the segfault happens, take > a snapshot of /proc/<pid>/maps of this binary ?
Attached is gdb.maps and vuescan.maps, the former is the /proc/<pid>/maps for the gdb process, the later for the vuescan which has been started from within gdb.
> can you also mail me the output of ulimit -a ?
core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 6143 virtual memory (kbytes, -v) unlimited
On Fre, 25 Jun 2004, Arjan van de Ven wrote: > if you remove the following 3 lines from mm/mmap.c > + /* make sure it can fit in the remaining address space */ > + if (mm->free_area_cache < len) > + return -ENOMEM; > does it work ? > (those lines do an optimisation that I suspect is backfiring here...)
No.
I included Ed in the Cc: to keep him uptodate:
On Fre, 25 Jun 2004, EdHamrick@aol.com wrote: > > int ptr; > > ptr = malloc(some_size); > > if (ptr <= 0) > > handle_no_memory(); > > No, I never do this. I only check for NULL or non-NULL, which is correct.
Best wishes
Norbert
------------------------------------------------------------------------------- Norbert Preining <preining AT logic DOT at> Technische Universität Wien gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------------- SKELLOW (adj.) Descriptive of the satisfaction experienced when looking at a really good dry-stone wall. --- Douglas Adams, The Meaning of Liff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |