View Single Post
Old 10-24-2006, 03:02 PM   #1
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
contentLister: part of the power problem

content lister sure has a lot of processes fork()'d, half of them sitting around doing nothing even when the page bar gets poked.

Makes figuring out which processes are doing what a bit more fun.

Like process 565 here. It gets kill -32'd when the page bar is poked and makes the click noise.

Code:
root@ereader:/media/cf/opt/debian# strace -p 565
Process 565 attached - interrupt to quit
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
sigreturn()                             = ? (mask now [RTMIN])
open("/dev/dsp", O_WRONLY)              = 23
write(23, "RIFF\300\16\0\0WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0"..., 3784) = 3784
close(23)                               = 0
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([] <unfinished ...>
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
<... rt_sigsuspend resumed> )           = 32
sigreturn()                             = ? (mask now [RTMIN])
open("/dev/dsp", O_WRONLY)              = 23
write(23, "RIFF\300\16\0\0WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0"..., 3784) = 3784
close(23)                               = 0
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
As you can see, even with sound turned off, contentLister is still opening the sound file and writing the click sound file into it to make the clicking sound.

Which by the way seems to be all process 565 does, wait for a signal 32 to tell it the page bar flipped and write a sound to the sound device.

Got this off the parent contentLister when poking the page bar.

Code:
Process 494 attached - interrupt to quit
.. check for input from X ...
ioctl(4, FIONREAD, [0])                 = 0

... check for page bar etc...
poll([{fd=5, events=POLLIN}, {fd=4, events=POLLIN, revents=POLLIN}, {fd=19, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN}], 4, -1) = 1

I clicked page bar here

... X windows ...
ioctl(4, FIONREAD, [32])                = 0
read(4, "\202u\352{1\331\233{8\0\0\0\7\0\240\0\0\0\0\0\1\0\1\0\1"..., 32) = 32
write(4, "\22\0\7\0\7\0\240\0\214\0\0\0\6\0\0\0 \0\1\0\1\0\0\000"..., 32) = 32
read(4, "\203u\352{4\331\233{8\0\0\0\7\0\240\0\0\0\0\0\1\0\1\0\1"..., 32) = 32
read(4, "\34\0\353{\7\0\240\0\214\0\0\0\215\331\233{\0\0\0\0\0\0"..., 32) = 32
read(4, "\1\1\354{\0\0\0\0\7\0\240\0\200\367\0\0t:\r\0h:\r\0\274"..., 32) = 32

... side conversation via socket with another process ...
sendto(14, "2,101,27,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10
sendto(14, "2,101,47,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10
sendto(14, "2,101,48,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10
sendto(14, "7,101,6", 7, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 7

... log to std out ...
write(2, "(CL_W)erMdsFs.c:627,erClGetDispl"..., 88) = 88

... Scanning directory to get files...
stat64("/mnt/cf/mke2fs", {st_mode=S_IFREG|0755, st_size=61444, ...}) = 0
stat64("/mnt/cf/mke2fs", {st_mode=S_IFREG|0755, st_size=61444, ...}) = 0
stat64("/mnt/cf/ncurses-5.5.tar.gz", {st_mode=S_IFREG|0644, st_size=2314030, ...}) = 0
stat64("/mnt/cf/ncurses-5.5.tar.gz", {st_mode=S_IFREG|0644, st_size=2314030, ...}) = 0
stat64("/mnt/cf/ncurses-term_5.4-4_all.deb", {st_mode=S_IFREG|0644, st_size=278364, ...}) = 0
stat64("/mnt/cf/ncurses-term_5.4-4_all.deb", {st_mode=S_IFREG|0644, st_size=278364, ...}) = 0

.. more logging to stdout ...
write(2, "(CL_W)erMdsFs.c:627,erClGetDispl"..., 90) = 90

... back to examining directory ...
stat64("/mnt/cf/nslookup", {st_mode=S_IFREG|0755, st_size=489588, ...}) = 0
stat64("/mnt/cf/nslookup", {st_mode=S_IFREG|0755, st_size=489588, ...}) = 0
stat64("/mnt/cf/opt", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
stat64("/mnt/cf/p.tar.gz", {st_mode=S_IFREG|0644, st_size=10122084, ...}) = 0
stat64("/mnt/cf/p.tar.gz", {st_mode=S_IFREG|0644, st_size=10122084, ...}) = 0

... side conversation via socket with another process ...
sendto(14, "2,101,27,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10
sendto(14, "2,101,47,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10
sendto(14, "2,101,48,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10

... a lot of x windows ...
write(4, "\2\0\4\0$\0\240\0\1\0\0\0\0\0\0\0+\0\1\0", 20) = 20

(clipped)

... side conversation via socket with another process ...
sendto(13, "17,101", 6, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 6
sendto(13, "0,101,8", 7, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 7
sendto(13, "1,101,6", 7, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 7
sendto(13, "19,101", 6, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 6
Now process 666, he wakes up when I poke the page bar and opens a connection to the X server.

Code:
root@ereader:/media/cf/debs# strace -p 666
Process 666 attached - interrupt to quit
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
sigreturn()                             = ? (mask now [RTMIN])
gettimeofday({1161715820, 374478}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN], [RTMIN], 8) = 0
gettimeofday({1161715820, 377899}, NULL) = 0
nanosleep({0, 496579000}, 0)            = -1 EINTR (Interrupted system call)
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
kill(565, SIGRTMIN)                     = 0
sendto(12, "0,1", 3, 0, {sa_family=AF_INET, sin_port=htons(50071), sin_addr=inet_addr("127.0.0.1")}, 16) = 3
uname({sys="Linux", node="ereader", ...}) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 22
uname({sys="Linux", node="ereader", ...}) = 0
uname({sys="Linux", node="ereader", ...}) = 0
connect(22, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 19) = 0
uname({sys="Linux", node="ereader", ...}) = 0
fcntl64(22, F_SETFD, FD_CLOEXEC)        = 0
access("/home/root/.Xauthority", R_OK)  = -1 ENOENT (No such file or directory)
writev(22, [{"l\0\v\0\0\0\0\0\0\0\0\0", 12}], 1) = 12
fcntl64(22, F_GETFL)                    = 0x2 (flags O_RDWR)
fcntl64(22, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(22, "\1\0\v\0\0\0008\0", 8)        = 8
read(22, "6\32\0\0\0\0\300\0\377\377\37\0\0\1\0\0\17\0\377\377\1"..., 224) = 224
write(22, "7\0\5\0\0\0\300\0008\0\0\0\10\0\0\0\377\0\0\0b\0\5\0\f"..., 64) = 64
read(22, "\0016\2\0\0\0\0\0\1\203\0\0\3106\25\0\24\0\0\0\0\0\0\0"..., 32) = 32
read(22, "\1\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0016\2\0\0\0\0"..., 32) = 32
write(22, "\203\0\1\0", 4)              = 4
read(22, "\1\315\4\0\0\0\0\0\377\377\17\0\3106\25\0\24\0\0\0\0\0"..., 32) = 32
writev(22, [{"b\0\5\0\t\0\300\0", 8}, {"XKEYBOARD", 9}, {"\0\0\0", 3}], 3) = 20
read(22, "\1\315\5\0\0\0\0\0\0\0\0\0\3106\25\0\24\0\0\0\0\0\0\0T"..., 32) = 32
gettimeofday({1161715820, 641285}, NULL) = 0
write(22, "e\0\2\0\10\200\300\0", 8)    = 8
read(22, "\1\4\6\0\0\2\0\0\254\220\3\0\0\0\0\0\3106\25\0\24\0\0\0"..., 32) = 32
read(22, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\33\377\0\0\0\0\0\0\0\0"..., 2048) = 2048
write(22, "w\0\1\0", 4)                 = 4
read(22, "\1\3\7\0\6\0\0\0\0\0\0\0\3106\25\0\24\0\0\0\0\0\0\0h\24"..., 32) = 32
readv(22, [{"2>xB\0\0%i\0@\0\0M\0\0\0\0\0l\0\0\0\0\0", 24}, {"", 0}], 2) = 24
gettimeofday({1161715820, 651663}, NULL) = 0
write(22, "\31\1\v\0\7\0\240\0\1\0\0\0\2p\0\0\21\250\250{8\0\0\0\7"..., 92) = 92
read(22, "\1\1\n\0\0\0\0\0\7\0\240\0h\24\1\0t:\r\0h:\r\0\2749\r\0"..., 32) = 32
write(22, "<\1\2\0\0\0\300\0+\0\1\0", 12) = 12
read(22, "\1\1\f\0\0\0\0\0\7\0\240\0h\24\1\0t:\r\0h:\r\0\2749\r\0"..., 32) = 32
shutdown(22, 2 /* send and receive */)  = 0
close(22)                               = 0
kill(494, SIGRTMIN)                     = 0
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([]
Process 665, its part of the power management crisis.

This next one is polling every .1 seconds, even when you aren't pressing buttons. This one keeps the CPU and lord above only knows what else out of sleep mode...

Code:
ioctl(15, 0x80046207, 0xbf3ffb0c)       = 0
nanosleep({0, 100000000}, NULL)         = 0
ioctl(15, 0x80046207, 0xbf3ffb0c)       = 0
nanosleep({0, 100000000}, NULL)         = 0
ioctl(15, 0x80046207, 0xbf3ffb0c)       = 0
nanosleep({0, 100000000}, NULL)         = 0
ioctl(15, 0x80046207, 0xbf3ffb0c)       = 0
So there you have it, not bad for my first strace investigations of contentLister I think.
scotty1024 is offline   Reply With Quote