matthieuwirth
Posts: 5
Joined: Tue Jun 07, 2016 3:52 pm

Python 2.7.3 to 2.7.9 issue

Tue Jun 07, 2016 4:09 pm

Hi everyone,

Last year, I wrote a Python program for my company initially to run on a Pi B+ . The Python version was then 2.7.3.
My code, uses libraries such as RPi.GPIO and integrated socket and threading packages.
All was working fine, as expected on B+.

This model becoming obsolete, we wanted to replace it with a Pi 3 but on that version, the Python environnement is 2.7.9 and my program is behaving strangely (it seems to react slower when I send commands through my sockets for example).

Has anybody got an idea why this could happen? Is it possible to install a previous version of Python on my Raspberry 3?

I would be very thankful if someone could bring me some help :D

fruitoftheloom
Posts: 23549
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Python 2.7.3 to 2.7.9 issue

Tue Jun 07, 2016 9:46 pm

matthieuwirth wrote:Hi everyone,

Last year, I wrote a Python program for my company initially to run on a Pi B+ . The Python version was then 2.7.3.
My code, uses libraries such as RPi.GPIO and integrated socket and threading packages.
All was working fine, as expected on B+.

This model becoming obsolete, we wanted to replace it with a Pi 3 but on that version, the Python environnement is 2.7.9 and my program is behaving strangely (it seems to react slower when I send commands through my sockets for example).

Has anybody got an idea why this could happen? Is it possible to install a previous version of Python on my Raspberry 3?

I would be very thankful if someone could bring me some help :D
You appear to be keeping the Operating System secret ??

The RPi 1B+ is not obsolete, though currently in short supply
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

matthieuwirth
Posts: 5
Joined: Tue Jun 07, 2016 3:52 pm

Re: Python 2.7.3 to 2.7.9 issue

Wed Jun 08, 2016 12:32 pm

Thank you for your help !

The B+ Raspberry is running Raspbian 7 (3.18.11) and the Raspberry 3 is running the latest OS , Jessie 8 (4.1.18-v7). Do you think there is something wrong with the compatibility between the two OS?

I know that the Pi B+ isn't obsolete yet, but we want to be sure that the day it becomes it, we will be able to run our scripts on Pi 3 or further versions.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Python 2.7.3 to 2.7.9 issue

Wed Jun 08, 2016 3:26 pm

matthieuwirth wrote: The B+ Raspberry is running Raspbian 7 (3.18.11) and the Raspberry 3 is running the latest OS , Jessie 8 (4.1.18-v7). Do you think there is something wrong with the compatibility between the two OS?
No. There is another explanation (unknown as yet) for the latency you are experiencing on the 3B; probably having more to do with whatever else is running on the system, how you have it configured, and so on...
marcus
:ugeek:

matthieuwirth
Posts: 5
Joined: Tue Jun 07, 2016 3:52 pm

Re: Python 2.7.3 to 2.7.9 issue

Thu Jun 09, 2016 8:04 am

MarkHaysHarris777 wrote:No. There is another explanation (unknown as yet) for the latency you are experiencing on the 3B; probably having more to do with whatever else is running on the system, how you have it configured, and so on...
That's what I don't understand, I have nothing else running on the Pi than my program. It's a Python program that controls switches according to commands he receives through a socket from a Java GUI and that measures temperatures from an ADC (to explain it simply). The server is created by the Java GUI and my Pi is the client. I run two threads to read and to write through the socket.

The wifi module and bluetooth are not activated . That's weird...

matthieuwirth
Posts: 5
Joined: Tue Jun 07, 2016 3:52 pm

Re: Python 2.7.3 to 2.7.9 issue

Thu Jun 09, 2016 10:17 am

Here is the output for dmesg, if it can help.

Code: Select all

pi@raspberrypi:~/Desktop/SecurityBoard/V1/Python $ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.1.18-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #846 SMP Thu Feb 25 14:22:53 GMT 2016
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] cma: Reserved 8 MiB at 0x3a400000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 241664
[    0.000000] free_area_init_node: node 0, pgdat 80876f80, node_mem_map b9bb4000
[    0.000000]   Normal zone: 2124 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 241664 pages, LIFO batch:31
[    0.000000] [bcm2709_smp_init_cpus] enter (9420->f3003010)
[    0.000000] [bcm2709_smp_init_cpus] ncores=4
[    0.000000] PERCPU: Embedded 12 pages/cpu @bafb0000 s20416 r8192 d20544 u49152
[    0.000000] pcpu-alloc: s20416 r8192 d20544 u49152 alloc=12*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239540
[    0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2709.boardrev=0xa02082 bcm2709.serial=0x5d60ce6a smsc95        xx.macaddr=B8:27:EB:60:CE:6A bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 con        sole=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 939416K/966656K available (6024K kernel code, 534K rwdata, 1660K rodata, 448K init, 757K bss, 19048K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xbb800000 - 0xff000000   (1080 MB)
    lowmem  : 0x80000000 - 0xbb000000   ( 944 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x807895a0   (7686 kB)
      .init : 0x8078a000 - 0x807fa000   ( 448 kB)
      .data : 0x807fa000 - 0x8087fac0   ( 535 kB)
       .bss : 0x80882000 - 0x8093f79c   ( 758 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Additional per-CPU info printed with stalls.
[    0.000000] NR_IRQS:608
[    0.000000] Architected cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000009] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000027] Switching to timer-based delay loop, resolution 52ns
[    0.000235] Console: colour dummy device 80x30
[    0.001276] console [tty1] enabled
[    0.001329] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001397] pid_max: default: 32768 minimum: 301
[    0.001716] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001759] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002743] Initializing cgroup subsys blkio
[    0.002790] Initializing cgroup subsys memory
[    0.002838] Initializing cgroup subsys devices
[    0.002882] Initializing cgroup subsys freezer
[    0.002931] Initializing cgroup subsys net_cls
[    0.003002] CPU: Testing write buffer coherency: ok
[    0.003087] ftrace: allocating 20309 entries in 60 pages
[    0.048852] CPU0: update cpu_capacity 1024
[    0.048915] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.048948] [bcm2709_smp_prepare_cpus] enter
[    0.049094] Setting up static identity map for 0x8240 - 0x8274
[    0.050835] [bcm2709_boot_secondary] cpu:1 started (0) 17
[    0.051183] [bcm2709_secondary_init] enter cpu:1
[    0.051226] CPU1: update cpu_capacity 1024
[    0.051232] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.051604] [bcm2709_boot_secondary] cpu:2 started (0) 18
[    0.051858] [bcm2709_secondary_init] enter cpu:2
[    0.051880] CPU2: update cpu_capacity 1024
[    0.051886] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.052239] [bcm2709_boot_secondary] cpu:3 started (0) 18
[    0.052422] [bcm2709_secondary_init] enter cpu:3
[    0.052443] CPU3: update cpu_capacity 1024
[    0.052449] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.052514] Brought up 4 CPUs
[    0.052612] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.052642] CPU: All CPU(s) started in HYP mode.
[    0.052668] CPU: Virtualization extensions available.
[    0.053362] devtmpfs: initialized
[    0.071614] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.071877] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.072737] pinctrl core: initialized pinctrl subsystem
[    0.073280] NET: Registered protocol family 16
[    0.078400] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.079369] bcm2709.uart_clock = 48000000
[    0.083693] bcm2709: Mini UART enabled
[    0.083760] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.083807] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.083980] Serial: AMBA PL011 UART driver
[    0.084124] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev2
[    0.084567] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.149589] bcm2708-dmaengine 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0xf35
[    0.149660] bcm2708-dmaengine 3f007000.dma: Initialized 7 DMA channels (+ 1 legacy)
[    0.150250] bcm2708-dmaengine 3f007000.dma: Load BCM2835 DMA engine driver
[    0.150287] bcm2708-dmaengine 3f007000.dma: dma_debug:0
[    0.150866] SCSI subsystem initialized
[    0.151068] usbcore: registered new interface driver usbfs
[    0.151174] usbcore: registered new interface driver hub
[    0.151289] usbcore: registered new device driver usb
[    0.151829] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-02-25 14:25
[    0.178920] Switched to clocksource arch_sys_counter
[    0.220469] FS-Cache: Loaded
[    0.220754] CacheFiles: Loaded
[    0.229985] NET: Registered protocol family 2
[    0.230939] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.231080] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.231291] TCP: Hash tables configured (established 8192 bind 8192)
[    0.231405] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.231473] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.231794] NET: Registered protocol family 1
[    0.232119] RPC: Registered named UNIX socket transport module.
[    0.232151] RPC: Registered udp transport module.
[    0.232179] RPC: Registered tcp transport module.
[    0.232206] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.233175] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.234251] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.247625] VFS: Disk quotas dquot_6.6.0
[    0.247956] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.250056] FS-Cache: Netfs 'nfs' registered for caching
[    0.250977] NFS: Registering the id_resolver key type
[    0.251039] Key type id_resolver registered
[    0.251067] Key type id_legacy registered
[    0.253117] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.253288] io scheduler noop registered
[    0.253327] io scheduler deadline registered (default)
[    0.253629] io scheduler cfq registered
[    0.255893] BCM2708FB: allocated DMA memory fa800000
[    0.255940] BCM2708FB: allocated DMA channel 0 @ f3007000
[    0.261371] Console: switching to colour frame buffer device 80x30
[    0.266293] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.271662] console [ttyS0] disabled
[    0.273310] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 29, base_baud = 50000000) is a 16550
[    1.470135] console [ttyS0] enabled
[    1.478325] vc-cma: Videocore CMA driver
[    1.486395] vc-cma: vc_cma_base      = 0x00000000
[    1.495711] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.506103] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.516570] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[    1.544293] brd: module loaded
[    1.557630] loop: module loaded
[    1.565031] vchiq: vchiq_init_state: slot_zero = 0xba880000, is_master = 0
[    1.579216] Loading iSCSI transport class v2.0-870.
[    1.589342] usbcore: registered new interface driver smsc95xx
[    1.600289] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.811469] Core Release: 2.80a
[    1.818062] Setting default values for core params
[    1.827392] Finished setting default values for core params
[    2.038331] Using Buffer DMA mode
[    2.045263] Periodic Transfer Interrupt Enhancement - disabled
[    2.056329] Multiprocessor Interrupt Enhancement - disabled
[    2.067002] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.075741] Dedicated Tx FIFOs mode
[    2.083253] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xba814000 dma = 0xfa814000 len=9024
[    2.102421] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
[    2.135716] dwc_otg: Microframe scheduler enabled
[    2.135766] WARN::hcd_init_fiq:412: FIQ on core 1 at 0x8040ecc0
[    2.146981] WARN::hcd_init_fiq:413: FIQ ASM at 0x8040f030 length 36
[    2.158788] WARN::hcd_init_fiq:438: MPHI regs_base at 0xbb89c000
[    2.170177] dwc_otg 3f980000.usb: DWC OTG Controller
[    2.179840] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    2.194929] dwc_otg 3f980000.usb: irq 32, io mem 0x00000000
[    2.205678] Init: Port Power? op_state=1
[    2.213661] Init: Power Port (0)
[    2.220669] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.233332] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.248246] usb usb1: Product: DWC OTG Controller
[    2.257515] usb usb1: Manufacturer: Linux 4.1.18-v7+ dwc_otg_hcd
[    2.268921] usb usb1: SerialNumber: 3f980000.usb
[    2.278651] hub 1-0:1.0: USB hub found
[    2.286360] hub 1-0:1.0: 1 port detected
[    2.294631] dwc_otg: FIQ enabled
[    2.294641] dwc_otg: NAK holdoff enabled
[    2.294649] dwc_otg: FIQ split-transaction FSM enabled
[    2.294680] Module dwc_common_port init
[    2.294934] usbcore: registered new interface driver usb-storage
[    2.306459] mousedev: PS/2 mouse device common for all mice
[    2.317726] bcm2835-cpufreq: min=600000 max=1200000
[    2.327479] sdhci: Secure Digital Host Controller Interface driver
[    2.339088] sdhci: Copyright(c) Pierre Ossman
[    2.348016] sdhost: log_buf @ ba813000 (fa813000)
[    2.428952] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    2.461836] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    2.472926] mmc-bcm2835 3f300000.mmc: DMA channels allocated
[    2.489018] Indeed it is in host mode hprt0 = 00021501
[    2.499814] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.518902] mmc0: new high speed SDHC card at address 59b4
[    2.519035] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.519398] ledtrig-cpu: registered to indicate activity on CPUs
[    2.519518] hidraw: raw HID events driver (C) Jiri Kosina
[    2.519701] usbcore: registered new interface driver usbhid
[    2.519703] usbhid: USB HID core driver
[    2.520105] Initializing XFRM netlink socket
[    2.520129] NET: Registered protocol family 17
[    2.520247] Key type dns_resolver registered
[    2.520675] Registering SWP/SWPB emulation handler
[    2.559561] registered taskstats version 1
[    2.559733] vc-sm: Videocore shared memory driver
[    2.559741] [vc_sm_connected_init]: start
[    2.562376] [vc_sm_connected_init]: end - returning 0
[    2.651322] Waiting for root device /dev/mmcblk0p7...
[    2.651545] mmcblk0: mmc0:59b4 USD   15.0 GiB
[    2.655391]  mmcblk0: p1 p2 < p5 p6 p7 >
[    2.673021] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.674573] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.676139] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.678947] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.678959] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.679088] Indeed it is in host mode hprt0 = 00001101
[    2.743370] EXT4-fs (mmcblk0p7): INFO: recovery required on readonly filesystem
[    2.757936] EXT4-fs (mmcblk0p7): write access will be enabled during recovery
[    2.768453] mmc1: new high speed SDIO card at address 0001
[    2.879213] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    2.891589] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.905321] hub 1-1:1.0: USB hub found
[    2.912953] hub 1-1:1.0: 5 ports detected
[    3.198957] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.309203] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.321914] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.339630] smsc95xx v1.0.4
[    3.340636] EXT4-fs (mmcblk0p7): orphan cleanup on readonly fs
[    3.340945] EXT4-fs (mmcblk0p7): 1 orphan inode deleted
[    3.340950] EXT4-fs (mmcblk0p7): recovery complete
[    3.398206] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: (null)
[    3.414476] VFS: Mounted root (ext4 filesystem) readonly on device 179:7.
[    3.432006] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:60:ce:6a
[    3.436207] devtmpfs: mounted
[    3.436903] Freeing unused kernel memory: 448K (8078a000 - 807fa000)
[    3.840358] random: systemd urandom read with 68 bits of entropy available
[    3.856985] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[    3.882687] systemd[1]: Detected architecture 'arm'.
[    4.041458] NET: Registered protocol family 10
[    4.051761] systemd[1]: Inserted module 'ipv6'
[    4.064048] systemd[1]: Set hostname to <raspberrypi>.
[    4.468063] systemd[1]: Expecting device dev-ttyS0.device...
[    4.481396] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    4.497495] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    4.513496] systemd[1]: Starting Remote File Systems (Pre).
[    4.526719] systemd[1]: Reached target Remote File Systems (Pre).
[    4.538619] systemd[1]: Starting Encrypted Volumes.
[    4.550600] systemd[1]: Reached target Encrypted Volumes.
[    4.561321] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[    4.581708] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    4.600772] systemd[1]: Starting Swap.
[    4.610832] systemd[1]: Reached target Swap.
[    4.619663] systemd[1]: Expecting device dev-mmcblk0p6.device...
[    4.633435] systemd[1]: Starting Root Slice.
[    4.644487] systemd[1]: Created slice Root Slice.
[    4.654077] systemd[1]: Starting User and Session Slice.
[    4.666901] systemd[1]: Created slice User and Session Slice.
[    4.678133] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[    4.692968] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    4.706167] systemd[1]: Starting Delayed Shutdown Socket.
[    4.718970] systemd[1]: Listening on Delayed Shutdown Socket.
[    4.730187] systemd[1]: Starting Journal Socket (/dev/log).
[    4.743292] systemd[1]: Listening on Journal Socket (/dev/log).
[    4.754812] systemd[1]: Starting udev Control Socket.
[    4.766954] systemd[1]: Listening on udev Control Socket.
[    4.777522] systemd[1]: Starting udev Kernel Socket.
[    4.789332] systemd[1]: Listening on udev Kernel Socket.
[    4.799756] systemd[1]: Starting Journal Socket.
[    4.811100] systemd[1]: Listening on Journal Socket.
[    4.821002] systemd[1]: Starting System Slice.
[    4.832061] systemd[1]: Created slice System Slice.
[    4.841782] systemd[1]: Starting File System Check on Root Device...
[    4.858104] systemd[1]: Starting system-systemd\x2dfsck.slice.
[    4.872208] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    4.884324] systemd[1]: Starting system-autologin.slice.
[    4.897068] systemd[1]: Created slice system-autologin.slice.
[    4.908253] systemd[1]: Starting system-serial\x2dgetty.slice.
[    4.921812] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    4.933884] systemd[1]: Starting Increase datagram queue length...
[    4.949982] systemd[1]: Starting Restore / save the current clock...
[    4.974039] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    4.997964] systemd[1]: Mounting POSIX Message Queue File System...
[    5.014822] systemd[1]: Mounted Huge Pages File System.
[    5.098539] systemd[1]: Started Set Up Additional Binary Formats.
[    5.117528] systemd[1]: Starting Load Kernel Modules...
[    5.132937] systemd[1]: Mounting Debug File System...
[    5.147759] systemd[1]: Starting udev Coldplug all Devices...
[    5.164678] systemd[1]: Starting Slices.
[    5.175280] systemd[1]: Reached target Slices.
[    5.188482] systemd[1]: Mounted Debug File System.
[    5.192300] fuse init (API version 7.23)
[    5.208748] systemd[1]: Mounted POSIX Message Queue File System.
[    5.223505] systemd[1]: Started Increase datagram queue length.
[    5.243649] i2c /dev entries driver
[    5.256928] systemd[1]: Started Restore / save the current clock.
[    5.272652] systemd[1]: Started Create list of required static device nodes for the current kernel.
[    5.294248] systemd[1]: Started File System Check on Root Device.
[    5.309646] systemd[1]: Started Load Kernel Modules.
[    5.326783] systemd[1]: Time has been changed
[    5.373734] systemd[1]: Started udev Coldplug all Devices.
[    5.495692] systemd[1]: Mounting Configuration File System...
[    5.511379] systemd[1]: Starting Apply Kernel Variables...
[    5.527232] systemd[1]: Mounting FUSE Control File System...
[    5.543441] systemd[1]: Starting Create Static Device Nodes in /dev...
[    5.560874] systemd[1]: Starting Syslog Socket.
[    5.563487] systemd[1]: Listening on Syslog Socket.
[    5.563647] systemd[1]: Starting Journal Service...
[    5.570815] systemd[1]: Started Journal Service.
[    5.741564] systemd-udevd[108]: starting version 215
[    6.115609] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    6.409224] EXT4-fs (mmcblk0p7): re-mounted. Opts: (null)
[    7.114273] bcm2835-rng 3f104000.rng: hwrng registered
[    7.115545] spi spi0.0: setting up native-CS0 as GPIO 8
[    7.116146] spi spi0.1: setting up native-CS1 as GPIO 7
[    7.118736] bcm2708_i2c 3f804000.i2c: BSC1 Controller at 0x3f804000 (irq 79) (baudrate 100000)
[    7.166908] systemd-journald[106]: Received request to flush runtime journal from PID 1
[    7.515977] uart-pl011 3f201000.uart: no DMA platform data
[    7.719032] cfg80211: Calling CRDA to update world regulatory domain
[    7.831477] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:978940k SSFS
[    7.969166] cfg80211: World regulatory domain updated:
[    7.969184] cfg80211:  DFS Master region: unset
[    7.969192] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    7.969200] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    7.969216] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    7.969223] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    7.969230] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    7.969237] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    7.969243] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    7.969249] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    7.969256] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[    8.060173] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[    8.060298] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.955180] random: nonblocking pool is initialized
[    9.591103] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.595646] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   12.327148] Bluetooth: Core ver 2.20
[   12.327200] NET: Registered protocol family 31
[   12.327205] Bluetooth: HCI device and connection manager initialized
[   12.327221] Bluetooth: HCI socket layer initialized
[   12.327232] Bluetooth: L2CAP socket layer initialized
[   12.327251] Bluetooth: SCO socket layer initialized
[   12.567439] Bluetooth: HCI UART driver ver 2.3
[   12.567452] Bluetooth: HCI UART protocol H4 registered
[   12.567457] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   12.567461] Bluetooth: HCI UART protocol BCM registered
[   14.533796] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   14.533813] Bluetooth: BNEP filters: protocol multicast
[   14.533840] Bluetooth: BNEP socket layer initialized
[   27.265252] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 9673.613037] gpiomem-bcm2835 3f200000.gpiomem: gpiomem device opened.
[10276.311888] gpiomem-bcm2835 3f200000.gpiomem: gpiomem device opened.
[10504.082845] gpiomem-bcm2835 3f200000.gpiomem: gpiomem device opened.
[10589.523123] gpiomem-bcm2835 3f200000.gpiomem: gpiomem device opened.

Moreover, here's the top output on the Raspi 3 while running my Python program. The CPU' usage is near 125%...

Code: Select all

pi@raspberrypi:~ $ top
top - 03:44:46 up  3:27,  4 users,  load average: 1.22, 0.59, 0.30
Tasks: 132 total,   1 running, 122 sleeping,   9 stopped,   0 zombie
%Cpu(s): 25.4 us,  4.0 sy,  0.0 ni, 70.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:    948056 total,   220676 used,   727380 free,    18664 buffers
KiB Swap:   102396 total,        0 used,   102396 free.   106388 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
1066 root      20   0   48656   8548   5588 S 123.4  0.9   4:01.47 python
 1095 pi        20   0    5112   2484   2088 R   0.7  0.3   0:00.41 top
    1 root      20   0   23936   4000   2788 S   0.0  0.4   0:04.99 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S   0.0  0.0   0:00.04 ksoftirqd/0
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H
    7 root      20   0       0      0      0 S   0.0  0.0   0:00.91 rcu_sched
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh
    9 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/0
   10 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/1
   11 root      20   0       0      0      0 S   0.0  0.0   0:00.14 ksoftirqd/1
   13 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:0H
   14 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/2
   15 root      20   0       0      0      0 S   0.0  0.0   0:00.05 ksoftirqd/2
   17 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/2:0H
   18 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/3
   19 root      20   0       0      0      0 S   0.0  0.0   0:00.02 ksoftirqd/3
   21 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/3:0H
   22 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 khelper
   23 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs
   24 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 netns
   25 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 perf
   26 root      20   0       0      0      0 S   0.0  0.0   0:00.01 khungtaskd
   27 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 writeback
   28 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 crypto
   29 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 bioset
   30 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kblockd
   32 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 rpciod
   33 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kswapd0
   34 root      20   0       0      0      0 S   0.0  0.0   0:00.00 fsnotify_mark
   35 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 nfsiod
   41 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kthrotld
   43 root       1 -19       0      0      0 S   0.0  0.0   0:00.00 VCHIQ-0

matthieuwirth
Posts: 5
Joined: Tue Jun 07, 2016 3:52 pm

Re: Python 2.7.3 to 2.7.9 issue

Thu Jun 09, 2016 1:48 pm

I found a solution to my problem ! :)
One of my threads was looping continuously, I used a time.sleep and it works well now!

Thanks for your help again

Return to “Python”