classification
Title: valgrind shows "invalid file descriptor" when calling platform.system() on my machine.
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Mathieu_Du, gregory.p.smith, skrah
Priority: normal Keywords:

Created on 2016-11-24 16:32 by Mathieu_Du, last changed 2017-11-12 18:32 by skrah.

Messages (3)
msg281640 - (view) Author: Mathieu Duponchelle (Mathieu_Du) Date: 2016-11-24 16:31
I'm using Fedora 23.

 meh  ~  1  valgrind python3 -c "import platform; print(platform.system())"
==10093== Memcheck, a memory error detector
==10093== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==10093== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==10093== Command: python3 -c import\ platform;\ print(platform.system())
==10093== 
==10094== Warning: invalid file descriptor 1024 in syscall close()
==10094== Warning: invalid file descriptor 1025 in syscall close()
==10094== Warning: invalid file descriptor 1026 in syscall close()
==10094== Warning: invalid file descriptor 1027 in syscall close()
==10094==    Use --log-fd=<number> to select an alternative log fd.
==10094== Warning: invalid file descriptor 1028 in syscall close()
==10094== Warning: invalid file descriptor 1029 in syscall close()
Linux
==10093== 
==10093== HEAP SUMMARY:
==10093==     in use at exit: 861,318 bytes in 5,903 blocks
==10093==   total heap usage: 71,738 allocs, 65,835 frees, 10,611,196 bytes allocated
==10093== 
==10093== LEAK SUMMARY:
==10093==    definitely lost: 0 bytes in 0 blocks
==10093==    indirectly lost: 0 bytes in 0 blocks
==10093==      possibly lost: 326,619 bytes in 1,420 blocks
==10093==    still reachable: 534,699 bytes in 4,483 blocks
==10093==         suppressed: 0 bytes in 0 blocks
==10093== Rerun with --leak-check=full to see details of leaked memory
==10093== 
==10093== For counts of detected and suppressed errors, rerun with: -v
==10093== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
 meh  ~  1  python3 --version
Python 3.4.3
 meh  ~  1  
msg306126 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-11-12 17:15
More info:

==22845== Warning: invalid file descriptor 1024 in syscall close()
==22845==    at 0x4E493F0: __close_nocancel (syscall-template.S:81)
==22845==    by 0xF0BAA74: _close_open_fds_safe (_posixsubprocess.c:297)
==22845==    by 0xF0BADF6: child_exec (_posixsubprocess.c:494)
==22845==    by 0xF0BB8B9: subprocess_fork_exec (_posixsubprocess.c:691)
==22845==    by 0x46D188: _PyMethodDef_RawFastCallKeywords (call.c:691)
==22845==    by 0x46D2AC: _PyCFunction_FastCallKeywords (call.c:726)
==22845==    by 0x5693CE: call_function (ceval.c:4663)
==22845==    by 0x563DFA: _PyEval_EvalFrameDefault (ceval.c:3149)
==22845==    by 0x5569EB: PyEval_EvalFrameEx (ceval.c:549)
==22845==    by 0x56758D: _PyEval_EvalCodeWithName (ceval.c:4011)
==22845==    by 0x46CA56: _PyFunction_FastCallKeywords (call.c:433)
==22845==    by 0x56979A: call_function (ceval.c:4702)
msg306129 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-11-12 18:32
Okay, it is probably this:

  https://bugs.kde.org/show_bug.cgi?id=331311


The question is whether we should add a suppression or a perhaps
a comment in _posixsubprocess.c
History
Date User Action Args
2017-11-12 18:32:11skrahsetnosy: + gregory.p.smith
messages: + msg306129
2017-11-12 17:15:50skrahsetmessages: + msg306126
2017-11-12 17:08:34skrahsetnosy: + skrah

type: behavior
stage: needs patch
2016-11-24 16:32:00Mathieu_Ducreate