This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sdaoden
Recipients brett.cannon, ixokai, ned.deily, neologix, pitrou, sdaoden, vstinner
Date 2011-02-26.10:34:09
SpamBayes Score 2.2026368e-06
Marked as misclassified No
Message-id <20110226103021.GA19885@sherwood.local>
In-reply-to <AANLkTimiG2bTumkvNbcWpcRJeVQHyS_Uc8pYBKFGMmXT@mail.gmail.com>
Content
11:12 ~/tmp $ python3 ~/usr/opt/py3k/lib/python3.3/test_zlib.py
Bus error

Your code snippet:

11:21 ~/tmp $ /usr/bin/time -lp python3 test.py

posix.stat_result(st_mode=33184, st_ino=10066605, st_dev=234881025, st_nlink=1, st_uid=502, st_gid=20, st_size=4294967300, st_atime=1298715813, st_mtime=1298715813, st_ctime=1298715813)
posix.stat_result(st_mode=33184, st_ino=10066605, st_dev=234881025, st_nlink=1, st_uid=502, st_gid=20, st_size=4294967300, st_atime=1298715813, st_mtime=1298715813, st_ctime=1298715813)
real        71.66
user         0.06
sys          3.71
          0  maximum resident set size
          0  average shared memory size
          0  average unshared data size
          0  average unshared stack size
          0  page reclaims
          0  page faults
          0  swaps
          0  block input operations
         57  block output operations
          0  messages sent
          0  messages received
          0  signals received
       2112  voluntary context switches
          0  involuntary context switches

On Fri, Feb 25, 2011 at 05:05:19PM +0000, Charles-Francois Natali wrote:
>
>Charles-Francois Natali <neologix@free.fr> added the comment:
>
>Could you try with this:
>
> def setUp(self):
>          with open(support.TESTFN, "wb+") as f:
>              f.seek(_4G)
>              f.write(b"asdf")
>              f.flush()
>+            os.fsync(f.fileno())
>              self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
>
>HFS+ doesn't seem to support sparse files, so the file is actually
>zero-filled asynchronously.
>Maybe the mapping gets done before the blocks have been allocated,
>which triggers a segfault when the first page is accessed.
>I'm not sure it'll make any difference, but I'm curious...
>
>Also, I'd be curious to see the result of
>
>"""
>import os
>
>name = '/tmp/foo'
>f = open(name, 'wb')
>f.seek(1 << 32)
>f.write(b'asdf')
>f.flush()
>print(os.fstat(f.fileno()))
>f.close()
>print(os.stat(name))
>"""
>
>Thanks !
>
>----------
>
>_______________________________________
>Python tracker <report@bugs.python.org>
><http://bugs.python.org/issue11277>
>_______________________________________
History
Date User Action Args
2011-02-26 10:34:10sdaodensetrecipients: + sdaoden, brett.cannon, ixokai, pitrou, vstinner, ned.deily, neologix
2011-02-26 10:34:10sdaodenlinkissue11277 messages
2011-02-26 10:34:09sdaodencreate