|
From: daniel.janzon <dan...@ed...> - 2012-07-16 18:30:49
|
Hi guys, I get a lot of ==8186== Warning: invalid file descriptor 1019 in syscall open() and similar with other systen calls (accept & socket). It is always descriptor number 1019, on each run. It seems to be something with Valgrind. I ran strace and it seems like my program never uses 1019, all output is Valgrind-related. This guy seems to have had the same issue: http://old.nabble.com/Valgrind-and-error-1019-td20604591.html But his solution doesn't work for me. Anyone has any suggestions what to do? All the best, Daniel |
|
From: Florian K. <br...@ac...> - 2012-07-18 01:22:20
|
On 07/16/2012 02:14 PM, daniel.janzon wrote: > Hi guys, > > I get a lot of > > ==8186== Warning: invalid file descriptor 1019 in syscall open() > That message is issued if the file descriptor exceeds the limit that is allowed for the process. On my Ubuntu 12.something uname -a tells me I can use 1024 file descriptors. Valgrind reserves 10 for itself. So 1019 would be off limits on my system. If this applies to you: increase the limit, does it help? If not: Run valgrind with --trace-children=yes --trace-syscalls=yes --track-ids=yes That should shed some light. Search for sys_open (or similar) and look at the next line. It contains the file descriptor in *hex*. If that invalid file descriptor does not show up, then I'm afraid only a gdb session on valgrind will help. Florian |
|
From: Tom H. <to...@co...> - 2012-07-18 09:25:47
|
On 18/07/12 10:03, dan...@ed... wrote: > Thanks, running "ulimit -n 100000" seems to fix my problem. It's strange > though since the program under test sets its own limit RLIMIT_NOFILE with > setrlimit(). Does it check the return value? I suspect it doesn't ;-) To explain, because valgrind reserves some file descriptors for itself at the top end of the range it also refuses attempts to change the limit because to do so it would have to move it's own descriptors. So you should find that the setrlimit call returns EPERM if you try and change the hard limit when under valgrind. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: <Rah...@co...> - 2012-07-18 09:45:51
|
unsub Best Regards Rahul Singh Continental Automotive Singapore Pte Ltd 3 Kallang Sector, #04-05 Singapore 349278 DID : (65) 6848 6548 Email:rah...@co... http://www.continental-corporation.com From: Tom Hughes <to...@co...> To: dan...@ed... Cc: val...@li... Date: 07/18/2012 05:28 PM Subject: Re: [Valgrind-users] Invalid file descriptor 1019 On 18/07/12 10:03, dan...@ed... wrote: > Thanks, running "ulimit -n 100000" seems to fix my problem. It's strange > though since the program under test sets its own limit RLIMIT_NOFILE with > setrlimit(). Does it check the return value? I suspect it doesn't ;-) To explain, because valgrind reserves some file descriptors for itself at the top end of the range it also refuses attempts to change the limit because to do so it would have to move it's own descriptors. So you should find that the setrlimit call returns EPERM if you try and change the hard limit when under valgrind. Tom -- Tom Hughes (to...@co...) http://compton.nu/ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: <dan...@ed...> - 2012-07-18 09:03:24
|
Thanks, running "ulimit -n 100000" seems to fix my problem. It's strange though since the program under test sets its own limit RLIMIT_NOFILE with setrlimit(). Regards, Daniel > On 07/16/2012 02:14 PM, daniel.janzon wrote: >> Hi guys, >> >> I get a lot of >> >> ==8186== Warning: invalid file descriptor 1019 in syscall open() >> > > That message is issued if the file descriptor exceeds the limit that is > allowed for the process. On my Ubuntu 12.something uname -a tells me I > can use 1024 file descriptors. Valgrind reserves 10 for itself. So 1019 > would be off limits on my system. > If this applies to you: increase the limit, does it help? > If not: > > Run valgrind with > --trace-children=yes --trace-syscalls=yes --track-ids=yes > > That should shed some light. Search for sys_open (or similar) and look > at the next line. It contains the file descriptor in *hex*. > If that invalid file descriptor does not show up, then I'm afraid only a > gdb session on valgrind will help. > > Florian > |