Changes by Charles-François Natali :
--
resolution: -> duplicate
status: open -> closed
superseder: -> io.FileIO and io.open should support openat
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
> This does not seem to work.
Yes, the proposed fix is buggy: the solution is to drain the output
buffer, guarding against recursive calls between send() and
handle_close() (patch attached).
> Note that after the first 'handle_close'
Charles-François Natali added the comment:
Here's the error message:
"""
error: File not found:
/tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc
error: File not found:
/tmp/tmpsga9lh/foo/build/bdist.linu
Charles-François Natali added the comment:
Another problem with the POSIX realpath(3): it can fail with ENOENT if the
target path doesn't exist, whereas the current Python implementation "succeeds"
even if a component in the path doesn't exist.
Note the quotes around &qu
Charles-François Natali added the comment:
> The attached patch uses another name
In that case, you should use a name starting with an underscore
("private" namespace).
> and drains the output buffer only on a close event, not on error conditions.
Hmmm...
I don't think
Charles-François Natali added the comment:
> While writing the test case, I found out that the test case does not
> fail before the patch. It seems that draining the output buffer
> already works:
>
> The attached script 'asyncore_shutdown.py' drains the output buff
Charles-François Natali added the comment:
2096158376e5 broke test_xmlrpc:
"""
==
ERROR: test_datetime_before_1900 (test.test_xmlrpc
Charles-François Natali added the comment:
There's a race in _write_atomic():
"""
# On POSIX-like platforms, renaming is atomic
path_tmp = path + '.tmp'
try:
fd = _os.open(path_tmp, _os.O_EXCL | _os.O_CREAT | _os.O_WRONLY)
Charles-François Natali added the comment:
Patch attached.
--
keywords: +patch
Added file: http://bugs.python.org/file23568/import_atomic_race.diff
___
Python tracker
<http://bugs.python.org/issue13
Charles-François Natali added the comment:
Then we won't write the bytecode any more.
But it will be consistent.
The solution would be to create a random temporary file (with e.g. mkstemp()):
in case of crash, we'll let dangling temporary files, but we'll be able to
update th
Charles-François Natali added the comment:
Here's a patch using pseudo-random filenames.
I used id(path) to generate a random name: it's faster than getpid(), and
doesn't pollute strace's output (I'm one of strace's biggest fan :-).
--
Added file: ht
Charles-François Natali added the comment:
> Is anybody activelly working on this?.
I don't think so.
> Should I get involved?
Sure, if you have access to a machine on which you can reliably reproduce the
problem, it'll be much easier. I would bet on a deficient name res
Charles-François Natali added the comment:
> (it does sound a bit overkill to me :-))
Well, it depends on what we want:
- if having a stale bytecode file indefinitely is acceptable, then the '.tmp'
suffix approach is OK
- if not, then we should use pseudo-random files
> If
Charles-François Natali added the comment:
Here's a patch for Python/import.c using mkstemp(3). AFAICT, mkstemp should
always be available (on Unix of course).
--
Added file: http://bugs.python.org/file23572/import_atomic_race-2.diff
___
P
Charles-François Natali added the comment:
> Is "an open file descriptor" correct in English? I'd have written "an
> opened file descriptor" instead (in 5 places).
"open" is correct.
For example, you say "the store is open", not "the st
Charles-François Natali added the comment:
> Why it is closed as duplicate? nothing said about CLOEXEC in issue12797
See http://bugs.python.org/issue12760#msg146686
--
___
Python tracker
<http://bugs.python.org/issu
New submission from Charles-François Natali :
Here's a patch fixing test_httpservers failures when run as root (a couple
buildbots are consistently failing on this, e.g.
http://python.org/dev/buildbot/all/builders/x86 FreeBSD 7.2
3.x/builds/2282/steps/test/logs/stdio).
The test is failin
Charles-François Natali added the comment:
Please provide more information, because this looks really strange...
--
nosy: +neologix
stage: -> test needed
status: open -> pending
___
Python tracker
<http://bugs.python.org/i
Changes by Charles-François Natali :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
The first problem is a duplicate of issue #6056.
As for the second problem, no, it doesn't limit the number of concurrent
connections. Server.serve_forever() creates a new thread for each new incoming
connection.
Closing as dupl
Charles-François Natali added the comment:
Here's a patch adding support for RDS sockets (with test and documentation
update).
--
keywords: +needs review, patch
nosy: +haypo, neologix, pitrou
stage: needs patch -> patch review
versions: +Python 3.3 -Python 2.7, Python 3.2
Ad
Charles-François Natali added the comment:
Hello Xavier,
> select (an poll) returns a read event and an exceptional condition
> for the socket, but there is no normal data to read, only out-of-band
> data.
That's against POSIX:
"""
POLLIN
Data other than h
Charles-François Natali added the comment:
> - the tests are skipped with "unable to bind RDS socket" here (even
> under root). Is it expected?
Oops. I did a quick test to force the socket family (because RDS sockets really
use sockaddr_in), and apparently I overwrote m
Charles-François Natali added the comment:
> It is not clear why recv() can return EAGAIN because we're trying to
> _send_ a packet ;-)
Well, I was refering to a problem with the current implementation, not
limited to this specific example.
>> Closing as invalid
>
&g
Charles-François Natali added the comment:
mkstemp() creates the file with mode 0600, which can be surprising.
I'm note sure about the best way to handle this:
1) change the file mode after creating it with fchmod(), using the source file
mode. But we must also take into account the umas
Charles-François Natali added the comment:
I've done a review of your patch (looks like Rietveld doesn't send emails).
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.pytho
Charles-François Natali added the comment:
> With this patch in place the inactive memory on my system stays (low)
> and flat, without it it rises until it maxes out all available memory
> and then starts paging.
It's often a desired behaviour: paging out unused memory makes room
Changes by Charles-François Natali :
--
type: behavior -> feature request
___
Python tracker
<http://bugs.python.org/issue13324>
___
___
Python-bugs-list mai
Charles-François Natali added the comment:
>> Could it return an opaque wrapper object, rather than just the raw
>> address? Something like:
>
> Are you suggesting that it would return either a Python function object or a
> wrapper object?
I think it would be an ugly klu
Charles-François Natali added the comment:
> So Python starts by removing the .tmp file, but it fails if another
> process is already writing into the .tmp file. In this case, we do
> nothing, which is not a problem: the other process will create the
> file.
unlink() does not f
Charles-François Natali added the comment:
> You should change "issue #" with the real issue number now that
> there's an issue for this :)
Done :-)
--
resolution: -> fixed
stage: patch review -> committed/reje
Charles-François Natali added the comment:
> The attached patch adds a call to recv in handle_read, updates the
> documentation and adds a test case.
In this kind of situation, it is perfectly legitimate for the client to perform
a half-duplex close (shutdown(SHUT_WR)), since it do
Charles-François Natali added the comment:
> The reason is that when TestHandler closes the connection after
> writing the output buffer, the client receives a POLLHUP which
> prevents it to receive the data since POLLHUP is triggering a call to
> handle_close.
Yes, that'
Charles-François Natali added the comment:
Here's a patch using the '.tmp' suffix.
I also updated test_import.
Note that the current test_import.test_execute_bit_not_copied is a no-op:
"""
fname = TESTFN + os.extsep + "py"
Charles-François Natali added the comment:
> I explain a reliable method to reproduce this issue on Linux
It's a way to reproduce the symptom (i.e. connection refused because you're
trying to connect to 127.0.0.2 while the server is listening on 127.0.0.1), but
not the cause:
Charles-François Natali added the comment:
> This is a hairy issue
Indeed.
Performing partial read/write may sound imperfect, but using buffered I/O
around non-blockind FD is definitely not a good idea.
Also, the advantage of the current approach is that at least, no data is ever
lost (
Charles-François Natali added the comment:
> Apparently, they are specified to, even for blocking streams (which
> I find a bit weird, and the language in the docs seems deliberately
> vague).
"""
As an additional convenience, it attempts to read as many bytes as
Charles-François Natali added the comment:
> Since this patch may break existing valid code, I think it should be
> closed as invalid.
Yes. Since the benefit is not clear and it may break existing code, it's
probably wiser.
--
resolution: -> rejected
stage: patch revie
Charles-François Natali added the comment:
> But then what's the point of using buffered I/O at all? If it can't
> offer anything more than raw I/O, I'd rather do something like raise
> a RuntimeError("buffered I/O doesn't work with non-blocking streams&qu
Charles-François Natali added the comment:
> The bugfix itself is quite pedestrian, but the test is more interesting.
Indeed. Looks good to me.
--
___
Python tracker
<http://bugs.python.org/issu
Charles-François Natali added the comment:
There's a race:
"""
--- Lib/shutil.py 2011-11-05 00:11:05.745221315 +0100
+++ Lib/shutil.py.new 2011-11-05 00:11:01.445220324 +0100
@@ -307,6 +307,7 @@
try:
mode = os.fstatat(dirfd, name, os.AT_SYMLI
Charles-François Natali added the comment:
> write() is a bit simpler, since BlockingIOError has
> a "characters_written" attribute which is meant to inform you of the
> partial success: we can just reuse that. That said, BlockingIOError
> could grow a "partial_rea
Charles-François Natali added the comment:
So, what do you think of the new patch?
--
___
Python tracker
<http://bugs.python.org/issue>
___
___
Python-bug
Charles-François Natali added the comment:
The patch looks good to me.
Note that the whole kill(pid, SIGKILL) looks overkill to me...
--
nosy: +neologix
___
Python tracker
<http://bugs.python.org/issue12
Charles-François Natali added the comment:
> FYI, I have a pathlib experiment in
> http://hg.python.org/features/pathlib/, with an optional openat-based
> accessor.
Interesting: I used to think that the current API for dealing with paths was a
little too basic and terse.
Concer
Charles-François Natali added the comment:
Here's an updated patch:
- address returned by recvfrom()
- recv flags (MSG_PEEK)
- congestion behavior
I've also added a bunch of constants:
- all the typical SO_ constants
- CMSG flags
- RDMA-related options (RDMA is probably one of the m
Charles-François Natali added the comment:
> The server thread only waits for 3 seconds for the connection. If a
> connection is not created before 3 seconds, the server suicides and when the
> connection is tried, it will fail. This probably explain why the problem is
> sporad
Changes by Charles-François Natali :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13303>
___
___
Pyth
Changes by Charles-François Natali :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Charles-François Natali added the comment:
> Together with -R, it can help chase those memory leaks which aren't
> reference leaks (see c6dafa2e2594).
Valgrind does a much better job at this: it will also show you where the leaked
blocks were allocated.
OTOH, Valgrind is Linux-on
Charles-François Natali added the comment:
Isn't this a duplicate of issue #1625?
--
nosy: +neologix
___
Python tracker
<http://bugs.python.org/is
Charles-François Natali added the comment:
Here's a patch removing the automatic retry on ECONNREFUSED: I tested it on
Linux and other Unices, and it seems to work just fine without this hammering.
Note that there's a similar mechanism for Windows (ERROR_PIPE_BUSY), but it
s
Charles-François Natali added the comment:
I'm not sure that the "register" storage class specifier is still relevant with
modern compilers: I'm pretty sure gcc ignores it unless -O0, and I think I've
read somewhere Microsoft's compiler ignores it to
Charles-François Natali added the comment:
> subprocess.Popen.communicate() hangs for daemonized subprocesses that
> leave a pipe open. [...] which leaves stderr pipe open.
Of course: the daemon process (spawned by the second fork()) inherits the
subprocess's stderr (since file
Charles-François Natali added the comment:
> Apparently you forgot to upload the patch...
Told you I couldn't think straight :-)
--
Added file: http://bugs.python.org/file23720/connection_retry.diff
___
Python tracker
<http://bugs
Charles-François Natali added the comment:
Alright, I got tired of seeing the FreeBSD buildbots consistently choke on
test_multiprocessing, so here's a simple patch that skips the test if the OS
doesn't support a reasonable number (30) of semaphores.
--
keywords: +patch
Charles-François Natali added the comment:
Benjamin, thanks for the report.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
> Testing os.sysconf("SC_SEM_NSEMS_MAX") value is maybe better than
> creating 30 semaphores.
Yeah, I thought about that, but the problem is that it doesn't take into
account the number of semaphores already allocated: so, for
Charles-François Natali added the comment:
There are now more protocol families defined (PF_RDS, PF_CAN), etc.
Since both AF_ and PF_ are valid (see
http://en.wikipedia.org/wiki/Berkeley_sockets#Protocol_and_address_families for
more information), and there is so much code out there in the
Charles-François Natali added the comment:
Alright, should be fixed now.
Graham, thanks for the report!
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
Alright, the test is now skipped when the system doesn't support enough POSIX
semaphores.
I'm closing, we can still reopen in case another similar problem pops up (on
other OS of course).
--
resolution: -> fixed
stage:
Charles-François Natali added the comment:
> Oh, it looks like unsetenv() has no return value on Mac OS X Tiger
And neither does FreeBSD < 7:
http://python.org/dev/buildbot/all/builders/x86%20FreeBSD%206.4%203.x/builds/2015/steps/compile/logs/stdio
Note that ignoring unsetenv() return
Changes by Charles-François Natali :
--
resolution: -> invalid
stage: test needed -> committed/rejected
status: pending -> closed
___
Python tracker
<http://bugs.python.or
Changes by Charles-François Natali :
--
keywords: +needs review
stage: -> patch review
Added file: http://bugs.python.org/file23764/broken_unsetenv.diff
___
Python tracker
<http://bugs.python.org/issu
Charles-François Natali added the comment:
> The problem I have with the solution that is currently implemented is that
> subprocess is waiting for the spawned child although the child is not running
> anymore.
> In my case this issue occured when invoking samba or the small s
Charles-François Natali added the comment:
> For the record, this seems to make large allocations slower:
>
> -> with patch:
> $ ./python -m timeit "b'x'*20"
> 1 loops, best of 3: 27.2 usec per loop
>
> -> without patch:
> $ ./python
Charles-François Natali added the comment:
> However, there's still another strange regression:
>
> $ ./python -m timeit \
> -s "n=30; f=open('10MB.bin', 'rb', buffering=0); b=bytearray(n)" \
> "f.seek(0);f.readinto(b)"
>
Charles-François Natali added the comment:
> Hmm, quite slow indeed, are you sure you're not running in debug mode?
>
Well, yes, but it's no faster with a non-debug build: my laptop is
really crawling :-)
> If the performance regression is limited to read(), I don'
Charles-François Natali added the comment:
_clocks = ['CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_MONOTONIC_RAW',
'CLOCK_MONOTONIC', 'CLOCK_REALTIME']
Beware, we're mixing CPU time and wall-clock time:
$ ./python -c "from time import *;
Charles-François Natali added the comment:
> Indeed. I thought CPU time would be more useful (and that's the point
> of the patch)
Ah, OK.
Then you should probably rename the issue "make timeit measure CPU time", or
something like that, because I really thought this is
Charles-François Natali added the comment:
(No Rietveld link):
+is_valid_fd(int fd)
[...]
+dummy_fd = dup(fd);
+if (dummy_fd < 0)
+return 0;
+close(dummy_fd);
Why not use fstat() instead (does Windows have fstat()? And dup()?).
+@unittest.skipIf(os.name == 'nt
Charles-François Natali added the comment:
> Updated patch.
>
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue7111>
___
___
Python-bugs-list
Charles-François Natali added the comment:
A 2.7 OS X buildbot segfaults in test_unicode since 0cd197f13400 :
http://www.python.org/dev/buildbot/all/builders/AMD64 Snow Leopard 2
2.7/builds/409/steps/test/logs/stdio
"""
test_unicode
make: *** [buildbottest] Segmentatio
Charles-François Natali added the comment:
> Are CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC and CLOCK_REALTIME more accurate
> than gettimeofday (time.time)?
Actually, on Linux gettimeofday() returns CLOCK_REALTIME.
As for CLOCK_MONOTONIC{_RAW}, they're guaranteed not to go backward
(N
Charles-François Natali added the comment:
> So I'm changing my mind and saying it seems desireable to return True if the
> wait succeeded before the timeout's end, even though the flag may have been
> reset in the meantime.
Agreed. What matters is that the event has been
Charles-François Natali added the comment:
Could you please provide a diff ?
Also, they should probably be commented by default (as other obmalloc-related
calls).
--
nosy: +neologix
___
Python tracker
<http://bugs.python.org/issue12
Charles-François Natali added the comment:
> If someone finds a way to sanitize Valgrind output,
Did you use the valgrind suppression file (Misc/valgrind-python.supp)?
If yes, then one could simply use --gen-suppressions=yes to add those spurious
warning to the suppression file.
> a
Charles-François Natali added the comment:
> Is there any reason to believe that the problem is confined to OS X?
It's a bit of a grey area.
Here's what POSIX says:
http://pubs.opengroup.org/onlinepubs/009695399/functions/readdir.html
"""
The pointer returned
Charles-François Natali added the comment:
And here's a post by Ulrich Drepper:
http://udrepper.livejournal.com/18555.html
"""
readdir_r is only needed if multiple threads are using the same directory
stream. I have yet to see a program where this really is the case. In t
Charles-François Natali added the comment:
Committed, thanks for the patch!
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
Here's a trivial patch reducing the number of calls to open.
before:
"""
$ strace -c -e open ./python -c ""
% time seconds usecs/call callserrors syscall
-- --- --- - ---
Charles-François Natali added the comment:
It's a duplicate of #12157.
--
nosy: +neologix
resolution: -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder: -> join method of multiprocessing Pool object hangs if iterable
argume
Charles-François Natali added the comment:
> I would have appreciated had you considered my review before pushing
> that change.
Sorry, I didn't receive an email notification for your review, so I didn't know
you had done one. I&
Charles-François Natali added the comment:
Here's a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file23866/event_wait_cleared.diff
___
Python tracker
<http://bugs.python.org/issue13502>
Charles-François Natali added the comment:
> URLError: resolution>
For this one, we should probably add EAI_FAIL to support.transient_internet.
--
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file23867/transien
Charles-François Natali added the comment:
To debug this, we should probably make use of faulthandler (but not
dump_tracebacks_later, since it creates a new thread). The way to go
could be to make the parent process send a fatal signal to the child
process if the latter takes too long to
Charles-François Natali added the comment:
> This seems to imply that if the current thread previously set the event,
> the wait will return False, which is contradicted by the 'so' statement
> (which appears to be correct).
You're probably referring to the &q
Charles-François Natali added the comment:
> my computer has 122GB free RAM
122, or 1.22?
> Well, replace cPickle by pickle and it works.
cPickle makes some direct call to malloc()/realloc()/free(), contrarily to
pickle which uses pymalloc. This could lead to heap fragmentation.
Wha
Changes by Charles-François Natali :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue13453>
___
___
Python-bugs-list mailing list
Unsubscribe:
Charles-François Natali added the comment:
This paper might be of interest:
http://www.siam.org/meetings/alenex05/papers/13gheileman.pdf
Basically, it concludes that most of the time, there's no speedup to be gained
from the increased cached locality incurred by linear probing when the
Charles-François Natali added the comment:
Here's a patch to help nail this down.
--
Added file: http://bugs.python.org/file23896/debug_stuck.diff
___
Python tracker
<http://bugs.python.org/is
Charles-François Natali added the comment:
Thanks, here's a patch updated accordingly.
--
Added file: http://bugs.python.org/file23897/event_wait_cleared-1.diff
___
Python tracker
<http://bugs.python.org/is
Charles-François Natali added the comment:
The test_poplib failures are likely due to this obvious race:
"""
def setUp(self):
[...]
threading.Thread(target=self.server, args=(self.evt,self.sock)).start()
time.sleep(.1)
[...]
def server(
Charles-François Natali added the comment:
And I assume that the test_telnetlib failure on the OpenIndiana
buildbot is due to a broken name resolution service, as in issue
#11812.
Here's a patch bumping the timeout to 60s, which should be enough to
resolve "localhost"...
--
Charles-François Natali added the comment:
> Alan, I would open a new issue tracking this one and posting a patch there,
> if I were you.
>
> Previous DTRACE attempts failed because trying to make everybody happy. I
> don't want to repeat the mistake.
>
Sorry, b
Charles-François Natali added the comment:
@Antoine
Couldn't this be linked to #11564 (pickle not 64-bit ready)? AFAICT this wasn't
fixed in 2.7. Basically, an integer overflow, and malloc() would bail out when
asked a ridiculous size.
@Philipp
I'd be curious to see th
Charles-François Natali added the comment:
@Antoine
Couldn't this be linked to #11564 (pickle not 64-bit ready)? Basically, an
integer overflow, and malloc() would bail out when asked a ridiculous size.
AFAICT this wasn't fixed in 2.7.
@Philipp
I'd be curious to see th
Changes by Charles-François Natali :
--
Removed message: http://bugs.python.org/msg149321
___
Python tracker
<http://bugs.python.org/issue13555>
___
___
Python-bug
Charles-François Natali added the comment:
Thanks Craig.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
versions: -Python 3.1
___
Python tracker
<http://bugs.python.o
Charles-François Natali added the comment:
Another failure on a 2.7 FreeBSD buildbot:
"""
test test_time failed -- Traceback (most recent call last):
File
"/usr/home/db3l/buildarea/2.7.bolen-freebsd7/build/Lib/test/test_time.py", line
193, in test_tzset
self
101 - 200 of 1826 matches
Mail list logo