[Python-Dev] Bus error in Python 3.6.0beta

INADA Naoki songofacandy at gmail.com
Tue Nov 22 12:53:15 EST 2016


On Wed, Nov 23, 2016 at 1:00 AM, Stefan Scherfke
<stefan.scherfke at energymeteo.de> wrote:
>
>
> On 22.11.2016 12:52, Stefan Scherfke wrote:
>>
>>
>> Here is a minimal example that reproduces the error:
>>
>> $ /tmp/py36/bin/python
>> Python 3.6.0b4 (default, Nov 22 2016, 10:32:29)
>> [GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux
>>>>>
>>>>>
>>>>> path = '/tmp/py36/lib/libpython3.6m.so.1.0'
>>>>> f = open(path, 'wb')
>>
>> BusError
>>
>
> This can, of course, not work.  But the Conda installer does something like
> this and it works on Python 3.5 but not on 3.6.  I'm a bit baffled...
>

I don't know about Conda.  But this BusError is normal behavior of Linux.
While executing binary, truncating the binary cause BusError.
I can reproduce it with Python 3.5

$ ldd bin/python3.5
...
libpython3.5m.so.1.0 =>
/home/inada-n/local/py35/lib/libpython3.5m.so.1.0 (0x00007fdefa188000)
...

$ ll lib/
...
lrwxrwxrwx  1 inada-n inada-n       20 11月 23 02:46 libpython3.5m.so
-> libpython3.5m.so.1.0*
-r-xr-xr-x  1 inada-n inada-n 12497584 11月 23 02:46 libpython3.5m.so.1.0*
...
$ chmod u+w lib/libpython3.5m.so.1.0
$ bin/python3.5
Python 3.5.2+ (3.5:0ee76f3afd70, Nov 23 2016, 02:39:08)
[GCC 6.2.0 20161005] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f = open('./lib/libpython3.5m.so.1.0', 'wb')
Bus error (core dumped)


-- 
INADA Naoki  <songofacandy at gmail.com>


More information about the Python-Dev mailing list