Roundup Robot added the comment:
New changeset c6c2b216bd14 by Charles-Francois Natali in branch '2.7':
Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
http://hg.python.org/cpython/rev/c6c2b216bd14
New changeset f6c50b437de6 by Charles-Francois Natali in branch
Charles-François Natali added the comment:
Sorry for the delay, it should be fixed now.
Federico, thanks for the patch!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Federico Schwindt added the comment:
Trent, would be possible to update the OpenBSD slaves to 5.3 (or -current)?
There has been too many changes since 5.1 that affect python (for example the
threads implementation).
--
___
Python tracker
Trent Nelson added the comment:
Yeah those slaves are definitely due for an update. It's on the list.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12181
___
Federico Schwindt added the comment:
Here's a slightly modified version of the patch that should work with python 2
and 3.
--
Added file: http://bugs.python.org/file29789/openbsd-kqueue-001.patch
___
Python tracker rep...@bugs.python.org
Trent Nelson added the comment:
On Tue, Apr 09, 2013 at 03:04:42AM -0700, Charles-Fran?ois Natali wrote:
Why are the OpenBSD buildbots down? Can we do anything about it?
Having a buildbot slave up will definitely help here.
All the OpenBSD buildbots we have are provided by SnakeByte, and
Changes by Charles-François Natali cf.nat...@gmail.com:
--
versions: +Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12181
___
Federico Schwindt added the comment:
Please note that the tests are still broken and need to be addressed (bignum
and sys.maxsize passed to ident and data respectively).
If you could fill a separate issue for that, it would be great.
I will but once this is committed. It'd make things
Charles-François Natali added the comment:
If you could fill a separate issue for that, it would be great.
I will but once this is committed. It'd make things easier.
No problem.
BTW, there are other OpenBSD-specific issues on the report, and we
don't have that many contributors (AFAICT
Federico Schwindt added the comment:
This patch was made against 2.7.4. I've checked 3.3.1 and it obviously doesn't
work as PyInt* are gone.
I'll update the patch later today so it can be used everywhere.
--
___
Python tracker
Federico Schwindt added the comment:
New version hopefully good and ready for inclusion.
Please note that the tests are still broken and need to be addressed (bignum
and sys.maxsize passed to ident and data respectively).
Thanks.
--
Added file:
Charles-François Natali added the comment:
New version hopefully good and ready for inclusion.
Looks good to me.
Since I assume you tested your patch on OpenBSD, to me it's ready for commit.
I won't be able to do it myself before two weeks though, so if someone
beats me to it, go ahead!
Remi Pointel pyt...@xiri.fr added the comment:
Hi,
this is the patch in OpenBSD.
Source:
http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.7/patches/patch-Modules_selectmodule_c
Could be usefull to work together and advance on this problem.
Thanks a lot.
Remi.
--
Added file:
Charles-François Natali neolo...@free.fr added the comment:
patch-Modules_selectmodule_c is not enough to fix kqueue_event_init(): it
doesn't catch overflow error on the ident attribute.
This patch is not correct.
Furthermore, it's another occurrence of something I don't understand
with
Federico Schwindt federico.schwi...@gmail.com added the comment:
I wrote the patch. While the patch fixes most of the issues I'm not entirely
happy with it and that's the reason I have not submitted it.
--
___
Python tracker rep...@bugs.python.org
Charles-François Natali neolo...@free.fr added the comment:
I wrote the patch. While the patch fixes most of the issues I'm not entirely
happy with it and that's the reason I have not submitted it.
Could you submit it here so that we can help you get it in shape for inclusion?
That way we'll
STINNER Victor victor.stin...@haypocalc.com added the comment:
select.kevent(bignum, 1, 2, 3, sys.maxsize, bignum) raises a
OverflowError('signed integer is greater than maximum') on a 64 bits system.
select.kevent() constructor parses the 4th argument using i (an int):
sys.maxsize doesn't
STINNER Victor victor.stin...@haypocalc.com added the comment:
OpenBSD has a patch for this issue:
http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.7/patches/patch-Modules_selectmodule_c
--
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
patch-Modules_selectmodule_c is not enough to fix kqueue_event_init(): it
doesn't catch overflow error on the ident attribute.
--
___
Python tracker rep...@bugs.python.org
Charles-François Natali neolo...@free.fr added the comment:
@neologix: New try. Why did you remove your patch?
Sorry, I completely forgot about this issue.
Because it was incorrect (it would have fixed the SIGBUS, but would
have produced incorrect results).
IIRC, the problem is that those
STINNER Victor victor.stin...@haypocalc.com added the comment:
@neologix: New try. Why did you remove your patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12181
___
Charles-François Natali neolo...@free.fr added the comment:
Here's a patch.
--
keywords: +needs review, patch
stage: - patch review
Added file: http://bugs.python.org/file22423/kevent_openbsd.diff
___
Python tracker rep...@bugs.python.org
Changes by Charles-François Natali neolo...@free.fr:
Removed file: http://bugs.python.org/file22423/kevent_openbsd.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12181
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Why did you remove your patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12181
___
Charles-François Natali neolo...@free.fr added the comment:
If there are only two versions of the structure on all operating
systems, we can add a check in configure
Isn't it a bit overkill?
OpenBSD is the only OS to define struct kevent that way, adding a
#ifdef __OpenBSD__
check would
Federico Schwindt federico.schwi...@gmail.com added the comment:
Adding to this, the kqueue code (and test) heavily depends on the size of these
members. kqueue_event_richcompare() uses a Py_intptr_t to store the result of
substracting T_UINTs which is obviusly wrong on platforms where
Charles-François Natali neolo...@free.fr added the comment:
Hello Nicholas,
kqueue is not standardized.
You're probably right, but depending on the version of your manpages, the
definition changes:
Nicholas Marriott nicholas.marri...@gmail.com added the comment:
Hi
The second one is correct - OpenBSD -current has this in event.h:
struct kevent {
u_int ident; /* identifier for this event */
short filter; /* filter for event */
Nicholas Marriott nicholas.marri...@gmail.com added the comment:
Not that I'm unsympathetic but this is really only a concern if you depend on
the internal structure layout and I think if you do that, you need to take
account of differences between platforms. We don't guarantee we aren't going
Charles-François Natali neolo...@free.fr added the comment:
Concerning the differences between platforms, as noted, FreeBSD, NetBSD and
OS-X are all consistent and I don't think it'll change tomorrow, so for now
it's not a problem. Arbitrarily changing such structures definition - event
Nicholas Marriott nicholas.marri...@gmail.com added the comment:
Well they do it that way is not a justification that necessarily works for
OpenBSD :-).
I'll see if I can come up with a diff to fix this in Python. Not this weekend
though, maybe next week. Unless Remi do you want to have a go?
STINNER Victor victor.stin...@haypocalc.com added the comment:
If there are only two versions of the structure on all operating systems, we
can add a check in configure (e.g. test the size of the ident attribute, =int
or =void*?) to define a macro (e.g. HAVE_OPENBSD_KEVENT_STRUCT). You might
Charles-François Natali neolo...@free.fr added the comment:
OpenBSD's struct kevent definition looks fishy:
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/event.h?rev=1.15;content-type=text%2Fplain
struct kevent {
u_int ident; /* identifier for this event */
STINNER Victor victor.stin...@haypocalc.com added the comment:
Le jeudi 26 mai 2011 à 14:54 +, Charles-François Natali a écrit :
Charles-François Natali neolo...@free.fr added the comment:
OpenBSD's struct kevent definition looks fishy:
Charles-François Natali neolo...@free.fr added the comment:
ident and data are not pointers,
That's not the point.
struct kevent declaration should be the following:
struct kevent {
uintptr_t ident;/* identifier for this event */
short filter; /* filter for
Nicholas Marriott nicholas.marri...@gmail.com added the comment:
Hi
This is not an OpenBSD bug.
kqueue is not standardized. There is no reason for the ident member to be
uintptr_t over u_int - either is valid, and so far I don't see any reason for
us to try and change it.
--
nosy:
Nicholas Marriott nicholas.marri...@gmail.com added the comment:
To follow up a little - I'm afraid that you should not depend on the internal
layout of structures like this. We clearly document the kevent structure in
kevent(2), and of course beyond that it is of course dependent on C padding
New submission from rpointel pyt...@xiri.fr:
Hello,
on OpenBSD (arch: sparc64), when I run the regress tests, I have a SIGBUS error
during the test_kqueue.py:
(gdb) run /tmp/test_kqueue.py
Starting program: /usr/local/bin/python2.7 /tmp/test_kqueue.py
testPair (__main__.TestKQueue) ...
Charles-François Natali neolo...@free.fr added the comment:
It's an unaligned access:
addr=0x21007b72c
case T_LONGLONG:
v = PyLong_FromLongLong(*(PY_LONG_LONG *)addr);
sizeof(PY_LONG_LONG) == 8, but addr % 8 = 0x21007b72c % 8 == 4
--
nosy: +charles-francois.natali
Changes by Charles-François Natali neolo...@free.fr:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12181
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Don't hesitate to ask me if you need information.
It looks like the crash occurs on r[0].data in testPair() of test_kqueue. Can
you confirm this? Comment the line in test_kqueue.py to check if it works
around the crash.
What is
rpointel pyt...@xiri.fr added the comment:
It looks like the crash occurs on r[0].data in testPair() of test_kqueue. Can
you confirm this? Comment the line in test_kqueue.py to check if it works
around the crash.
Yes, it does not crash if I comment this line.
What is the size of intptr_t
42 matches
Mail list logo