Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2016, 07:18 AM   #31
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Hmm...
The serial port must not have the correct DISPLAY= setting, at least htop does not like it.
attachment from:
Code:
[root@kindle root]# htop -C --sort-key=PERCENT_CPU --pid=`pidof cvm`
"tree view" is even more useless (the attachment IS tree view and cvm itself has not (yet) made an appearance (its pid=20321) ).

But I do see what you meant about CPU%
The bundled 'top' may be summing all of the cvm threads -
of which there is probably over a hundred threads for the one task.

but I'll practice a bit with the utility.
Attached Thumbnails
Click image for larger version

Name:	cvm-1.png
Views:	242
Size:	29.2 KB
ID:	147034  

Last edited by knc1; 03-11-2016 at 07:31 AM.
knc1 is offline   Reply With Quote
Old 03-11-2016, 07:36 AM   #32
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Ah, I forgot, this is a 3.0.x series kernel - we can throttle that cpu hog if we want to:
Code:
[root@kindle root]# cat /proc/20321/limits
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             4016                 4016                 processes 
Max open files            1024                 4096                 files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       4016                 4016                 signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us
Hmm...
It (cvm parent thread) is only showing me a screensaver, and:
Code:
[root@kindle root]# ls -l /proc/20321/fdinfo | wc -l
741
and it has 741 file descriptors open (almost its soft limited number).

Edit:
If the author of cvm forgot to close any unused file descriptors of the 3 standard file descriptors per thread -
HTOP showed 243 threads, *3 == 729 file descriptors.
I think I see a relationship there.

And if the author of cvm decided to poll that many file descriptors . . . .
Well, see:
https://daniel.haxx.se/docs/poll-vs-select.html
and the reference it links to.

#9600

Last edited by knc1; 03-11-2016 at 08:18 AM.
knc1 is offline   Reply With Quote
Advert
Old 03-11-2016, 10:20 AM   #33
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
"Top" also has a 'threads mode' (although not in 'tree' form).

For the command:
Code:
[root@kindle root]# top -H -U framework -bn1 >ss.txt
The winner is:
CVM-IndexerThread

It is done when shown in the attachment and the screensaver is being displayed, but it had to index all of four books after I removed the testWrite.txt write blocker.

So much time, so little (new) learned.
The Indexer has been a source of problems for years now.

Note:
The 'search for garbage' in the search bar no longer tells you if the indexer is running.
Attached Files
File Type: gz ss.txt.gz (1.5 KB, 159 views)

Last edited by knc1; 03-11-2016 at 10:39 AM.
knc1 is offline   Reply With Quote
Old 03-11-2016, 02:21 PM   #34
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
fixy, fixy, fixy indexer state test - -

Not yet, but going on what we learned yesterday:
Code:
[root@kindle root]# lipc-probe -v com.lab126.indexer
        r       Int     numberOfItemsToBeIndexed        [0]
        w       Int     dumpIndexerState
        w       Int     updateIndexerState
        r       Str     pauseIndexerTillTimeMilliseconds        [-1]
        w       Int     pauseIndexerMilliseconds
        rw      Int     debugTextDumpCount      [0]
        w       Str     indexAndSearchContent
        w       Str     pauseIndexerSourceMilliseconds
It looks like the services exist to determine if it is running and some limited control over it.

Rather than a search bar command, perhaps a set of KUAL buttons?
knc1 is offline   Reply With Quote
Old 03-11-2016, 02:47 PM   #35
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Even better yet - Lab126 shipped us a sample reporting script -
see: /usr/bin/dmcc.sh
I.E: search bar ;dmcc
You will have to comment (#) out the top test which is disabling it on production devices.

Make it look like this:
Code:
# verify we are on a pre GM device 
#if ! [ -e "/PRE_GM_DEBUGGING_FEATURES_ENABLED__REMOVE_AT_GMC" ]; then
#    exit 0
#fi
tl;dr: only for the adventurous with command line access at the moment.

Here we go, an example of the script's output (which is .html, not the .txt of the filename used):
http://kaynine.info/pw3/Mar_11_14.36.19_2016.html
(I wish ixtab was here to tell us what all those java thread frames dump'd meant.)

(The Kindle reader displays html, only if it has the extension .txt, which is why the script generates an html file with a .txt filename extension.)

Last edited by knc1; 03-11-2016 at 03:43 PM.
knc1 is offline   Reply With Quote
Advert
Old 03-14-2016, 09:23 AM   #36
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@knc1: Does htop throw any specific error over serial, or was is just an issue with the colorscheme? (in which case, there are a few to chose from in the settings).
NiLuJe is offline   Reply With Quote
Old 03-14-2016, 09:37 AM   #37
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
@knc1: Does htop throw any specific error over serial, or was is just an issue with the colorscheme? (in which case, there are a few to chose from in the settings).
I turned off color in htop with a command line option.

It was the positioning -
And I have since learned that it isn't limited to htop.
Both the nano you built and the nano I built show the same problem.

And I know all three work over ssh just fine.

So it must have something to do with the kernel end of the serial port.
I haven't taken the time to look into that minor problem.

If you look at the KDK crash logs in:
http://kaynine.info/pw3/Mar_11_14.36.19_2016.html
you can see that KUAL is running into permission problems with one of its temporary files.

I haven't looked into that minor problem yet either -
but I'll bet the user name that KUAL runs under has changed -
and since KUAL survives the problem, nobody noticed.

OR

Our Kindlet Jailbreak is missing a read permission over-ride somewhere.

= = = =

The Java thread dump shows a number of things waiting on java.util.LinkedList or java.util.TaskQueue (which probably extends java.util.LinkedList).

If ixtab was here, he could probably tell us if that looks abnormal.
It looks strange to me, but I only drink Java, not write it.

(Things waiting, should be all waiting on an event signal, not for an internal support routine to complete. It almost looks like a "soft" deadlock in other languages.)

= = = =

I am going to post a KUAL button the re-enables those debugging routines available in the search bar shortcuts.
There are quite a few of them and this forum has more eyes than lab126 does.

Last edited by knc1; 03-14-2016 at 09:52 AM.
knc1 is offline   Reply With Quote
Old 03-14-2016, 09:41 AM   #38
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@knc1:

What's TERMINAL set to? (linux, I imagine? See if forcing it to xterm helps).
I assume you're in main and have /mnt/us available? (Because the terminfo db is stored there ;p).

As for the KDK crash logs, yup, that's the good old JB race condition, I'm afraid .
NiLuJe is offline   Reply With Quote
Old 03-14-2016, 11:16 AM   #39
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
@knc1:

What's TERMINAL set to? (linux, I imagine? See if forcing it to xterm helps).
I assume you're in main and have /mnt/us available? (Because the terminfo db is stored there ;p).

As for the KDK crash logs, yup, that's the good old JB race condition, I'm afraid .
A local attack of PEBCAK -

The serial port is the default operator's console for the kernel
and the kernel uses a very dumb, can barely print a character by itself, serial port driver for 'console'.
knc1 is offline   Reply With Quote
Old 03-17-2016, 11:00 AM   #40
n1kk00
Junior Member
n1kk00 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2016
Device: Kindle PW2
Quote:
Originally Posted by knc1 View Post
The Java thread dump shows a number of things waiting on java.util.LinkedList or java.util.TaskQueue (which probably extends java.util.LinkedList).

If ixtab was here, he could probably tell us if that looks abnormal.
It looks strange to me, but I only drink Java, not write it.

(Things waiting, should be all waiting on an event signal, not for an internal support routine to complete. It almost looks like a "soft" deadlock in other languages.)
wait/notify(All) is the standard Java mechanism to coordinate multiple theads, i.e. those things are waiting to acquire a lock to access a shared resource or complete some action - doesn't look abnormal to me

edit: of course, I've no idea what each thread is waiting on or when it will be able to make progress - just saying that waiting is not a problem per se

Last edited by n1kk00; 03-17-2016 at 11:10 AM.
n1kk00 is offline   Reply With Quote
Old 03-17-2016, 11:05 AM   #41
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by n1kk00 View Post
wait/notify(All) is the standard Java mechanism to coordinate multiple theads, i.e. those things are waiting to acquire a lock to access a shared resource or complete some action - doesn't look abnormal to me
OK - I'll go with that.
I have heard that Java has its own idea of thread handling, so if what we see in the listing is just its own normal way of doing things . . . .
knc1 is offline   Reply With Quote
Old 03-29-2016, 02:49 AM   #42
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by hardeepthind View Post
Hello,

I recently upgraded my PW2 (not jailbroken) to the latest firmware 5.7.2.1. Now my battery life has suddenly become quite poor! Has anyone else experienced this?

Being relatively new to kindle/firmware, I looked into downgrading to an earlier version of the firmware but the device doesn't allow that....

Any suggestions or thoughts will be appreciated!

Thanks
There is now a set of KUAL buttons that will report the information on the CPU Control(s) in-use.
https://www.mobileread.com/forums/sho...d.php?t=271929

This report includes information that may be helpful to us in finding out the cause for this poor battery run-time problem.

The button-set also includes buttons that allow some control over the CPU speed (and hence, its power consumption).

# 97 97
knc1 is offline   Reply With Quote
Old 03-30-2016, 03:21 PM   #43
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Updated cpuControl button set (v-1.2) with a (now) 'fixed' CPU Report function.
See:
https://www.mobileread.com/forums/sho...d.php?t=271929

Note: Older softwares had the 'conservative' governor included in the kernel's build.

Although strange as strange can be 5.3.7.3 (K5) boots to using the 'performance' governor by default (which is just locked to max cpu freq and max power usage).
knc1 is offline   Reply With Quote
Old 03-30-2016, 03:35 PM   #44
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Is it only some people who are experiencing battery issues? I upgraded my Voyage from 5.6.5 to first 5.7.2.x and now 5.7.3 and haven't seen any noticeable change in battery life.
HarryT is offline   Reply With Quote
Old 03-30-2016, 03:39 PM   #45
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by HarryT View Post
Is it only some people who are experiencing battery issues? I upgraded my Voyage from 5.6.5 to first 5.7.2.x and now 5.7.3 and haven't seen any noticeable change in battery life.
I am trying to find out.

If folks will post the report on the current cpu controls, I might stand a chance of guessing what is happening.

It is really hard to answer that question -
Most people may not be reporting the problem because they just think that is the way it is supposed to be.
knc1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle PW2 error says Battery Invalid: -22 adonis Kindle Developer's Corner 29 03-03-2025 07:51 PM
Kindle Keyboard - Battery issues kimkindle Kindle Developer's Corner 6 04-29-2012 02:29 AM
Battery issues since updating to 2.5.8 Kindle DX bokolobs Amazon Kindle 7 03-25-2011 05:48 PM
Kindle 3 - Battery Issues abhiroopb Amazon Kindle 16 10-28-2010 11:12 AM
Kindle 1 battery issues, freezing Sydney's Mom Amazon Kindle 0 12-15-2009 06:08 PM


All times are GMT -4. The time now is 06:54 PM.


MobileRead.com is a privately owned, operated and funded community.