WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: my java program seems to sleep  (Read 2921 times)

Offline gio

  • Newbie
  • *
  • Posts: 10
my java program seems to sleep
« on: April 01, 2015, 08:03:54 AM »
Hi all,
I am working on an industrial computer with touch screen and a Cfast as storage, Atom Cpu dual core 1.6Ghz, 2GB ram. UEFI 2.0 compatible, American Megatrends 4.6.4.1.
TinyCore is version 5.4 all in RAM (version 6.1 does not boot: it stops in the middle).

I launch my java program at startup through the terminal by means of the command:

aterm -e sh  -c "cd /home/mybindir && java myprogram" &

The command is put as an executable named "atermbis" under /mnt/sda1/tce.
The java environment is set as "OnBoot".

My program starts as usual. I have a few buttons I have to push sometimes.
Usually it seems working fine, but, after a few minutes (say 5-10) if I push a button that, apart changing the color of the button, does not follow anything, or maybe it does its actions after a while.
If, while waiting for the command acting, I move the cursor just a little, all runs as it should be.
It seems like "postponing" the actions linked to the pressure of the buttom at an indefined time forward.

This happens as with Sun Java (jre 7.07 from repo) as with OpenJdk, so it does not seem linked to the version of java.
This is a very strange thing, because in some ways it seems that sometimes it needs a double pression of the button.
By the way the program was running fine on older machines with slackware on it, showing no such issue.

Looking at processes with "top" the program seems to suck around 34% of VSZ (%VSZ %CPU = 0.0), without spikes, quite constant.

In some ways it is the same thing it was happening with screen saver locking java (as I said on my previous post).
But this machine (the same that came back from customer) has the screen save stopped and java still "sleeping".
Maybe the screensaver was not the one to blame.

Any idea on what I am doing wrong? Is there an issue with java and TinyCore?

Thanx all
« Last Edit: April 01, 2015, 08:15:39 AM by gio »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: my java program seems to sleep
« Reply #1 on: April 01, 2015, 09:18:35 AM »
Does it work if you don't  detach from the program with '&' ?

Offline gio

  • Newbie
  • *
  • Posts: 10
Re: my java program seems to sleep
« Reply #2 on: April 02, 2015, 12:19:47 AM »
It works the same way. It acts like if it has not enough priority to execute the actions following the pressure of the button. Unfortunately I am quite a newbie for TinyCore so I am not able to handle all such things.

Offline gio

  • Newbie
  • *
  • Posts: 10
Re: my java program seems to sleep
« Reply #3 on: April 20, 2015, 03:07:12 AM »
After a while. I was not able to understand why all this was happening. I tried then to install a fresh Slackware 13.1 32 bits (of course for now no ramdisk and so on). Using jre from openjdk, it seems the problem disappears (machine is running for a few days). No more  "sleeping" and no more problems with savescreen.
So it seems the problem stays within TinyCore, but I do not know where it resides. For now I will try reducing the slackware system, just to see if there are issues with some other components (busybox?).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: my java program seems to sleep
« Reply #4 on: April 20, 2015, 03:36:39 AM »
Try different X versions?
The only barriers that can stop you are the ones you create yourself.

Offline gio

  • Newbie
  • *
  • Posts: 10
Re: my java program seems to sleep
« Reply #5 on: April 20, 2015, 05:41:54 AM »
At the moment just using the standard X for slackware 13.1 (i.e. xorg server 1.14.3) 32 bit. For now I am not able to change anything.
If and when the machine will be back i will be able to try different servers. I do not remember which version is the one given with TC 5.4 (version 6.x does not boot). Some oddities are that I was able to use XFCE or Blackbox but not KDE, of course under Slackware, but I think that is some driver problem for this machine.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: my java program seems to sleep
« Reply #6 on: April 20, 2015, 07:08:38 AM »
Hi gio
TC5 is using  1.14.2  according to the info file:
http://tinycorelinux.net/5.x/x86/tcz/xorg-server.tcz.info

Offline gio

  • Newbie
  • *
  • Posts: 10
Re: my java program seems to sleep
« Reply #7 on: April 27, 2015, 03:45:39 AM »
Thank you,
now the machine has gone to the customer, for a deep test on field. When it will come back I will be going to try again, maybe with other linuxes with the same version of X as for TinyCore 5.4.
An I will add more news about it.