|
From: Roland M. <rol...@nr...> - 2012-05-27 00:08:36
|
Does anyone know why valgrind goes berserk on such a simple shell builtin like ulimit? I tried a simple, plain, innocent ulimit -a within ksh (ksh93 from 20120504) and got this reply: ======================= valgrind ~/bin/ksh -c 'ulimit -a' ==29376== Memcheck, a memory error detector ==29376== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==29376== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==29376== Command: /home/danny/bin/ksh -c ulimit\ -a ==29376== valgrind: m_syswrap/syswrap-linux.c:3655 (vgSysWrap_linux_sys_fcntl_before): Assertion 'Unimplemented functionality' failed. valgrind: valgrind ==29376== at 0x3804CF26: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==29376== by 0x3804D0CC: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==29376== by 0x380A8D8A: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==29376== by 0x380881A7: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==29376== by 0x3808501C: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==29376== by 0x380861C9: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==29376== by 0x38095C54: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==29376== at 0x53586B8: do_fcntl (in /lib64/libc-2.14.1.so) ==29376== by 0x5358837: fcntl (in /lib64/libc-2.14.1.so) ==29376== by 0x5336724: pathconf (in /lib64/libc-2.14.1.so) ==29376== by 0x551D7C: print (astconf.c:1115) ==29376== by 0x553024: astgetconf (astconf.c:1477) ==29376== by 0x553654: astconf (astconf.c:1555) ==29376== by 0x4A9B41: b_ulimit (ulimit.c:201) ==29376== by 0x4815B6: sh_exec (xec.c:1367) ==29376== by 0x418956: exfile (main.c:600) ==29376== by 0x417B40: sh_main (main.c:373) ==29376== by 0x416C28: main (pmain.c:45) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks. ======================= Without valgrind the call to ulimit -a worked as I would expect it: ======================= ksh -c 'ulimit -a' address space limit (kbytes) (-M) unlimited core file size (blocks) (-c) unlimited cpu time (seconds) (-t) unlimited data size (kbytes) (-d) unlimited file size (blocks) (-f) unlimited locks (-x) unlimited locked address space (kbytes) (-l) 64 message queue size (kbytes) (-q) 800 nice (-e) 0 nofile (-n) 1024 nproc (-u) 5796 pipe buffer size (bytes) (-p) 4096 max memory size (kbytes) (-m) unlimited rtprio (-r) 0 socket buffer size (bytes) (-b) 4096 sigpend (-i) 5796 stack size (kbytes) (-s) 8192 swap size (kbytes) (-w) not supported threads (-T) not supported process size (kbytes) (-v) unlimited ======================= -- __ . . __ (o.\ \/ /.o) rol...@nr... \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) |