Page 1 of 1

Nano Pi Neo can't run rPi.gpio code

Posted: Fri Jan 05, 2018 10:44 pm
by Szymon_Zy
Hello

I've run led.py test and ended up with:

Code: Select all

Traceback (most recent call last):
  File "./led.py", line 2, in <module>
    import RPi.GPIO as GPIO
  File "/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!


I guess that I should not install rpi.gpi via pip3 but I'm trying to switch my working project from rPi to NanoPi and I did it out of habit. When I removed rpi.gpio via pip3 i got that the rpi.gpio module was not found.

Code: Select all

Traceback (most recent call last):
  File "./led.py", line 2, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named 'RPi'

I'm using latest legacy ubuntu image so according to friendlyelec wiki it should include this lib on factory state. So the question is .... how to bring it back? I would like to avoid starting from the scratch as I already spend few hours to replicate databases configure user env - tweaked a lot of stuff and I got stuck with driving gpio pins. Obviously this should be easiest thing to do with this machines .... but it looks like it is not.
Any help would be appreciated.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Sun Jan 07, 2018 9:20 pm
by Szymon_Zy
Anybody using rPi.gpio library?
At the moment I switched to system("gpio write 7 1")
But it is going to make me a lot of problem as my project improve. It is not flexible at all i have chosen FriendlyElec as it was stated that basic support to gpio is compatible with rPi.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Mon Jan 08, 2018 11:06 am
by auto3000
It looks you are using the official RPi.GPIO. On NanoPi, you must fallback to RPi.GPIO_NP (_NP for NanoPi). It should be installed on friendlyelec images.

Ads: due to limitations of RPi.GPIO_NP provided as binary form by friendlyelec, we did a reimplementation at https://github.com/auto3000/RPi.GPIO_NP
It can be rebuild for python 2 or python 3 installation.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Mon Jan 15, 2018 10:11 pm
by Szymon_Zy
I'm using armbian image.
I cloned RPi.GPIO_NP and made

Code: Select all

python3 setup.py install


Installation log:

Code: Select all

running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.5
creating build/lib.linux-armv7l-3.5/RPi
copying RPi/__init__.py -> build/lib.linux-armv7l-3.5/RPi
creating build/lib.linux-armv7l-3.5/RPi/GPIO
copying RPi/GPIO/__init__.py -> build/lib.linux-armv7l-3.5/RPi/GPIO
running build_ext
building 'RPi._GPIO' extension
creating build/temp.linux-armv7l-3.5
creating build/temp.linux-armv7l-3.5/source
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/py_gpio.c -o build/temp.linux-armv7l-3.5/source/py_gpio.o
source/py_gpio.c: In function ‘PyInit__GPIO’:
source/py_gpio.c:1034:16: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
    pin_to_gpio = &pin_to_gpio_nanopi;
                ^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/c_gpio.c -o build/temp.linux-armv7l-3.5/source/c_gpio.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/cpuinfo.c -o build/temp.linux-armv7l-3.5/source/cpuinfo.o
source/cpuinfo.c: In function ‘get_rpi_info’:
source/cpuinfo.c:41:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
       fgets(buffer, sizeof(buffer), fp);
       ^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/event_gpio.c -o build/temp.linux-armv7l-3.5/source/event_gpio.o
source/event_gpio.c: In function ‘gpio_export’:
source/event_gpio.c:64:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, str_gpio, len);
     ^
source/event_gpio.c: In function ‘gpio_unexport’:
source/event_gpio.c:79:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, str_gpio, len);
     ^
source/event_gpio.c: In function ‘gpio_set_direction’:
source/event_gpio.c:106:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
         write(fd, "in", 3);
         ^
source/event_gpio.c:108:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
         write(fd, "out", 4);
         ^
source/event_gpio.c: In function ‘gpio_set_edge’:
source/event_gpio.c:124:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, stredge[edge], strlen(stredge[edge]) + 1);
     ^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/soft_pwm.c -o build/temp.linux-armv7l-3.5/source/soft_pwm.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/py_pwm.c -o build/temp.linux-armv7l-3.5/source/py_pwm.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/common.c -o build/temp.linux-armv7l-3.5/source/common.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/constants.c -o build/temp.linux-armv7l-3.5/source/constants.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/source/py_gpio.o build/temp.linux-armv7l-3.5/source/c_gpio.o build/temp.linux-armv7l-3.5/source/cpuinfo.o build/temp.linux-armv7l-3.5/source/event_gpio.o build/temp.linux-armv7l-3.5/source/soft_pwm.o build/temp.linux-armv7l-3.5/source/py_pwm.o build/temp.linux-armv7l-3.5/source/common.o build/temp.linux-armv7l-3.5/source/constants.o -o build/lib.linux-armv7l-3.5/RPi/_GPIO.cpython-35m-arm-linux-gnueabihf.so
running install_lib
creating /usr/local/lib/python3.5/dist-packages/RPi
copying build/lib.linux-armv7l-3.5/RPi/__init__.py -> /usr/local/lib/python3.5/dist-packages/RPi
copying build/lib.linux-armv7l-3.5/RPi/_GPIO.cpython-35m-arm-linux-gnueabihf.so -> /usr/local/lib/python3.5/dist-packages/RPi
creating /usr/local/lib/python3.5/dist-packages/RPi/GPIO
copying build/lib.linux-armv7l-3.5/RPi/GPIO/__init__.py -> /usr/local/lib/python3.5/dist-packages/RPi/GPIO
byte-compiling /usr/local/lib/python3.5/dist-packages/RPi/__init__.py to __init__.cpython-35.pyc
byte-compiling /usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.py to __init__.cpython-35.pyc
running install_egg_info
Writing /usr/local/lib/python3.5/dist-packages/RPi.GPIO-0.6.3.egg-info


And when I try to import:

Code: Select all

import RPi.GPIO as GPIO
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/szymon/RPi.GPIO_NP/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
ImportError: No module named 'RPi._GPIO'



The error points to:

Code: Select all

from RPi._GPIO import *

VERSION = '0.6.3'



but manually if I type in python3 console:

Code: Select all

>>> import RPi._GPIO
>>> from RPi._GPIO import *

I don't get any errors

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Mon Jan 15, 2018 10:14 pm
by Szymon_Zy
This is weird now I don't have any errors?!

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Mon Jan 15, 2018 10:27 pm
by Szymon_Zy
Could anyone explain me what is pin order in BCM and Board mode? How to compare it to

Code: Select all

gpio readall 
results?

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Tue Jan 16, 2018 8:35 am
by auto3000
Maybe a reboot was necessary but this is surprising... anyway, I'm not expert in Python runtime. Thanks for your feedback.

I only use BOARD mode. BCM is a "BroadCoM" definition of pins for raspberry pi, this is for backward compatibility between raspberry 1/2/3. Even on raspberry platform, I did not use BCM definition because I found this misleading.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Tue Jan 16, 2018 9:01 am
by Szymon_Zy
Ok, I set up board and want to light up led on pin GPIO.1

Code: Select all

 +-----+-----+----------+------+---+-NanoPI M1+---+------+----------+-----+-----+
 |  H3 | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi |  H3 |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
 |  12 |   8 |    SDA.0 |  OUT | 0 |  3 || 4  |   |      | 5v       |     |     |
 |  11 |   9 |    SCL.0 | ALT5 | 0 |  5 || 6  |   |      | 0v       |     |     |
 | 203 |   7 |   GPIO.7 |  OUT | 1 |  7 || 8  | 0 | ALT5 | TxD1     | 15  | 198 |
 |     |     |       0v |      |   |  9 || 10 | 0 | ALT5 | RxD1     | 16  | 199 |
 |   0 |   0 |     TxD2 | ALT5 | 0 | 11 || 12 | 0 | OUT  | GPIO.1   | 1   | 6   |
 |   2 |   2 |     RTS2 |  OFF | 0 | 13 || 14 |   |      | 0v       |     |     |
 |   3 |   3 |     CTS2 |  OFF | 0 | 15 || 16 | 0 | OFF  | RTS1     | 4   | 200 |
 |     |     |     3.3v |      |   | 17 || 18 | 0 | OFF  | CTS1     | 5   | 201 |
 |  64 |  12 |     MOSI | ALT4 | 0 | 19 || 20 |   |      | 0v       |     |     |
 |  65 |  13 |     MISO | ALT4 | 0 | 21 || 22 | 0 | OUT  | RxD2     | 6   | 1   |
 |  66 |  14 |     SCLK | ALT4 | 0 | 23 || 24 | 0 | ALT4 | SPI0_CS  | 10  | 67  |
 |     |     |       0v |      |   | 25 || 26 | 0 | OFF  | SPDIFOUT | 11  | 17  |
 |  19 |  30 |    SDA.1 | ALT4 | 0 | 27 || 28 | 0 | ALT4 | SCL.1    | 31  | 18  |
 |  20 |  21 | PCM0DOUT |  OFF | 0 | 29 || 30 |   |      | 0v       |     |     |
 |  21 |  22 |  PCM0DIN |  OFF | 0 | 31 || 32 | 0 | OFF  | GPIO.26  | 26  | 7   |
 |   8 |  23 |  GPIO.23 |  OFF | 0 | 33 || 34 |   |      | 0v       |     |     |
 |  16 |  24 |     CTS3 |  OUT | 1 | 35 || 36 | 0 | ALT4 | TxD3     | 27  | 13  |
 |   9 |  25 |  GPIO.25 |  OFF | 0 | 37 || 38 | 0 | OFF  | RTS3     | 28  | 15  |
 |     |     |       0v |      |   | 39 || 40 | 0 | ALT4 | RxD3     | 29  | 14  |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |  H3 | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi |  H3 |
 +-----+-----+----------+------+---+-NanoPI M1+---+------+----------+-----+-----+


No matter what number I use it won't light up:

Code: Select all

#!/usr/bin/python3
import RPi.GPIO as GPIO
import time

led = 1

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(led,GPIO.OUT)
print("LED on")
GPIO.output(led,GPIO.HIGH)
time.sleep(1)
print("LED off")
GPIO.output(led,GPIO.LOW)


I tried 12, 1, 6.

when use:

Code: Select all

buzzer_pin      = 1
print("Setting up buzzer pin")
os.system('gpio mode '+str(buzzer_pin)+' out')
os.system('gpio write '+str(buzzer_pin)+' 1')
sleep(0.5)
os.system('gpio write '+str(buzzer_pin)+' 0')


It works like a charm.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Tue Jan 16, 2018 11:25 am
by auto3000
Your table extract from wiringpi is helpful.

From the given table, GPIO.1 looks to be the physical pin 12. Could you give a try with BOARD and 12 ?

Code: Select all

#!/usr/bin/python3
import RPi.GPIO as GPIO
import time

led = 12

GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(led,GPIO.OUT)
print("LED on")
GPIO.output(led,GPIO.HIGH)
time.sleep(1)
print("LED off")
GPIO.output(led,GPIO.LOW)

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Tue Jan 16, 2018 5:57 pm
by Szymon_Zy
Thank you very much. I really appreciate your help. Like you noticed there were a mistake in my code. I used BCM instead of BOARD. Now the code works ok! I can make progress with my project!

I think that you should include this informations in readme.md inside git repository.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Wed Jan 17, 2018 5:48 am
by Szymon_Zy
Do you have any idea how to make this code work without sudo?

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Wed Jan 17, 2018 9:00 am
by auto3000

Code: Select all

Do you have any idea how to make this code work without sudo?

You may have to verify my claim, but I remember RPi.GPIO(_NP) relies on /dev/mem. You may want to put this device file in a group or make it 666 for full read/write access.

This approach is dirty (/dev/mem allow access to any machine resources) and I remember that alternate Raspberry linux kernel introduce a /dev/gpio_mem or something like that. This is exactly the same as /dev/mem but reduce the accessible memory range. There is no such /dev/gpio_mem for AllWinner H3 linux kernel.

I think it would be great if you contribute to the Readme.md with an Howto or Install section or both with your experience. You can cut-paste some messages of this discussion and describe what you did to install on your specific ubuntu/armbian, then create a pull request in GitHub for integration ! The "sudo" limitation is also an important thing.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Wed Jan 17, 2018 10:51 am
by Szymon_Zy
I will try tu update readme.md.

Permission to /dev/mem looks like:

Code: Select all

crw-r----- 1 root kmem 1, 1 Jan 11 09:17 /dev/mem

so I allowed kmem to write into device:

Code: Select all

chmod g+w /dev/mem

I moved myself into kmem group with

Code: Select all

sudo usermod -a -G kmem szymon


loged out and logged in again. Id says I'm in kmem group

Code: Select all

15(kmem)


But still I get no permission to access /dev/mem

I also tried:

Code: Select all

 sudo chown root.gpio /dev/mem && sudo chmod g+rw /dev/mem

while default user is in gpio group already
but still no luck.

Code: Select all

Traceback (most recent call last):
  File "./led_board.py", line 9, in <module>
    GPIO.setup(led,GPIO.OUT)
RuntimeError: No access to /dev/mem.  Try running as root!


There have to be some security restriction that prevents writting into memory by anyone.

Anyway after reboot when /dev/mem is recreated permission are reset to default.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Wed Jan 17, 2018 12:22 pm
by auto3000
Right, you did correct. The next investigation is to call the program with "strace" (strace python3 yourprogram.py) and check with call between mmap and open is failing and why (refering to https://github.com/auto3000/RPi.GPIO_NP ... pio.c#L162 code).

Oh I remember the library also access to files in /sys/class/gpio/... you may have a look too these.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Thu Jan 18, 2018 8:04 am
by Szymon_Zy
I received

Code: Select all

szymon@rfid_teachers:~$ strace ./led_board.py
execve("./led_board.py", ["./led_board.py"], [/* 22 vars */]) = 0
brk(NULL)                               = 0x106f000
uname({sysname="Linux", nodename="rfid_teachers", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25110, ...}) = 0
mmap2(NULL, 25110, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fc6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\235F\0\0004\0\0\0"..., 512) = 512
lseek(3, 108332, SEEK_SET)              = 108332
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1640) = 1640
lseek(3, 70048, SEEK_SET)               = 70048
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0755, st_size=109972, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fc5000
mmap2(NULL, 143940, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f82000
mprotect(0xb6f93000, 61440, PROT_NONE)  = 0
mmap2(0xb6fa2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0xb6fa2000
mmap2(0xb6fa4000, 4676, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6fa4000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\331i\1\0004\0\0\0"..., 512) = 512
lseek(3, 894128, SEEK_SET)              = 894128
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2960) = 2960
lseek(3, 888324, SEEK_SET)              = 888324
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\3\f"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0755, st_size=897088, ...}) = 0
mmap2(NULL, 963928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e96000
mprotect(0xb6f6c000, 65536, PROT_NONE)  = 0
mmap2(0xb6f7c000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd6000) = 0xb6f7c000
mmap2(0xb6f7f000, 9560, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f7f000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`\t\0\0004\0\0\0"..., 512) = 512
lseek(3, 8652, SEEK_SET)                = 8652
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120
lseek(3, 8328, SEEK_SET)                = 8328
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0644, st_size=9772, ...}) = 0
mmap2(NULL, 73912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e83000
mprotect(0xb6e85000, 61440, PROT_NONE)  = 0
mmap2(0xb6e94000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb6e94000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\24\n\0\0004\0\0\0"..., 512) = 512
lseek(3, 8688, SEEK_SET)                = 8688
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120
lseek(3, 8364, SEEK_SET)                = 8364
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0644, st_size=9808, ...}) = 0
mmap2(NULL, 73904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e70000
mprotect(0xb6e72000, 61440, PROT_NONE)  = 0
mmap2(0xb6e81000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb6e81000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0x!\0\0004\0\0\0"..., 512) = 512
lseek(3, 94688, SEEK_SET)               = 94688
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120
lseek(3, 94328, SEEK_SET)               = 94328
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0644, st_size=95808, ...}) = 0
mmap2(NULL, 159868, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e48000
mprotect(0xb6e5e000, 61440, PROT_NONE)  = 0
mmap2(0xb6e6d000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0xb6e6d000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0X\26\0\0004\0\0\0"..., 512) = 512
lseek(3, 70180, SEEK_SET)               = 70180
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120
lseek(3, 69816, SEEK_SET)               = 69816
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0644, st_size=71300, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fc4000
mmap2(NULL, 135356, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e26000
mprotect(0xb6e37000, 61440, PROT_NONE)  = 0
mmap2(0xb6e46000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0xb6e46000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0X<\0\0004\0\0\0"..., 512) = 512
lseek(3, 423356, SEEK_SET)              = 423356
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1200) = 1200
lseek(3, 422004, SEEK_SET)              = 422004
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0644, st_size=424556, ...}) = 0
mmap2(NULL, 487548, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6dae000
mprotect(0xb6e15000, 61440, PROT_NONE)  = 0
mmap2(0xb6e24000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x66000) = 0xb6e24000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\230\321\0\0004\0\0\0"..., 512) = 512
lseek(3, 98252, SEEK_SET)               = 98252
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120
lseek(3, 97920, SEEK_SET)               = 97920
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0644, st_size=99372, ...}) = 0
mmap2(NULL, 163512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6d86000
mprotect(0xb6d9e000, 61440, PROT_NONE)  = 0
mmap2(0xb6dad000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0xb6dad000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fc3000
set_tls(0xb6fc37c0, 0xb6fc3e98, 0xb6fce050, 0xb6fc37c0, 0xb6fce050) = 0
mprotect(0xb6f7c000, 8192, PROT_READ)   = 0
mprotect(0xb6e24000, 4096, PROT_READ)   = 0
mprotect(0xb6e46000, 4096, PROT_READ)   = 0
mprotect(0xb6e6d000, 8192, PROT_READ)   = 0
mprotect(0xb6e81000, 4096, PROT_READ)   = 0
mprotect(0xb6e94000, 4096, PROT_READ)   = 0
mprotect(0xb6fa2000, 4096, PROT_READ)   = 0
mprotect(0x2b7000, 4096, PROT_READ)     = 0
mprotect(0xb6fcd000, 4096, PROT_READ)   = 0
munmap(0xb6fc6000, 25110)               = 0
set_tid_address(0xb6fc3368)             = 20214
set_robust_list(0xb6fc3370, 12)         = 0
rt_sigaction(SIGRTMIN, {0xb6f861f5, [], SA_RESTORER|SA_SIGINFO, 0xb6ebb271}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb6f86295, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb6ebb271}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(NULL)                               = 0x106f000
brk(0x1090000)                          = 0x1090000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1668976, ...}) = 0
mmap2(NULL, 1668976, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6bee000
close(3)                                = 0
open("/usr/lib/arm-linux-gnueabihf/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=26262, ...}) = 0
mmap2(NULL, 26262, PROT_READ, MAP_SHARED, 3, 0) = 0xb6fc6000
close(3)                                = 0
futex(0xb6f7eee0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom(0x34b840, 24, GRND_NONBLOCK)  = -1 ENOSYS (Function not implemented)
open("/dev/urandom", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
read(3, ";:\30\"9YFi\312w\213\264\3678\232\360;\357\262)\r\350\3156", 24) = 24
close(3)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6bae000
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
readlink("/usr/bin/python3", "python3.5", 4096) = 9
readlink("/usr/bin/python3.5", 0xbeb812f4, 4096) = -1 EINVAL (Invalid argument)
open("/usr/bin/pyvenv.cfg", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/pyvenv.cfg", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/Modules/Setup", 0xbeb82340) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lib/python3.5/os.py", 0xbeb82298) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lib/python3.5/os.pyc", 0xbeb82298) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5/os.py", {st_mode=S_IFREG|0644, st_size=36970, ...}) = 0
stat64("/usr/bin/pybuilddir.txt", 0xbeb82340) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lib/python3.5/lib-dynload", 0xbeb82340) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
clock_gettime(CLOCK_REALTIME, {1516261703, 865872475}) = 0
clock_gettime(CLOCK_MONOTONIC, {75155, 869260764}) = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b6e000
brk(0x10b1000)                          = 0x10b1000
sysinfo({uptime=75156, loads=[27488, 14880, 7872], totalram=253575168, freeram=109592576, sharedram=0, bufferram=4546560, totalswap=126779392, freeswap=598016, procs=116, totalhigh=0, freehigh=0, mem_unit=1}) = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
munmap(0xb6b2e000, 262144)              = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b2e000
sigaltstack({ss_sp=0x10a2600, ss_flags=0, ss_size=8192}, NULL) = 0
stat64("/usr/lib/python35.zip", 0xbeb939c0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python35.zip", 0xbeb935f0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
open("/usr/lib/python3.5/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
getdents64(3, /* 204 entries */, 32768) = 6784
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/encodings/__init__.cpython-35m-arm-linux-gnueabihf.so", 0xbeb937b0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5/encodings/__init__.abi3.so", 0xbeb937b0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5/encodings/__init__.so", 0xbeb937b0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5/encodings/__init__.py", {st_mode=S_IFREG|0644, st_size=5067, ...}) = 0
stat64("/usr/lib/python3.5/encodings/__init__.py", {st_mode=S_IFREG|0644, st_size=5067, ...}) = 0
open("/usr/lib/python3.5/encodings/__pycache__/__init__.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3834, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3834, ...}) = 0
read(3, "\26\r\r\nm\241\35Z\313\23\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0@\0\0"..., 3835) = 3834
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/codecs.py", {st_mode=S_IFREG|0644, st_size=36231, ...}) = 0
stat64("/usr/lib/python3.5/codecs.py", {st_mode=S_IFREG|0644, st_size=36231, ...}) = 0
open("/usr/lib/python3.5/__pycache__/codecs.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=35288, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=35288, ...}) = 0
read(3, "\26\r\r\nh\241\35Z\207\215\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0@\0\0"..., 35289) = 35288
read(3, "", 1)                          = 0
close(3)                                = 0
brk(0x10d7000)                          = 0x10d7000
stat64("/usr/lib/python3.5/encodings", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/encodings", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/encodings", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
open("/usr/lib/python3.5/encodings", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
getdents64(3, /* 127 entries */, 32768) = 4304
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/encodings/aliases.py", {st_mode=S_IFREG|0644, st_size=15542, ...}) = 0
stat64("/usr/lib/python3.5/encodings/aliases.py", {st_mode=S_IFREG|0644, st_size=15542, ...}) = 0
open("/usr/lib/python3.5/encodings/__pycache__/aliases.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=7550, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=7550, ...}) = 0
read(3, "\26\r\r\nm\241\35Z\266<\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\204\2\0\0@\0\0"..., 7551) = 7550
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/encodings", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/encodings/utf_8.py", {st_mode=S_IFREG|0644, st_size=1005, ...}) = 0
stat64("/usr/lib/python3.5/encodings/utf_8.py", {st_mode=S_IFREG|0644, st_size=1005, ...}) = 0
open("/usr/lib/python3.5/encodings/__pycache__/utf_8.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1694, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1694, ...}) = 0
read(3, "\26\r\r\nm\241\35Z\355\3\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0@\0\0"..., 1695) = 1694
read(3, "", 1)                          = 0
close(3)                                = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0xb6ebb261}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, {SIG_IGN, [], SA_RESTORER, 0xb6ebb261}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGILL, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTRAP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGBUS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGKILL, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [], SA_RESTORER, 0xb6ebb261}, 8) = 0
rt_sigaction(SIGALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCONT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSTOP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTSTP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTTIN, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTTOU, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGURG, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXCPU, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {SIG_IGN, [], SA_RESTORER, 0xb6ebb261}, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPROF, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPWR, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_3, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_4, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_5, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_6, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_7, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_8, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_9, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_10, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_11, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_12, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_13, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_14, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_15, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_16, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_17, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_18, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_19, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_20, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_21, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_22, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_23, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_24, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_25, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_26, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_27, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_28, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_29, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_30, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_31, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x19c34d, [], SA_RESTORER, 0xb6ebb261}, {SIG_DFL, [], 0}, 8) = 0
stat64("/usr/lib/python3.5/encodings", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/encodings/latin_1.py", {st_mode=S_IFREG|0644, st_size=1264, ...}) = 0
stat64("/usr/lib/python3.5/encodings/latin_1.py", {st_mode=S_IFREG|0644, st_size=1264, ...}) = 0
open("/usr/lib/python3.5/encodings/__pycache__/latin_1.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2006, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2006, ...}) = 0
read(3, "\26\r\r\nm\241\35Z\360\4\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0@\0\0"..., 2007) = 2006
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/io.py", {st_mode=S_IFREG|0644, st_size=3396, ...}) = 0
stat64("/usr/lib/python3.5/io.py", {st_mode=S_IFREG|0644, st_size=3396, ...}) = 0
open("/usr/lib/python3.5/__pycache__/io.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3443, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3443, ...}) = 0
read(3, "\26\r\r\nh\241\35ZD\r\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\22\0\0\0@\0\0"..., 3444) = 3443
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/abc.py", {st_mode=S_IFREG|0644, st_size=8628, ...}) = 0
stat64("/usr/lib/python3.5/abc.py", {st_mode=S_IFREG|0644, st_size=8628, ...}) = 0
open("/usr/lib/python3.5/__pycache__/abc.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=7850, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=7850, ...}) = 0
read(3, "\26\r\r\nh\241\35Z\264!\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0@\0\0"..., 7851) = 7850
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/_weakrefset.py", {st_mode=S_IFREG|0644, st_size=5705, ...}) = 0
stat64("/usr/lib/python3.5/_weakrefset.py", {st_mode=S_IFREG|0644, st_size=5705, ...}) = 0
open("/usr/lib/python3.5/__pycache__/_weakrefset.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8406, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=8406, ...}) = 0
read(3, "\26\r\r\nh\241\35ZI\26\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0@\0\0"..., 8407) = 8406
read(3, "", 1)                          = 0
close(3)                                = 0
dup(0)                                  = 3
close(3)                                = 0
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_llseek(0, 0, 0xbeb941a8, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_llseek(0, 0, 0xbeb941f8, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
dup(1)                                  = 3
close(3)                                = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_llseek(1, 0, 0xbeb94188, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_llseek(1, 0, 0xbeb941f8, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
dup(2)                                  = 3
close(3)                                = 0
fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_llseek(2, 0, 0xbeb94188, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_llseek(2, 0, 0xbeb941f8, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/site.py", {st_mode=S_IFREG|0644, st_size=22258, ...}) = 0
stat64("/usr/lib/python3.5/site.py", {st_mode=S_IFREG|0644, st_size=22258, ...}) = 0
open("/usr/lib/python3.5/__pycache__/site.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=18143, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=18143, ...}) = 0
read(3, "\26\r\r\ni\241\35Z\362V\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0@\0\0"..., 18144) = 18143
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/os.py", {st_mode=S_IFREG|0644, st_size=36970, ...}) = 0
stat64("/usr/lib/python3.5/os.py", {st_mode=S_IFREG|0644, st_size=36970, ...}) = 0
open("/usr/lib/python3.5/__pycache__/os.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=31295, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=31295, ...}) = 0
read(3, "\26\r\r\ni\241\35Zj\220\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0000\0\0\0@\0\0"..., 31296) = 31295
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/stat.py", {st_mode=S_IFREG|0644, st_size=5038, ...}) = 0
stat64("/usr/lib/python3.5/stat.py", {st_mode=S_IFREG|0644, st_size=5038, ...}) = 0
open("/usr/lib/python3.5/__pycache__/stat.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=4147, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=4147, ...}) = 0
read(3, "\26\r\r\ni\241\35Z\256\23\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0@\0\0"..., 4148) = 4147
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/posixpath.py", {st_mode=S_IFREG|0644, st_size=14881, ...}) = 0
stat64("/usr/lib/python3.5/posixpath.py", {st_mode=S_IFREG|0644, st_size=14881, ...}) = 0
open("/usr/lib/python3.5/__pycache__/posixpath.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=11120, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=11120, ...}) = 0
read(3, "\26\r\r\ni\241\35Z!:\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0&\0\0\0@\0\0"..., 11121) = 11120
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/genericpath.py", {st_mode=S_IFREG|0644, st_size=4364, ...}) = 0
stat64("/usr/lib/python3.5/genericpath.py", {st_mode=S_IFREG|0644, st_size=4364, ...}) = 0
open("/usr/lib/python3.5/__pycache__/genericpath.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3917, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3917, ...}) = 0
read(3, "\26\r\r\nh\241\35Z\f\21\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0@\0\0"..., 3918) = 3917
read(3, "", 1)                          = 0
close(3)                                = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6aee000
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/_collections_abc.py", {st_mode=S_IFREG|0644, st_size=24706, ...}) = 0
stat64("/usr/lib/python3.5/_collections_abc.py", {st_mode=S_IFREG|0644, st_size=24706, ...}) = 0
open("/usr/lib/python3.5/__pycache__/_collections_abc.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=29622, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=29622, ...}) = 0
read(3, "\26\r\r\nh\241\35Z\202`\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\26\0\0\0@\0\0"..., 29623) = 29622
read(3, "", 1)                          = 0
close(3)                                = 0
brk(0x10f8000)                          = 0x10f8000
brk(0x10ea000)                          = 0x10ea000
stat64("/usr/lib/python3.5/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/_sitebuiltins.py", {st_mode=S_IFREG|0644, st_size=3115, ...}) = 0
stat64("/usr/lib/python3.5/_sitebuiltins.py", {st_mode=S_IFREG|0644, st_size=3115, ...}) = 0
open("/usr/lib/python3.5/__pycache__/_sitebuiltins.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3654, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3654, ...}) = 0
read(3, "\26\r\r\nh\241\35Z+\f\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0@\0\0"..., 3655) = 3654
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/bin/pyvenv.cfg", 0xbeb93720) = -1 ENOENT (No such file or directory)
stat64("/usr/pyvenv.cfg", 0xbeb93720)   = -1 ENOENT (No such file or directory)
geteuid32()                             = 1000
getuid32()                              = 1000
getegid32()                             = 1000
getgid32()                              = 1000
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
open("/usr/lib/python3.5", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
getdents64(3, /* 204 entries */, 32768) = 6784
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/sysconfig.py", {st_mode=S_IFREG|0644, st_size=24650, ...}) = 0
stat64("/usr/lib/python3.5/sysconfig.py", {st_mode=S_IFREG|0644, st_size=24650, ...}) = 0
open("/usr/lib/python3.5/__pycache__/sysconfig.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17045, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=17045, ...}) = 0
read(3, "\26\r\r\ni\241\35ZJ`\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\31\0\0\0@\0\0"..., 17046) = 17045
read(3, "", 1)                          = 0
close(3)                                = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0
lstat64("/usr/bin/python3", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0
readlink("/usr/bin/python3", "python3.5", 4096) = 9
lstat64("/usr/bin/python3.5", {st_mode=S_IFREG|0755, st_size=3189712, ...}) = 0
stat64("/usr/bin/Modules/Setup.dist", 0xbeb92be0) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/Modules/Setup.local", 0xbeb92be0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/_sysconfigdata.py", {st_mode=S_IFREG|0644, st_size=126, ...}) = 0
stat64("/usr/lib/python3.5/_sysconfigdata.py", {st_mode=S_IFREG|0644, st_size=126, ...}) = 0
open("/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=251, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=251, ...}) = 0
read(3, "\26\r\r\n\f\233\220R~\0\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0@\0\0"..., 252) = 251
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/python3.5/plat-arm-linux-gnueabihf", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 8 entries */, 32768)   = 248
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf/_sysconfigdata_m.py", {st_mode=S_IFREG|0644, st_size=21540, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf/_sysconfigdata_m.py", {st_mode=S_IFREG|0644, st_size=21540, ...}) = 0
open("/usr/lib/python3.5/plat-arm-linux-gnueabihf/__pycache__/_sysconfigdata_m.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=21080, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=21080, ...}) = 0
read(3, "\26\r\r\n\237\241\35Z$T\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\10\5\0\0@\0\0"..., 21081) = 21080
read(3, "", 1)                          = 0
close(3)                                = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
lstat64("/usr/lib/python3.5/config-3.5m-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/szymon/.local/lib/python3.5/site-packages", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/home/szymon/.local/lib/python3.5/site-packages", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
brk(0x1112000)                          = 0x1112000
getdents64(3, /* 6 entries */, 32768)   = 192
getdents64(3, /* 0 entries */, 32768)   = 0
brk(0x110a000)                          = 0x110a000
close(3)                                = 0
stat64("/usr/local/lib/python3.5/dist-packages", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
open("/usr/local/lib/python3.5/dist-packages", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
getdents64(3, /* 15 entries */, 32768)  = 584
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3/dist-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/python3/dist-packages", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 25 entries */, 32768)  = 1056
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5/dist-packages", 0xbeb93800) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/sitecustomize.py", {st_mode=S_IFREG|0644, st_size=155, ...}) = 0
stat64("/usr/lib/python3.5/sitecustomize.py", {st_mode=S_IFREG|0644, st_size=155, ...}) = 0
open("/usr/lib/python3.5/__pycache__/sitecustomize.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=217, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=217, ...}) = 0
read(3, "\26\r\r\nw*\375V\233\0\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0@\0\0"..., 218) = 217
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3.5/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat64("/usr/lib/python3.5/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat64("/usr/lib/python3.5/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/python3.5/lib-dynload", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
getdents64(3, /* 42 entries */, 32768)  = 2728
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/home/szymon/.local/lib/python3.5/site-packages", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/home/szymon/.local/lib/python3.5/site-packages", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/home/szymon/.local/lib/python3.5/site-packages", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/home/szymon/.local/lib/python3.5/site-packages", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
getdents64(3, /* 6 entries */, 32768)   = 192
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/local/lib/python3.5/dist-packages", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
open("/usr/local/lib/python3.5/dist-packages", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
getdents64(3, /* 15 entries */, 32768)  = 584
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3/dist-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3/dist-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3/dist-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/python3/dist-packages", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 25 entries */, 32768)  = 1056
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3.5/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat64("/home/szymon/.local/lib/python3.5/site-packages", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
stat64("/usr/lib/python3/dist-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
readlink("./led_board.py", 0xbeb8345c, 4096) = -1 EINVAL (Invalid argument)
getcwd("/home/szymon", 4096)            = 13
lstat64("/home/szymon/led_board.py", {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
stat64("./led_board.py", {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
open("./led_board.py", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, FIOCLEX)                       = 0
fstat64(3, {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "#!/usr/bin/python3\nimport RPi.GP"..., 218) = 218
read(3, ".output(led,GPIO.LOW)\n", 4096) = 22
close(3)                                = 0
stat64("./led_board.py", {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
open("./led_board.py", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, FIOCLEX)                       = 0
fstat64(3, {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
ioctl(3, TCGETS, 0xbeb94404)            = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
read(3, "#!/usr/bin/python3\nimport RPi.GP"..., 4096) = 240
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "#!/usr/bin/python3\nimport RPi.GP"..., 4096) = 240
read(3, "", 4096)                       = 0
close(3)                                = 0
stat64("/home/szymon", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/szymon", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/szymon", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/home/szymon", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 24 entries */, 32768)  = 800
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/lib/python3.5", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/lib/python3.5/plat-arm-linux-gnueabihf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/python3.5/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat64("/home/szymon/.local/lib/python3.5/site-packages", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi/__init__.cpython-35m-arm-linux-gnueabihf.so", 0xbeb931b0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python3.5/dist-packages/RPi/__init__.abi3.so", 0xbeb931b0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python3.5/dist-packages/RPi/__init__.so", 0xbeb931b0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python3.5/dist-packages/RPi/__init__.py", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi/__init__.py", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/usr/local/lib/python3.5/dist-packages/RPi/__pycache__/__init__.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=137, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=137, ...}) = 0
read(3, "\26\r\r\n\301#]Z\0\0\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0@\0\0"..., 138) = 137
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
open("/usr/local/lib/python3.5/dist-packages/RPi", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
getdents64(3, /* 6 entries */, 32768)   = 200
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.cpython-35m-arm-linux-gnueabihf.so", 0xbeb93680) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.abi3.so", 0xbeb93680) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.so", 0xbeb93680) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.py", {st_mode=S_IFREG|0644, st_size=1112, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__init__.py", {st_mode=S_IFREG|0644, st_size=1112, ...}) = 0
open("/usr/local/lib/python3.5/dist-packages/RPi/GPIO/__pycache__/__init__.cpython-35.pyc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1277, ...}) = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1277, ...}) = 0
read(3, "\26\r\r\n\301#]ZX\4\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0@\0\0"..., 1278) = 1277
read(3, "", 1)                          = 0
close(3)                                = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
stat64("/usr/local/lib/python3.5/dist-packages/RPi/_GPIO.cpython-35m-arm-linux-gnueabihf.so", {st_mode=S_IFREG|0755, st_size=126016, ...}) = 0
futex(0xb6e950ac, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/local/lib/python3.5/dist-packages/RPi/_GPIO.cpython-35m-arm-linux-gnueabihf.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\350\"\0\0004\0\0\0"..., 512) = 512
lseek(3, 124576, SEEK_SET)              = 124576
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1440) = 1440
lseek(3, 33955, SEEK_SET)               = 33955
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0755, st_size=126016, ...}) = 0
mmap2(NULL, 101020, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ad5000
mprotect(0xb6add000, 61440, PROT_NONE)  = 0
mmap2(0xb6aec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0xb6aec000
close(3)                                = 0
mprotect(0xb6aec000, 4096, PROT_READ)   = 0
open("/proc/cpuinfo", O_RDONLY)         = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "Processor\t: ARMv7 Processor rev "..., 1024) = 422
read(3, "", 1024)                       = 0
close(3)                                = 0
gettimeofday({1516261704, 271108}, NULL) = 0
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2705, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2705, ...}) = 0
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 2705
_llseek(3, -28, [2677], SEEK_CUR)       = 0
read(3, "\nCET-1CEST,M3.5.0,M10.5.0/3\n", 4096) = 28
close(3)                                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2705, ...}) = 0
open("/dev/gpiomem", O_RDWR|O_SYNC)     = -1 ENOENT (No such file or directory)
open("/dev/mem", O_RDWR|O_SYNC)         = -1 EPERM (Operation not permitted)
write(2, "Traceback (most recent call last"..., 35Traceback (most recent call last):
) = 35
write(2, "  File \"./led_board.py\", line 9,"..., 45  File "./led_board.py", line 9, in <module>
) = 45
open("./led_board.py", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
ioctl(3, TCGETS, 0xbeb93064)            = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR)            = 0
fcntl64(3, F_DUPFD_CLOEXEC, 0)          = 4
fcntl64(4, F_GETFL)                     = 0xa0000 (flags O_RDONLY|O_LARGEFILE|O_CLOEXEC)
fstat64(4, {st_mode=S_IFREG|0775, st_size=240, ...}) = 0
read(4, "#!/usr/bin/python3\nimport RPi.GP"..., 4096) = 240
close(4)                                = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
read(3, "#!/usr/bin/python3\nimport RPi.GP"..., 8192) = 240
close(3)                                = 0
write(2, "    GPIO.setup(led,GPIO.OUT)\n", 29    GPIO.setup(led,GPIO.OUT)
) = 29
write(2, "RuntimeError: No access to /dev/"..., 59RuntimeError: No access to /dev/mem.  Try running as root!
) = 59
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0xb6ebb261}, {0x19c34d, [], SA_RESTORER, 0xb6ebb261}, 8) = 0
munmap(NULL, 4096)                      = 0
exit_group(1)                           = ?
+++ exited with 1 +++



I'm in the rush at the moment so I will try to inestigate further this evening or during weekend.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Thu Jan 18, 2018 8:44 am
by auto3000
OK your logs are confirming open is returning EPERM (error permission denied).

Code: Select all

open("/dev/gpiomem", O_RDWR|O_SYNC)     = -1 ENOENT (No such file or directory)
open("/dev/mem", O_RDWR|O_SYNC)         = -1 EPERM (Operation not permitted)


After googling this problem, it looks your linux kernel configuration may include CONFIG_STRICT_DEVMEM option. Basically, only root user can access to /dev/mem with this kernel option. The possible "clean" solution are related to kernel modification:
1) disable CONFIG_STRICT_DEVMEM
2) write a driver /dev/gpiomem for AllWinner H3...

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Thu Jan 18, 2018 8:53 am
by Szymon_Zy
Compiling own kernel is not a big problem but it is not worth to shoot with a canon to the bird. Writing a driver is beyond my capabilities.

So I have to play with suid bit.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Sun Jan 21, 2018 12:31 pm
by Szymon_Zy
I've update install.txt please review and merge if you find it usefull. Readme.md is a little confusing it says about Raspberry Pi release.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Sun Jan 21, 2018 12:45 pm
by auto3000
Thanks for the new install.txt, it is clean and this procedure will help many users. Your branch has been merged.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Sun Jan 21, 2018 2:42 pm
by Szymon_Zy
In the evening (GMT+2) I will update readme.md to make it clearer about pin mapping. This information are essential for new users.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Sun Jan 21, 2018 9:07 pm
by auto3000
Any help is appreciated. Thanks for this second contribution.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Sun Jan 21, 2018 9:16 pm
by Szymon_Zy
I'm still learnign github.

Re: Nano Pi Neo can't run rPi.gpio code

Posted: Mon Jan 22, 2018 10:09 am
by auto3000
You don't need to know more things on GitHub, you already know what is necessary when know how to do a branch and create a pull request.

You may want to google git rebase -i, squash commits in git, git push -f but this is really optional.