| Summary: | mmap(...) failed in UME with large static buffer in a C program | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Timo Lindfors <timo.lindfors> |
| Component: | general | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | njn |
| Priority: | NOR | Keywords: | investigated, triaged |
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Patch to report the error when a UME mmap fails
Report extra info when mmap fails in UME |
||
|
Description
Timo Lindfors
2006-05-11 20:49:27 UTC
Created attachment 16202 [details]
Patch to report the error when a UME mmap fails
Can you either try this with the current SVN code (revision 5911 or later) or
with 3.1.1 with this patch applied. That should change the error message to
include the error code. Running it with -d will also help to diagnose the
problem.
root@winxp ~/valgrind # valgrind -d /usr/bin/squidclamav --4106:1:debuglog DebugLog system started by Stage 1, level 1 logging requested --4106:1:launcher no tool requested, defaulting to 'memcheck' --4106:1:launcher selected platform 'x86-linux' --4106:1:launcher launching /usr/lib/valgrind/x86-linux/memcheck --4106:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested --4106:1:main Welcome to Valgrind version 3.3.0.SVN debug logging --4106:1:main Checking current stack is plausible --4106:1:main Checking initial stack was noted --4106:1:main Starting the address space manager --4106:1:main Address space manager is running --4106:1:main Starting the dynamic memory manager --4106:1:mallocfr newSuperblock at 0x61F90000 (pszB 1048560) owner VALGRIND/tool --4106:1:main Dynamic memory manager is running --4106:1:main Getting stage1's name --4106:1:main Get hardware capabilities ... --4106:1:main ... arch = X86, hwcaps = x86-sse1-sse2 --4106:1:main Split up command line --4106:1:main Preprocess command line opts --4106:1:main Loading client valgrind: mmap(0x0, 24576) failed in UME with error 22. gcc version 4.1.1 GNU C Library development release version 2.4, by Roland McGrath et al. Compiled by GNU CC version 4.1.1. Compiled on a Linux 2.6.17 system on 2006-08-31. Created attachment 17988 [details]
Report extra info when mmap fails in UME
Your problem looks like it might be slightly different, but either way this
patch should tell us a bit more - if you could apply it and post the results
that would be helpful.
root@winxp ~/valgrind # valgrind -d /bin/true --8132:1:debuglog DebugLog system started by Stage 1, level 1 logging requested --8132:1:launcher no tool requested, defaulting to 'memcheck' --8132:1:launcher selected platform 'x86-linux' --8132:1:launcher launching /usr/lib/valgrind/x86-linux/memcheck --8132:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested --8132:1:main Welcome to Valgrind version 3.3.0.SVN debug logging --8132:1:main Checking current stack is plausible --8132:1:main Checking initial stack was noted --8132:1:main Starting the address space manager --8132:1:main Address space manager is running --8132:1:main Starting the dynamic memory manager --8132:1:mallocfr newSuperblock at 0x61CB5000 (pszB 1048560) owner VALGRIND/tool --8132:1:main Dynamic memory manager is running --8132:1:main Getting stage1's name --8132:1:main Get hardware capabilities ... --8132:1:main ... arch = X86, hwcaps = x86-sse1-sse2 --8132:1:main Split up command line --8132:1:main Preprocess command line opts --8132:1:main Loading client --8132:0:ume mmap_file_fixed_client #1 --8132:0:aspacem <<< SHOW_SEGMENTS: after #1 (12 segments, 1 segnames) --8132:0:aspacem ( 0) /usr/lib/valgrind/x86-linux/memcheck --8132:0:aspacem 0: FILE 0000000000-000016EFFF 1503232 r-x-- d=0x803 i=653148 o=0 (0) --8132:0:aspacem 1: FILE 000016F000-0000171FFF 12288 rw--- d=0x803 i=653148 o=1503232 (0) --8132:0:aspacem 2: ANON 0000172000-0000C1EFFF 10m rw--- --8132:0:aspacem 3: RSVN 0000C1F000-0003FFFFFF 51m ----- SmFixed --8132:0:aspacem 4: 0004000000-0061CB3FFF 1500m --8132:0:aspacem 5: RSVN 0061CB4000-0061CB4FFF 4096 ----- SmFixed --8132:0:aspacem 6: ANON 0061CB5000-0061DB4FFF 1048576 rwx-- --8132:0:aspacem 7: 0061DB5000-00BF953FFF 1499m --8132:0:aspacem 8: ANON 00BF954000-00BF968FFF 86016 rw--- --8132:0:aspacem 9: RSVN 00BF969000-00FFFFDFFF 1030m ----- SmFixed --8132:0:aspacem 10: ANON 00FFFFE000-00FFFFEFFF 4096 ----- --8132:0:aspacem 11: RSVN 00FFFFF000-00FFFFFFFF 4096 ----- SmFixed --8132:0:aspacem >>> valgrind: mmap(0x0, 16384) failed in UME with error 22. I'm closing crashing and similar bugs that are more than two years old. If you still see this problem with Valgrind 3.4.1 please reopen the bug report. Thanks. Thanks, the bug does not occur with 3.4.1 that is in debian unstable on amd64. $ valgrind ./testcase ==30338== Memcheck, a memory error detector. ==30338== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. ==30338== Using LibVEX rev 1884, a library for dynamic binary translation. ==30338== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. ==30338== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework. ==30338== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. ==30338== For more details, rerun with: -v ==30338== Hello world!==30338== ==30338== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 8 from 1) ==30338== malloc/free: in use at exit: 0 bytes in 0 blocks. ==30338== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==30338== For counts of detected errors, rerun with: -v ==30338== All heap blocks were freed -- no leaks are possible. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |