Recent

Author Topic: Application stops after sevral weeks  (Read 1622 times)

JanBee

  • Newbie
  • Posts: 2
Application stops after sevral weeks
« on: February 20, 2022, 03:23:57 pm »
I have 2 apps running 24/7, 1 on a Banana Pi, the other on a laptop running Mint 18.
Both applications stop after a few weeks. The app on the Pi can be restarted, for the other I need to reboot the laptop, otherwise the serial communication with an Arduino does not work anymore.
Anyone an idea?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • FPC developer.
Re: Application stops after sevral weeks
« Reply #1 on: February 20, 2022, 03:26:19 pm »
The reboot thing is most likely not the apps fault, but an OS problem.

As for the BPi thingy, try to find out more about its memory usage. (vmstat/top, maybe running with -gh and/or valgrinding)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Application stops after sevral weeks
« Reply #2 on: February 20, 2022, 03:53:08 pm »
First thing is to research whether anybody else has similar problems on the BPi in case some implementation detail of their kernel or standard libraries/daemons is broken.

Second thing is to find out the precise runtime, and to investigate how many milli/micro/seconds etc. that is. The usual thing for this to happen is a rollover, it's particularly pernicious if the timestamp (etc.) is signed but there's a way to write comparisons to minimise the problem.

Assuming Linux on the laptop, the situation where it needs to be rebooted is probably because a USB-connected serial port has moved from e.g. /dev/ttyUSB0 to /dev/ttyUSB1, which suggests that the kernel thinks that the original device hasn't been released cleanly. I'd expect that you could fix that by forcibly-unloading the relevant kernel module.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 14377
  • Sensorship about opinions does not belong here.
Re: Application stops after sevral weeks
« Reply #3 on: February 20, 2022, 04:36:29 pm »
Simple, you are running out 32 bit resolution.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

JanBee

  • Newbie
  • Posts: 2
Re: Application stops after sevral weeks
« Reply #4 on: February 25, 2022, 11:25:13 am »
Thanks for the suggestions. I'll work on it. May take many weeks before I'll be back

 

TinyPortal © 2005-2018